[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <33333af24adf6ef97013445c51f8ce7bd3c87a82.camel@redhat.com>
Date: Thu, 18 Oct 2018 17:30:24 +0200
From: Davide Caratti <dcaratti@...hat.com>
To: Jamal Hadi Salim <jhs@...atatu.com>, Jiri Pirko <jiri@...nulli.us>,
Cong Wang <xiyou.wangcong@...il.com>,
"David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org
Subject: Re: [PATCH net v2] net/sched: act_gact: properly init 'goto chain'
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
Powered by blists - more mailing lists