lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <13711836-257c-4183-a3d3-5fd04a23411e@nvidia.com>
Date: Tue, 4 Feb 2025 14:31:06 +0200
From: Gal Pressman <gal@...dia.com>
To: Edward Cree <ecree.xilinx@...il.com>,
 "David S. Miller" <davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>
Cc: netdev@...r.kernel.org, Eric Dumazet <edumazet@...gle.com>,
 Paolo Abeni <pabeni@...hat.com>, Simon Horman <horms@...nel.org>,
 Jonathan Corbet <corbet@....net>, Tony Nguyen <anthony.l.nguyen@...el.com>,
 Przemek Kitszel <przemyslaw.kitszel@...el.com>,
 Andrew Lunn <andrew+netdev@...n.ch>, Tariq Toukan <tariqt@...dia.com>,
 Ahmed Zaki <ahmed.zaki@...el.com>, linux-doc@...r.kernel.org,
 Cosmin Ratiu <cratiu@...dia.com>
Subject: Re: [PATCH net-next 1/2] ethtool: Symmetric OR-XOR RSS hash

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@...dia.com>
>> Reviewed-by: Tariq Toukan <tariqt@...dia.com>
>> Signed-off-by: Gal Pressman <gal@...dia.com>
>> ---
>>  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!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ