[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Zx0g1uQ6LTDycCKq@pop-os.localdomain>
Date: Sat, 26 Oct 2024 10:03:18 -0700
From: Cong Wang <xiyou.wangcong@...il.com>
To: Vladimir Oltean <vladimir.oltean@....com>
Cc: netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Andrew Lunn <andrew@...n.ch>, Petr Machata <petrm@...dia.com>,
Ido Schimmel <idosch@...dia.com>, Vlad Buslov <vladbu@...dia.com>,
Jamal Hadi Salim <jhs@...atatu.com>, Jiri Pirko <jiri@...nulli.us>,
Baowen Zheng <baowen.zheng@...igine.com>,
Simon Horman <horms@...nel.org>,
Pedro Tammela <pctammela@...atatu.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH net] net/sched: act_api: deny mismatched skip_sw/skip_hw
flags for actions created by classifiers
On Thu, Oct 17, 2024 at 07:10:48PM +0300, Vladimir Oltean wrote:
> There are 3 more important cases to discuss. First there is this command:
>
> $ tc qdisc add dev eth0 clasct
> $ tc filter add dev eth0 ingress matchall skip_sw \
> action mirred ingress mirror dev eth1
>
> which should be allowed, because prior to the concept of dedicated
> action flags, it used to work and it used to mean the action inherited
> the skip_sw/skip_hw flags from the classifier. It's not a mismatch.
>
> Then we have this command:
>
> $ tc qdisc add dev eth0 clasct
> $ tc filter add dev eth0 ingress matchall skip_sw \
> action mirred ingress mirror dev eth1 skip_hw
>
> where there is a mismatch and it should be rejected.
>
> Finally, we have:
>
> $ tc qdisc add dev eth0 clasct
> $ tc filter add dev eth0 ingress matchall skip_sw \
> action mirred ingress mirror dev eth1 skip_sw
>
> where the offload flags coincide, and this should be treated the same as
> the first command based on inheritance, and accepted.
>
Can we add some selftests to cover the above cases?
Thanks.
Powered by blists - more mailing lists