From: Gal Pressman <gal@nvidia.com>
To: Edward Cree <ecree.xilinx@gmail.com>,
edward.cree@amd.com, davem@davemloft.net, kuba@kernel.org,
edumazet@google.com, pabeni@redhat.com,
Ahmed Zaki <ahmed.zaki@intel.com>
Cc: netdev@vger.kernel.org, habetsm.xilinx@gmail.com,
linux-net-drivers@amd.com, horms@kernel.org,
andrew+netdev@lunn.ch, shuah@kernel.org,
linux-kselftest@vger.kernel.org
Subject: Re: [PATCH net-next 1/5] net: ethtool: only allow set_rxnfc with rss + ring_cookie if driver opts in
Date: Mon, 25 Nov 2024 16:10:27 +0200 [thread overview]
Message-ID: <d986d2ad-3ac6-4357-a8dc-e83e3622efb2@nvidia.com> (raw)
In-Reply-To: <b0f84914-c4bf-9071-b72d-cc2cc4a517f9@gmail.com>
On 25/11/2024 15:21, Edward Cree wrote:
> On 25/11/2024 07:11, Gal Pressman wrote:
>> On 13/11/2024 14:13, edward.cree@amd.com wrote:
>>> Ethtool ntuple filters with FLOW_RSS were originally defined as adding
>>> the base queue ID (ring_cookie) to the value from the indirection table,
>>> so that the same table could distribute over more than one set of queues
>>> when used by different filters.
>>
>> TBH, I'm not sure I understand the difference? Perhaps you can share an
>> example?
>
> Something like this:
>
> ethtool -X $intf context new equal 2
> # creates context ID 1, table filled with 0s and 1s
> ethtool -N $intf <match fields...> context 1
> # filter distributes traffic to queues 0 and 1
> ethtool -N $intf <match fields...> context 1 action 2
> # filter distributes traffic to queues 2 and 3
>
> See the selftest in patch 4 for a concrete example of this.
> Some NICs were apparently sending the traffic from both filters to
> queues 0 and 1, and ignoring the 'action 2' on the second filter.
Thanks, I did not know it works that way, is it actually documented
anywhere?
>
>>> @@ -992,6 +992,11 @@ static noinline_for_stack int ethtool_set_rxnfc(struct net_device *dev,
>>> if (rc)
>>> return rc;
>>>
>>> + /* Nonzero ring with RSS only makes sense if NIC adds them together */
>>> + if (info.flow_type & FLOW_RSS && !ops->cap_rss_rxnfc_adds &&
>>> + ethtool_get_flow_spec_ring(info.fs.ring_cookie))
>>> + return -EINVAL;
>>
>> I believe this check shouldn't happen when we do ETHTOOL_SRXCLSRLDEL as
>> flow_type is garbage, WDYT?
>
> Agreed; this check should only apply to ETHTOOL_SRXCLSRLINS. Do you want
> to send the fix or shall I?
I will do it.
>
> Also, the check below it, dealing with sym-xor, looks like it's only
> relevant to ETHTOOL_SRXFH, since info.data is garbage for other commands.
> Ahmed, is my understanding correct there?
>
Speaking of the below check, the sanity check depends on the order of
operations, for example:
1. Enable symmetric xor
2. Request hash on src only
= Error as expected, however:
1. Request hash on src only
2. Enable symmetric xor
= Success :(.
I've been thinking of improving the situation, but that requires
iterating over all flow types on symmetric xor enablement and that feels
quite bad..
next prev parent reply other threads:[~2024-11-25 14:10 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-13 12:13 [PATCH net-next 0/5] net: make RSS+RXNFC semantics more explicit edward.cree
2024-11-13 12:13 ` [PATCH net-next 1/5] net: ethtool: only allow set_rxnfc with rss + ring_cookie if driver opts in edward.cree
2024-11-14 9:21 ` Martin Habets
2024-11-25 7:11 ` Gal Pressman
2024-11-25 13:21 ` Edward Cree
2024-11-25 14:10 ` Gal Pressman [this message]
2024-11-25 14:20 ` Ahmed Zaki
2024-11-25 14:26 ` Gal Pressman
2024-11-25 14:42 ` Edward Cree
2024-11-25 19:01 ` Ahmed Zaki
2024-12-02 15:19 ` Ahmed Zaki
2024-11-25 18:13 ` Edward Cree
2024-11-13 12:13 ` [PATCH net-next 2/5] net: ethtool: account for RSS+RXNFC add semantics when checking channel count edward.cree
2024-11-13 12:13 ` [PATCH net-next 3/5] selftest: include dst-ip in ethtool ntuple rules edward.cree
2024-11-14 9:54 ` Martin Habets
2024-11-13 12:13 ` [PATCH net-next 4/5] selftest: validate RSS+ntuple filters with nonzero ring_cookie edward.cree
2024-11-13 12:13 ` [PATCH net-next 5/5] selftest: extend test_rss_context_queue_reconfigure for action addition edward.cree
2024-11-15 4:40 ` [PATCH net-next 0/5] net: make RSS+RXNFC semantics more explicit patchwork-bot+netdevbpf
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=d986d2ad-3ac6-4357-a8dc-e83e3622efb2@nvidia.com \
--to=gal@nvidia.com \
--cc=ahmed.zaki@intel.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=ecree.xilinx@gmail.com \
--cc=edumazet@google.com \
--cc=edward.cree@amd.com \
--cc=habetsm.xilinx@gmail.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-net-drivers@amd.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=shuah@kernel.org \
/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).