diff options
| author | Jakub Kicinski <kuba@kernel.org> | 2025-06-12 08:15:37 -0700 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2025-06-12 08:15:38 -0700 |
| commit | 613fd52ea75d70275fa67de0af5af2b5d65bed16 (patch) | |
| tree | 6db2c9fd8a5cbf848df1236a8e318e58edeeabdc /net | |
| parent | Merge tag 'for-net-2025-06-11' of git://git.kernel.org/pub/scm/linux/kernel/g... (diff) | |
| parent | selftests: drv-net: rss_ctx: Add test for ntuple rules targeting default RSS ... (diff) | |
| download | linux-613fd52ea75d70275fa67de0af5af2b5d65bed16.tar.gz linux-613fd52ea75d70275fa67de0af5af2b5d65bed16.zip | |
Merge branch 'fix-ntuple-rules-targeting-default-rss'
Gal Pressman says:
====================
Fix ntuple rules targeting default RSS
This series addresses a regression in ethtool flow steering where rules
targeting the default RSS context (context 0) were incorrectly rejected.
The default RSS context always exists but is not stored in the rss_ctx
xarray like additional contexts. The current validation logic was
checking for the existence of context 0 in this array, causing valid
flow steering rules to be rejected.
This prevented configurations such as:
- High priority rules directing specific traffic to the default context
- Low priority catch-all rules directing remaining traffic to additional
contexts
Patch 1 fixes the validation logic to skip the existence check for
context 0.
Patch 2 adds a selftest that verifies this behavior.
v3: https://lore.kernel.org/20250609120250.1630125-1-gal@nvidia.com
v2: https://lore.kernel.org/20250225071348.509432-1-gal@nvidia.com
====================
Link: https://patch.msgid.link/20250612071958.1696361-1-gal@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net')
| -rw-r--r-- | net/ethtool/ioctl.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ethtool/ioctl.c b/net/ethtool/ioctl.c index 39ec920f5de7..71c828d0bf31 100644 --- a/net/ethtool/ioctl.c +++ b/net/ethtool/ioctl.c @@ -1083,7 +1083,8 @@ static noinline_for_stack int ethtool_set_rxnfc(struct net_device *dev, ethtool_get_flow_spec_ring(info.fs.ring_cookie)) return -EINVAL; - if (!xa_load(&dev->ethtool->rss_ctx, info.rss_context)) + if (info.rss_context && + !xa_load(&dev->ethtool->rss_ctx, info.rss_context)) return -EINVAL; } |
