[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <874jgufpe7.fsf@kurt>
Date: Thu, 07 Dec 2023 08:22:24 +0100
From: Kurt Kanzenbach <kurt@...utronix.de>
To: Vinicius Costa Gomes <vinicius.gomes@...el.com>, Jesse Brandeburg
<jesse.brandeburg@...el.com>, Tony Nguyen <anthony.l.nguyen@...el.com>
Cc: "David S. Miller" <davem@...emloft.net>, Eric Dumazet
<edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, Paolo Abeni
<pabeni@...hat.com>, intel-wired-lan@...ts.osuosl.org,
netdev@...r.kernel.org, Suman Ghosh <sumang@...vell.com>
Subject: Re: [PATCH iwl-net] igc: Check VLAN EtherType mask
On Wed Dec 06 2023, Vinicius Costa Gomes wrote:
> Kurt Kanzenbach <kurt@...utronix.de> writes:
>
>> Currently the driver accepts VLAN EtherType steering rules regardless of
>> the configured mask. And things might fail silently or with confusing error
>> messages to the user. The VLAN EtherType can only be matched by full
>> mask. Therefore, add a check for that.
>>
>> For instance the following rule is invalid, but the driver accepts it and
>> ignores the user specified mask:
>> |root@...t:~# ethtool -N enp3s0 flow-type ether vlan-etype 0x8100 \
>> | m 0x00ff action 0
>> |Added rule with ID 63
>> |root@...t:~# ethtool --show-ntuple enp3s0
>> |4 RX rings available
>> |Total 1 rules
>> |
>> |Filter: 63
>> | Flow Type: Raw Ethernet
>> | Src MAC addr: 00:00:00:00:00:00 mask: FF:FF:FF:FF:FF:FF
>> | Dest MAC addr: 00:00:00:00:00:00 mask: FF:FF:FF:FF:FF:FF
>> | Ethertype: 0x0 mask: 0xFFFF
>> | VLAN EtherType: 0x8100 mask: 0x0
>> | VLAN: 0x0 mask: 0xffff
>> | User-defined: 0x0 mask: 0xffffffffffffffff
>> | Action: Direct to queue 0
>>
>> After:
>> |root@...t:~# ethtool -N enp3s0 flow-type ether vlan-etype 0x8100 \
>> | m 0x00ff action 0
>> |rmgr: Cannot insert RX class rule: Operation not supported
>>
>> Fixes: 2b477d057e33 ("igc: Integrate flex filter into ethtool ops")
>> Suggested-by: Suman Ghosh <sumang@...vell.com>
>> Signed-off-by: Kurt Kanzenbach <kurt@...utronix.de>
>> ---
>
> I was just wondering if an alternative would be to use flex filters
> for matching vlan-etype with a partial mask. But I don't think
> there's any real use case for partial masks, better to reject them:
With flex filters it is possible to match by byte wise partial
masks. However, I also think there's no use case for it.
Thanks,
Kurt
Download attachment "signature.asc" of type "application/pgp-signature" (862 bytes)
Powered by blists - more mailing lists