]> www.infradead.org Git - users/willy/xarray.git/commit
bnxt_en: ethtool: Support unset l4proto on ip4/ip6 ntuple rules
authorDaniel Xu <dxu@dxuuu.xyz>
Tue, 5 Nov 2024 04:13:20 +0000 (21:13 -0700)
committerJakub Kicinski <kuba@kernel.org>
Thu, 7 Nov 2024 01:39:59 +0000 (17:39 -0800)
commit5f143efd3804a85d6a17cabc225effd89d017076
tree19827229350afbdb93390ffb6bf45ffa82cb7a5f
parent050eb2cebb9e97adb673550c51988c3de1eb0834
bnxt_en: ethtool: Support unset l4proto on ip4/ip6 ntuple rules

Previously, trying to insert an ip4/ip6 ntuple rule with an unset
l4proto 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 respecting the mask on l4proto and
treating a mask of 0x0 as wildcard l4proto.

Signed-off-by: Daniel Xu <dxu@dxuuu.xyz>
Reviewed-by: Michael Chan <michael.chan@broadcom.com>
Link: https://patch.msgid.link/1ac93a2836b25f79e7045f8874d9a17875229ffc.1730778566.git.dxu@dxuuu.xyz
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.h