From: Edward Cree <ecree.xilinx@gmail.com>
To: Jakub Kicinski <kuba@kernel.org>, edward.cree@amd.com
Cc: 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 3/7] net: ethtool: record custom RSS contexts in the IDR
Date: Fri, 9 Jun 2023 21:01:33 +0100 [thread overview]
Message-ID: <bf7ba840-e876-eecb-8772-faa6aed6e7c7@gmail.com> (raw)
In-Reply-To: <20230412184927.63800565@kernel.org>
On 13/04/2023 02:49, Jakub Kicinski wrote:
> On Tue, 11 Apr 2023 19:26:11 +0100 edward.cree@amd.com wrote:
>> if (rxfh.rss_context)
>> ret = ops->set_rxfh_context(dev, indir, hkey, rxfh.hfunc,
>> &rxfh.rss_context, delete);
>> @@ -1350,6 +1377,40 @@ static noinline_for_stack int ethtool_set_rxfh(struct net_device *dev,
>> else if (rxfh.indir_size != ETH_RXFH_INDIR_NO_CHANGE)
>> dev->priv_flags |= IFF_RXFH_CONFIGURED;
>> }
>
> This is probably transient but I think we're potentially leaking @ctx
> in a goto out hiding inside the context here, and...
>
>> + /* Update rss_ctx tracking */
>> + if (create) {
>> + /* Ideally this should happen before calling the driver,
>> + * so that we can fail more cleanly; but we don't have the
>> + * context ID until the driver picks it, so we have to
>> + * wait until after.
>> + */
>> + if (WARN_ON(idr_find(&dev->ethtool->rss_ctx, rxfh.rss_context)))
>> + /* context ID reused, our tracking is screwed */
>> + goto out;
>
> here.
Wasn't entirely transient. Fixed for v3.
next prev parent reply other threads:[~2023-06-09 20:01 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 [this message]
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
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=bf7ba840-e876-eecb-8772-faa6aed6e7c7@gmail.com \
--to=ecree.xilinx@gmail.com \
--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 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.