From: Edward Cree <ecree.xilinx@gmail.com>
To: YiFei Zhu <zhuyifei@google.com>,
Martin Habets <habetsm.xilinx@gmail.com>,
netdev@vger.kernel.org
Cc: Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
linux-net-drivers@amd.com, Willem de Bruijn <willemb@google.com>,
Mina Almasry <almasrymina@google.com>
Subject: Re: [PATCH v2 net-next] sfc: Use netdev refcount tracking in struct efx_async_filter_insertion
Date: Wed, 18 Dec 2024 10:09:48 +0000 [thread overview]
Message-ID: <3280aeeb-bddc-ee1f-b33b-eab95a91084d@gmail.com> (raw)
In-Reply-To: <20241217224717.1711626-1-zhuyifei@google.com>
On 17/12/2024 22:47, YiFei Zhu wrote:
> I was debugging some netdev refcount issues in OpenOnload, and one
> of the places I was looking at was in the sfc driver. Only
> struct efx_async_filter_insertion was not using netdev refcount tracker,
> so add it here. GFP_ATOMIC because this code path is called by
> ndo_rx_flow_steer which holds RCU.
>
> This patch should be a no-op if !CONFIG_NET_DEV_REFCNT_TRACKER
>
> Signed-off-by: YiFei Zhu <zhuyifei@google.com>
> ---
> v1 -> v2:
> - Documented the added field of @net_dev_tracker in the struct
Please do not post new versions of a patch within 24 hours, see
https://docs.kernel.org/process/maintainer-netdev.html#resending-after-review
> @@ -989,7 +989,7 @@ int efx_filter_rfs(struct net_device *net_dev, const struct sk_buff *skb,
> }
>
> /* Queue the request */
> - dev_hold(req->net_dev = net_dev);
> + netdev_hold(req->net_dev = net_dev, &req->net_dev_tracker, GFP_ATOMIC);
This line becomes sufficiently complex that the assignment to
req->net_dev should be separated out into its own statement.
(And the same thing in the siena equivalent.)
Other than that the direction of this patch looks okay. Have you
tested it with the kconfig enabled?
next prev parent reply other threads:[~2024-12-18 10:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-17 22:47 [PATCH v2 net-next] sfc: Use netdev refcount tracking in struct efx_async_filter_insertion YiFei Zhu
2024-12-18 10:09 ` Edward Cree [this message]
2024-12-18 21:54 ` YiFei Zhu
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=3280aeeb-bddc-ee1f-b33b-eab95a91084d@gmail.com \
--to=ecree.xilinx@gmail.com \
--cc=almasrymina@google.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.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=willemb@google.com \
--cc=zhuyifei@google.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).