[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220412114049.GA2451@noodle>
Date: Tue, 12 Apr 2022 14:40:49 +0300
From: Boris Sukholitko <boris.sukholitko@...adcom.com>
To: Jiri Pirko <jiri@...nulli.us>
Cc: netdev@...r.kernel.org, "David S . Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Jamal Hadi Salim <jhs@...atatu.com>,
Cong Wang <xiyou.wangcong@...il.com>,
"Gustavo A . R . Silva" <gustavoars@...nel.org>,
Vladimir Oltean <vladimir.oltean@....com>,
Eric Dumazet <edumazet@...gle.com>,
zhang kai <zhangkaiheb@....com>,
Yoshiki Komachi <komachi.yoshiki@...il.com>,
Ilya Lifshits <ilya.lifshits@...adcom.com>
Subject: Re: [PATCH net-next v2 5/5] net/sched: flower: Consider the number
of tags for vlan filters
On Tue, Apr 12, 2022 at 01:09:35PM +0200, Jiri Pirko wrote:
> Tue, Apr 12, 2022 at 12:02:36PM CEST, boris.sukholitko@...adcom.com wrote:
> >Currently the existence of vlan filters is conditional on the vlan
> >protocol being matched in the tc rule. I.e. the following rule:
> >
> >tc filter add dev eth1 ingress flower vlan_prio 5
> >
> >is illegal because we lack protocol 802.1q in the rule.
> >
> >Having the num_of_vlans filter configured removes this restriction. The
> >following rule becomes ok:
> >
> >tc filter add dev eth1 ingress flower num_of_vlans 1 vlan_prio 5
> >
> >because we know that the packet is single tagged.
> >
> >We achieve the above by having is_vlan_key helper look at the number of
>
> Sorry to be a nitpicker, but who's "we"? When I read the patch
> description, I need to understand clearly what the patch is doing, which
> is not this case. You suppose to command the codebase what to do.
> I fail to see that :/
>
>
What do you think of the following description? The description consists
of two parts: the first provides motivation for the patch, the second is
the way the motivation is implemented. I've judiciously edited out the
"we"-word. :)
<description>
Currently the existence of vlan filters is conditional on the vlan
protocol being matched in the tc rule. I.e. the following rule:
tc filter add dev eth1 ingress flower vlan_prio 5
is illegal because vlan protocol (e.g. 802.1q) does not appear in the rule.
Having the num_of_vlans filter configured removes this restriction. The
following rule becomes ok:
tc filter add dev eth1 ingress flower num_of_vlans 1 vlan_prio 5
because having num_of_vlans==1 implies that the packet is single tagged.
To make the above possible, is_vlan_key helper is changed to look at the
number of vlans in addition to the vlan ethertype.
Outer tag vlan filters (e.g. vlan_prio) require the number of vlan tags
be greater than 0. Inner filters (e.g. cvlan_prio) require the number of
vlan tags be greater than 1.
Number of vlans filter may cause ethertype to be set to 0.
fl_set_key_vlan is changed to accomodate this.
</description>
Thanks,
Boris.
> >vlans in addition to the vlan ethertype. Outer tag vlan filters (e.g.
> >vlan_prio) require the number of vlan tags be greater than 0. Inner
> >filters (e.g. cvlan_prio) require the number of vlan tags be greater
> >than 1.
> >
> >Number of vlans filter may cause ethertype to be set to 0. Check this in
> >fl_set_key_vlan.
> >
Download attachment "smime.p7s" of type "application/pkcs7-signature" (4221 bytes)
Powered by blists - more mailing lists