From: Jakub Kicinski <kuba@kernel.org>
To: Edward Cree <ecree.xilinx@gmail.com>
Cc: 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 net-next 3/6] net: ethtool: let the core choose RSS context IDs
Date: Tue, 4 Apr 2023 16:42:41 -0700 [thread overview]
Message-ID: <20230404164241.5142d44b@kernel.org> (raw)
In-Reply-To: <ecd752db-ff2a-6948-2ff8-531343f80696@gmail.com>
On Tue, 4 Apr 2023 13:14:39 +0100 Edward Cree wrote:
> > Would it be easier to pass struct ethtool_rxfh_context instead of
> > doing it field by field? Otherwise Intel will need to add more
> > arguments and touch all drivers. Or are you thinking that they should
> > use a separate callback for the "RR RSS" or whatever their thing is?
>
> Initially I tried to just pass in ctx with the new values already
> filled in. But that breaks if the op fails; we have to leave the
> old values in ctx. We maybe could create a second, ephemeral
> struct ethtool_rxfh_context to pass the new values in, but then
> we have to worry about which one's priv the driver uses.
> (We can't e.g. just pass in the ephemeral one, and copy its priv
> across when we update the real ctx after the op returns, because
> what if the driver stores, say, a list_head in its priv?)
>
> And if we did pass a struct wrapping indir, key and hfunc, then
> any patch adding more fields to it would need existing drivers
> to check the new fields were unused / set to NO_CHANGE.
>
> So I think we just have to accept that new fields will mean
> changing all drivers. (There's only half a dozen, anyway.)
> And doing that through the op arguments means the compiler will
> catch any driver that hasn't been updated, rather than the
> driver potentially silently ignoring the new field.
Fair point with needing to copy in case of error, okay :(
next prev parent reply other threads:[~2023-04-04 23:42 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-03 16:32 [RFC PATCH net-next 0/6] ethtool: track custom RSS contexts in the core edward.cree
2023-04-03 16:32 ` [RFC PATCH net-next 1/6] net: ethtool: attach an IDR of custom RSS contexts to a netdevice edward.cree
2023-04-03 21:43 ` Jakub Kicinski
2023-04-04 11:30 ` Edward Cree
2023-04-04 23:36 ` Jakub Kicinski
2023-04-03 16:32 ` [RFC PATCH net-next 2/6] net: ethtool: record custom RSS contexts in the IDR edward.cree
2023-04-03 21:48 ` Jakub Kicinski
2023-04-04 11:49 ` Edward Cree
2023-04-04 23:40 ` Jakub Kicinski
2023-04-05 9:34 ` Edward Cree
2023-04-06 9:07 ` Dan Carpenter
2023-04-06 15:45 ` Edward Cree
2023-04-03 16:33 ` [RFC PATCH net-next 3/6] net: ethtool: let the core choose RSS context IDs edward.cree
2023-04-03 21:54 ` Jakub Kicinski
2023-04-04 12:14 ` Edward Cree
2023-04-04 23:42 ` Jakub Kicinski [this message]
2023-04-03 16:33 ` [RFC PATCH net-next 4/6] net: ethtool: pass ctx_priv and create into .set_rxfh_context edward.cree
2023-04-11 19:45 ` kernel test robot
2023-04-03 16:33 ` [RFC PATCH net-next 5/6] net: ethtool: add a mutex protecting RSS contexts edward.cree
2023-04-03 22:03 ` Jakub Kicinski
2023-04-04 12:32 ` Edward Cree
2023-04-04 23:46 ` Jakub Kicinski
2023-04-03 16:33 ` [RFC PATCH net-next 6/6] sfc: use new .set_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=20230404164241.5142d44b@kernel.org \
--to=kuba@kernel.org \
--cc=davem@davemloft.net \
--cc=ecree.xilinx@gmail.com \
--cc=edumazet@google.com \
--cc=edward.cree@amd.com \
--cc=habetsm.xilinx@gmail.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.