Re: [PATCH net] bnxt_en: ethtool: Fix ip[6] ntuple rule verification
From: Michael Chan
Date: Fri Nov 01 2024 - 15:21:08 EST
On Thu, Oct 31, 2024 at 9:59 PM Daniel Xu <dxu@xxxxxxxxx> wrote:
>
> Previously, trying to insert an ip or ip6 only rule would get rejected
> with -EOPNOTSUPP. For example, the following would fail:
>
> ethtool -N eth0 flow-type ip6 dst-ip $IP6 context 1
>
> The reason was that all the l4proto validation was being run despite the
> l4proto mask being set to 0x0. Fix by only running l4proto validation
> when mask is set.
>
> Fixes: 9ba0e56199e3 ("bnxt_en: Enhance ethtool ntuple support for ip flows besides TCP/UDP")
> Signed-off-by: Daniel Xu <dxu@xxxxxxxxx>
Thanks for the patch. I think the original author Vikas intended the
user to do this for ip only filters:
ethtool -N eth0 flow-type ip6 dst-ip $IP6 l4_proto 0xff context 1
But your patch makes sense and simplifies the usage for the user. I
just need to check that FW can accept 0 for the ip_protocol field to
mean wildcard when it receives the FW message to create the filter.
I will reply when I get the answer from the FW team. If FW requires
0xff, then we just need to make a small change to your patch.
Attachment:
smime.p7s
Description: S/MIME Cryptographic Signature