[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231127085724.3cc31a9c@kernel.org>
Date: Mon, 27 Nov 2023 08:57:24 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Ahmed Zaki <ahmed.zaki@...el.com>
Cc: <netdev@...r.kernel.org>, <intel-wired-lan@...ts.osuosl.org>,
<corbet@....net>, <jesse.brandeburg@...el.com>,
<anthony.l.nguyen@...el.com>, <davem@...emloft.net>, <edumazet@...gle.com>,
<pabeni@...hat.com>, <vladimir.oltean@....com>, <andrew@...n.ch>,
<horms@...nel.org>, <mkubecek@...e.cz>, <willemdebruijn.kernel@...il.com>,
<gal@...dia.com>, <alexander.duyck@...il.com>, <linux-doc@...r.kernel.org>,
Wojciech Drewek <wojciech.drewek@...el.com>
Subject: Re: [PATCH net-next v6 2/7] net: ethtool: add support for
symmetric-xor RSS hash
On Mon, 27 Nov 2023 07:21:47 -0700 Ahmed Zaki wrote:
> On 2023-11-21 16:33, Jakub Kicinski wrote:
> > On Mon, 20 Nov 2023 13:56:09 -0700 Ahmed Zaki wrote:
> >> + * @data: Extension for the RSS hash function. Valid values are one of the
> >> + * %RXH_HFUNC_*.
> >
> > @data is way too generic. Can we call this key_xfrm? key_preproc?
>
> We manipulate the "input data" (protocol fields) not the key. I will
> rename to "input_xfrm".
Ugh, right!
> >> +/* 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.
> >> + */
> >> +#define RXH_HFUNC_SYM_XOR (1 << 0)
> >
> > We need to mention somewhere that sym-xor is unsafe, per Alex's
> > comments.
>
> I already added the following in Documentation/networking/scaling.rst:
>
> "The Symmetric-XOR" is a type of RSS algorithms that achieves this hash
> symmetry by XORing the input source and destination fields of the IP
> and/or L4 protocols. This, however, results in reduced input entropy and
> could potentially be exploited."
>
> Or do you mean add it also to "uapi/linux/ethtool.h" ?
Yes, a short mention in a comment next to the define.
There's a good chance person looking at this will not notice
the documentation in scaling.
Powered by blists - more mailing lists