Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'bug-fixes-for-rss-symmetric-xor'

Ahmed Zaki says:

====================
Bug fixes for RSS symmetric-xor

A couple of fixes for the symmetric-xor recently merged in net-next [1].

The first patch copies the xfrm value back to user-space when ethtool is
built with --disable-netlink. The second allows ethtool to change other
RSS attributes while not changing the xfrm values.

Link: https://lore.kernel.org/netdev/20231213003321.605376-1-ahmed.zaki@intel.com/ [1]
====================

Link: https://lore.kernel.org/r/20231221184235.9192-1-ahmed.zaki@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

+10 -2
+1
include/uapi/linux/ethtool.h
··· 2002 2002 * be exploited to reduce the RSS queue spread. 2003 2003 */ 2004 2004 #define RXH_XFRM_SYM_XOR (1 << 0) 2005 + #define RXH_XFRM_NO_CHANGE 0xff 2005 2006 2006 2007 /* L2-L4 network traffic flow types */ 2007 2008 #define TCP_V4_FLOW 0x01 /* hash or spec (tcp_ip4_spec) */
+9 -2
net/ethtool/ioctl.c
··· 1252 1252 &rxfh_dev.hfunc, sizeof(rxfh.hfunc))) { 1253 1253 ret = -EFAULT; 1254 1254 } else if (copy_to_user(useraddr + 1255 + offsetof(struct ethtool_rxfh, input_xfrm), 1256 + &rxfh_dev.input_xfrm, 1257 + sizeof(rxfh.input_xfrm))) { 1258 + ret = -EFAULT; 1259 + } else if (copy_to_user(useraddr + 1255 1260 offsetof(struct ethtool_rxfh, rss_config[0]), 1256 1261 rss_config, total_size)) { 1257 1262 ret = -EFAULT; ··· 1304 1299 return -EOPNOTSUPP; 1305 1300 1306 1301 /* If either indir, hash key or function is valid, proceed further. 1307 - * Must request at least one change: indir size, hash key or function. 1302 + * Must request at least one change: indir size, hash key, function 1303 + * or input transformation. 1308 1304 */ 1309 1305 if ((rxfh.indir_size && 1310 1306 rxfh.indir_size != ETH_RXFH_INDIR_NO_CHANGE && 1311 1307 rxfh.indir_size != dev_indir_size) || 1312 1308 (rxfh.key_size && (rxfh.key_size != dev_key_size)) || 1313 1309 (rxfh.indir_size == ETH_RXFH_INDIR_NO_CHANGE && 1314 - rxfh.key_size == 0 && rxfh.hfunc == ETH_RSS_HASH_NO_CHANGE)) 1310 + rxfh.key_size == 0 && rxfh.hfunc == ETH_RSS_HASH_NO_CHANGE && 1311 + rxfh.input_xfrm == RXH_XFRM_NO_CHANGE)) 1315 1312 return -EINVAL; 1316 1313 1317 1314 if (rxfh.indir_size != ETH_RXFH_INDIR_NO_CHANGE)