Skip to content

Commit 2b91cc1

Browse files
committed
ethtool: ntuple: fix rss + ring_cookie check
The info.flow_type is for RXFH commands, ntuple flow_type is inside the flow spec. The check currently does nothing, as info.flow_type is 0 (or even uninitialized by user space) for ETHTOOL_SRXCLSRLINS. Fixes: 9e43ad7 ("net: ethtool: only allow set_rxnfc with rss + ring_cookie if driver opts in") Reviewed-by: Gal Pressman <gal@nvidia.com> Reviewed-by: Joe Damato <jdamato@fastly.com> Link: https://patch.msgid.link/20250201013040.725123-3-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 244f8aa commit 2b91cc1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/ethtool/ioctl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -993,7 +993,7 @@ static noinline_for_stack int ethtool_set_rxnfc(struct net_device *dev,
993993
return rc;
994994

995995
/* Nonzero ring with RSS only makes sense if NIC adds them together */
996-
if (cmd == ETHTOOL_SRXCLSRLINS && info.flow_type & FLOW_RSS &&
996+
if (cmd == ETHTOOL_SRXCLSRLINS && info.fs.flow_type & FLOW_RSS &&
997997
!ops->cap_rss_rxnfc_adds &&
998998
ethtool_get_flow_spec_ring(info.fs.ring_cookie))
999999
return -EINVAL;

0 commit comments

Comments
 (0)