On 03/02/2025 21:15, Edward Cree wrote: > On 03/02/2025 15:00, Gal Pressman wrote: >> Add an additional type of symmetric RSS hash type: OR-XOR. >> The "Symmetric-OR-XOR" algorithm transforms the input as follows: >> >> (SRC_IP | DST_IP, SRC_IP ^ DST_IP, SRC_PORT | DST_PORT, SRC_PORT ^ DST_PORT) >> >> Change 'cap_rss_sym_xor_supported' to 'supported_input_xfrm', a bitmap >> of supported RXH_XFRM_* types. >> >> Reviewed-by: Cosmin Ratiu <cratiu@xxxxxxxxxx> >> Reviewed-by: Tariq Toukan <tariqt@xxxxxxxxxx> >> Signed-off-by: Gal Pressman <gal@xxxxxxxxxx> >> --- >> Documentation/networking/ethtool-netlink.rst | 2 +- >> Documentation/networking/scaling.rst | 14 ++++++++++---- >> drivers/net/ethernet/intel/iavf/iavf_ethtool.c | 2 +- >> drivers/net/ethernet/intel/ice/ice_ethtool.c | 2 +- >> include/linux/ethtool.h | 5 ++--- >> include/uapi/linux/ethtool.h | 7 ++++--- >> net/ethtool/ioctl.c | 8 ++++---- >> 7 files changed, 23 insertions(+), 17 deletions(-) >> >> diff --git a/Documentation/networking/ethtool-netlink.rst b/Documentation/networking/ethtool-netlink.rst >> index 3770a2294509..aba83d97ff90 100644 >> --- a/Documentation/networking/ethtool-netlink.rst >> +++ b/Documentation/networking/ethtool-netlink.rst >> @@ -1934,7 +1934,7 @@ ETHTOOL_A_RSS_INDIR attribute returns RSS indirection table where each byte >> indicates queue number. >> ETHTOOL_A_RSS_INPUT_XFRM attribute is a bitmap indicating the type of >> transformation applied to the input protocol fields before given to the RSS >> -hfunc. Current supported option is symmetric-xor. >> +hfunc. Current supported option is symmetric-xor and symmetric-or-xor. > > "options are"? Yes. > >> diff --git a/include/uapi/linux/ethtool.h b/include/uapi/linux/ethtool.h >> index d1089b88efc7..b10ecc503b26 100644 >> --- a/include/uapi/linux/ethtool.h >> +++ b/include/uapi/linux/ethtool.h >> @@ -2263,12 +2263,13 @@ static inline int ethtool_validate_duplex(__u8 duplex) >> #define WOL_MODE_COUNT 8 >> >> /* RSS hash function data >> - * XOR the corresponding source and destination fields of each specified >> - * protocol. Both copies of the XOR'ed fields are fed into the RSS and RXHASH >> - * calculation. Note that this XORing reduces the input set entropy and could >> + * XOR/OR the corresponding source and destination fields of each specified >> + * protocol. Both copies of the XOR/OR'ed fields are fed into the RSS and RXHASH >> + * calculation. Note that this operation reduces the input set entropy and could >> * be exploited to reduce the RSS queue spread. >> */ >> #define RXH_XFRM_SYM_XOR (1 << 0) >> +#define RXH_XFRM_SYM_OR_XOR (1 << 1) >> #define RXH_XFRM_NO_CHANGE 0xff > > I think this should be two separate comments, one on RXH_XFRM_SYM_XOR and > one on RXH_XFRM_SYM_OR_XOR, so that you can untangle the phrasing a bit. > E.g. there isn't such a thing as "Both copies of the XOR/OR'ed fields"; one > has two copies of XOR and the other has a XOR and an OR. > Second comment could be something like "Similar to SYM_XOR except that one > copy of the XOR'ed fields is replaced by an OR of the same fields." Will change. > > Apart from this, patch LGTM. Thanks for the review!