netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ahmed Zaki <ahmed.zaki@intel.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: <netdev@vger.kernel.org>, <jesse.brandeburg@intel.com>,
	<anthony.l.nguyen@intel.com>,
	Willem de Bruijn <willemdebruijn.kernel@gmail.com>
Subject: Re: [RFC PATCH net-next 1/3] net: ethtool: add symmetric Toeplitz RSS hash function
Date: Wed, 30 Aug 2023 12:11:13 -0600	[thread overview]
Message-ID: <0fa6ea96-8c1e-4f32-2a6a-38b5ab4fb2e7@intel.com> (raw)
In-Reply-To: <20230825174925.45ea6ee5@kernel.org>


On 2023-08-25 18:49, Jakub Kicinski wrote:
> On Fri, 25 Aug 2023 14:46:42 -0600 Ahmed Zaki wrote:
>>> I'm just trying to help, if you want a single knob you'd need to add
>>> new fields to the API and the RXFH API is not netlink-ified.
>>>
>>> Using hashing algo for configuring fields feels like a dirty hack.
>> Ok. Another way to add a single knob is to a flag in "struct
>> ethtool_rxfh" (there are still some reserved bytes) and then:
> Sorry we do have ETHTOOL_MSG_RSS_GET. It just doesn't cover the flow
> config now. But you can add the new field there without a problem.
>
>> ethtool -X eth0 --symmetric hfunc toeplitz
>>
>> This will also allow drivers/NICs to implement this as they wish (XOR,
>> sorted, ..etc). Better ?
> We should specify the fields, I reckon, something like:
>
> ethtool -X eth0 --symmetric sdfn hfunc toeplitz
>
> So that the driver can make sure the user expects symmetry on fields
> the device supports.

Seems fair. I will prepare this and the per-flow based config code 
("-U|-N") and re-send.


>
>>>> I agree that we will need to take care of some cases like if the user
>>>> removes only "source IP" or "destination port" from the hash fields,
>>>> without that field's counterpart (we can prevent this, or show a
>>>> warning, ..etc). I was planning to address that in a follow-up
>>>> series; ie. handling the "ethtool -U rx-flow-hash". Do you want that
>>>> to be included in the same series as well?
>>> Yes, the validation needs to be part of the same series. But the
>>> semantics of selecting only src or dst need to be established, too.
>>> You said you feed dst ^ src into the hashing twice - why?
>> To maintain the same input length (same as the regular Toeplitz input)
>> to the hash H/W block
> But that's a choice, right? We're configuring the input we could as
> well choose to make it shorter? v4 and v6 use the same key with
> different input lengths, right?

Correct. All RSS fields' offsets and lengths are configurable. The 
example I gave before was from the datasheet, but it seems we can feed 
the Xored values once.

Thanks,


  reply	other threads:[~2023-08-30 18:11 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-23 16:48 [RFC PATCH net-next 0/3] Support Symmetric Toeplitz RSS hash Ahmed Zaki
2023-08-23 16:48 ` [RFC PATCH net-next 1/3] net: ethtool: add symmetric Toeplitz RSS hash function Ahmed Zaki
2023-08-23 19:45   ` Saeed Mahameed
2023-08-24 13:14     ` Ahmed Zaki
2023-08-24 18:36       ` Saeed Mahameed
2023-08-24 22:56         ` Ahmed Zaki
2023-08-24 23:30           ` Willem de Bruijn
2023-08-25 21:21             ` Ahmed Zaki
2023-08-24 18:14   ` Jakub Kicinski
2023-08-24 22:55     ` Ahmed Zaki
2023-08-25  0:43       ` Jakub Kicinski
2023-08-25 20:46         ` Ahmed Zaki
2023-08-26  0:49           ` Jakub Kicinski
2023-08-30 18:11             ` Ahmed Zaki [this message]
2023-08-23 16:48 ` [RFC PATCH net-next 2/3] ice: fix ICE_AQ_VSI_Q_OPT_RSS_* register values Ahmed Zaki
2023-08-23 16:48 ` [RFC PATCH net-next 3/3] ice: add support for symmetric Toeplitz RSS hash function Ahmed Zaki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0fa6ea96-8c1e-4f32-2a6a-38b5ab4fb2e7@intel.com \
    --to=ahmed.zaki@intel.com \
    --cc=anthony.l.nguyen@intel.com \
    --cc=jesse.brandeburg@intel.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=willemdebruijn.kernel@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).