hello Jamal,

On Thu, 2018-10-18 at 08:52 -0400, Jamal Hadi Salim wrote:
> Rejection is a good solution[1].
> Would be helpful to set an ext_ack to something like
> "only one goto chain is supported currently"

ok, that's material for a v3, if you / Cong / others are ok with the other
hunks.

On Thu, 2018-10-18 at 08:52 -0400, Jamal Hadi Salim wrote:
> I didnt follow why you needed to introduce tcfg_caction...

it's a trick (maybe an abuse, up to you to decide): when the user does

 # tc f a dev v0 egress matchall action pass random determ goto chain 4 5

tcfg_caction contains 'pass', tcfg_paction and tcf_action both contain
'goto chain 4'. On the opposite, when the user does

 # tc f a dev v0 egress matchall action goto chain 4 random determ drop 5

tcfg_caction and tcf_action both contain 'goto chain 4', and tcf_paction
contains 'drop'. In this way, the 'goto chain' is always stored in
tcf_action, so that TC generic code can always initialize a->goto_chain.
(we need tcf_caction, becaue tcf_gact_dump() and helpers in tc_gact.h need
to read the control action on the left of "random")

The alternative is, we systematically forbid usage of 'goto chain' in
tcfg_paction, so that:

# tc f a dev v0 egress matchall action <whatever> random determ goto chain 4 5

is systematically rejected with -EINVAL. This comand never worked, so we
are not breaking anything in userspace.

thanks for reviewing!
-- 
davide

Reply via email to