From: "naamax.meir" <naamax.meir@linux.intel.com>
To: Kurt Kanzenbach <kurt@linutronix.de>,
Jesse Brandeburg <jesse.brandeburg@intel.com>,
Tony Nguyen <anthony.l.nguyen@intel.com>,
Vinicius Costa Gomes <vinicius.gomes@intel.com>
Cc: netdev@vger.kernel.org, Eric Dumazet <edumazet@google.com>,
intel-wired-lan@lists.osuosl.org,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
"David S. Miller" <davem@davemloft.net>,
Suman Ghosh <sumang@marvell.com>
Subject: Re: [Intel-wired-lan] [PATCH iwl-net] igc: Check VLAN EtherType mask
Date: Tue, 26 Dec 2023 19:01:55 +0200 [thread overview]
Message-ID: <c01c2d39-0196-477e-b7cd-110a0d0862de@linux.intel.com> (raw)
In-Reply-To: <20231206140718.57433-1-kurt@linutronix.de>
On 12/6/2023 16:07, Kurt Kanzenbach wrote:
> 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@host:~# ethtool -N enp3s0 flow-type ether vlan-etype 0x8100 \
> | m 0x00ff action 0
> |Added rule with ID 63
> |root@host:~# 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@host:~# 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@marvell.com>
> Signed-off-by: Kurt Kanzenbach <kurt@linutronix.de>
> ---
>
> Note: This is a follow up of
>
> https://lore.kernel.org/netdev/20231201075043.7822-1-kurt@linutronix.de/
>
> and should apply to net-queue tree.
>
> drivers/net/ethernet/intel/igc/igc_ethtool.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
Tested-by: Naama Meir <naamax.meir@linux.intel.com>
prev parent reply other threads:[~2023-12-26 17:02 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-06 14:07 [Intel-wired-lan] [PATCH iwl-net] igc: Check VLAN EtherType mask Kurt Kanzenbach
2023-12-06 14:07 ` Kurt Kanzenbach
2023-12-07 1:26 ` [Intel-wired-lan] " Vinicius Costa Gomes
2023-12-07 1:26 ` Vinicius Costa Gomes
2023-12-07 7:22 ` [Intel-wired-lan] " Kurt Kanzenbach
2023-12-07 7:22 ` Kurt Kanzenbach
2023-12-10 11:50 ` [Intel-wired-lan] " Simon Horman
2023-12-10 11:50 ` Simon Horman
2023-12-26 17:01 ` naamax.meir [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c01c2d39-0196-477e-b7cd-110a0d0862de@linux.intel.com \
--to=naamax.meir@linux.intel.com \
--cc=anthony.l.nguyen@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=jesse.brandeburg@intel.com \
--cc=kuba@kernel.org \
--cc=kurt@linutronix.de \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sumang@marvell.com \
--cc=vinicius.gomes@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.