From: Edward Cree <ecree.xilinx@gmail.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Jakub Kicinski <kuba@kernel.org>,
edward.cree@amd.com, linux-net-drivers@amd.com,
davem@davemloft.net, pabeni@redhat.com, edumazet@google.com,
netdev@vger.kernel.org, habetsm.xilinx@gmail.com,
sudheer.mogilappagari@intel.com
Subject: Re: [RFC PATCH v2 net-next 6/7] net: ethtool: add a mutex protecting RSS contexts
Date: Fri, 14 Apr 2023 21:20:14 +0100 [thread overview]
Message-ID: <2122a8d2-9348-53ca-22f0-18f62109f1bb@gmail.com> (raw)
In-Reply-To: <a628b861-47a9-44d2-a717-5268dc5b47f6@lunn.ch>
On 13/04/2023 22:58, Andrew Lunn wrote:
>> (Idk, maybe sfc is just uniquely complex and messy. It wouldn't be
>> the first time.)
>
> Hi Ed
>
> Have you looked at other drivers? It would be bad to design an API
> around a messy driver.
I have; there's really not many that implement custom RSS contexts
(just Marvell's mvpp2 and octeontx2, and Mellanox's mlx5). The
`rss_ctx_max_id` field is designed for those as they all have fixed-
size arrays currently and idk whether that's a purely software limit
or whether it reflects the hardware.
I couldn't find anything in any of them that looked like "restore
stuff after a device reboot"; maybe it's just not something those
devices expect to experience normally.
I don't know enough about mlx5 hw to really understand their filter
code, but the rough equivalent of our efx_mcdi_filter_insert_locked()
in that driver appears to be _mlx5_add_flow_rules(), which seems to
be doing some kind of hand-over-hand locking. And no sign (whether
in comments or in asserts) of whether the function expects callers to
hold RTNL. Same goes for their functions operating on TIRs (whatever
those are) which are called from all over (aRFS, tc, even kTLS!) in
addition to the ethtool RSS/ntuple paths.
Anyway I'll cc maintainers of those drivers on v3 so they can chime
in on the API design. (Should've done that on v1 really, but I
forgot. Mea culpa.)
-ed
next prev parent reply other threads:[~2023-04-14 20:20 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-11 18:26 [RFC PATCH v2 net-next 0/7] ethtool: track custom RSS contexts in the core edward.cree
2023-04-11 18:26 ` [RFC PATCH v2 net-next 1/7] net: move ethtool-related netdev state into its own struct edward.cree
2023-04-11 20:37 ` Andrew Lunn
2023-04-13 1:36 ` Jakub Kicinski
2023-04-11 18:26 ` [RFC PATCH v2 net-next 2/7] net: ethtool: attach an IDR of custom RSS contexts to a netdevice edward.cree
2023-04-11 20:36 ` Andrew Lunn
2023-04-12 15:52 ` Edward Cree
2023-04-13 1:39 ` Jakub Kicinski
2023-04-11 18:26 ` [RFC PATCH v2 net-next 3/7] net: ethtool: record custom RSS contexts in the IDR edward.cree
2023-04-13 1:49 ` Jakub Kicinski
2023-06-09 20:01 ` Edward Cree
2023-04-11 18:26 ` [RFC PATCH v2 net-next 4/7] net: ethtool: let the core choose RSS context IDs edward.cree
2023-04-13 1:53 ` Jakub Kicinski
2023-04-11 18:26 ` [RFC PATCH v2 net-next 5/7] net: ethtool: add an extack parameter to new rxfh_context APIs edward.cree
2023-04-11 18:26 ` [RFC PATCH v2 net-next 6/7] net: ethtool: add a mutex protecting RSS contexts edward.cree
2023-04-11 20:40 ` Andrew Lunn
2023-04-12 16:16 ` Edward Cree
2023-04-12 17:15 ` Andrew Lunn
2023-04-12 17:42 ` Edward Cree
2023-04-13 2:06 ` Jakub Kicinski
2023-04-13 21:52 ` Edward Cree
2023-04-13 21:58 ` Andrew Lunn
2023-04-14 20:20 ` Edward Cree [this message]
2023-04-11 18:26 ` [RFC PATCH v2 net-next 7/7] sfc: use new rxfh_context API edward.cree
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=2122a8d2-9348-53ca-22f0-18f62109f1bb@gmail.com \
--to=ecree.xilinx@gmail.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=edward.cree@amd.com \
--cc=habetsm.xilinx@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-net-drivers@amd.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sudheer.mogilappagari@intel.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).