From: Eric Dumazet <edumazet@google.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: davem@davemloft.net, netdev@vger.kernel.org, pabeni@redhat.com,
dsahern@gmail.com
Subject: Re: [PATCH net-next 2/2] netpoll: allocate netdev tracker right away
Date: Fri, 9 Jun 2023 20:46:17 +0200 [thread overview]
Message-ID: <CANn89iKTjxqmAfa+HY3MX42aGezqgMQNGhJmfgTyaH+C+41Ebw@mail.gmail.com> (raw)
In-Reply-To: <20230609183207.1466075-3-kuba@kernel.org>
On Fri, Jun 9, 2023 at 8:32 PM Jakub Kicinski <kuba@kernel.org> wrote:
>
> Commit 5fa5ae605821 ("netpoll: add net device refcount tracker to struct netpoll")
> was part of one of the initial netdev tracker introduction patches.
> It added an explicit netdev_tracker_alloc() for netpoll, presumably
> because the flow of the function is somewhat odd.
> After most of the core networking stack was converted to use
> the tracking hold() variants, netpoll's call to old dev_hold()
> stands out a bit.
>
> np is allocated by the caller and ready to use, we can use
> netdev_hold() here, even tho np->ndev will only be set to
> ndev inside __netpoll_setup().
>
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> ---
>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Thanks.
prev parent reply other threads:[~2023-06-09 18:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-09 18:32 [PATCH net-next 0/2] net: create device lookup API with reference tracking Jakub Kicinski
2023-06-09 18:32 ` [PATCH net-next 1/2] " Jakub Kicinski
2023-06-09 18:50 ` Eric Dumazet
2023-06-09 19:16 ` Jakub Kicinski
2023-06-09 18:57 ` Eric Dumazet
2023-06-09 18:59 ` Eric Dumazet
2023-06-09 18:32 ` [PATCH net-next 2/2] netpoll: allocate netdev tracker right away Jakub Kicinski
2023-06-09 18:46 ` Eric Dumazet [this message]
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=CANn89iKTjxqmAfa+HY3MX42aGezqgMQNGhJmfgTyaH+C+41Ebw@mail.gmail.com \
--to=edumazet@google.com \
--cc=davem@davemloft.net \
--cc=dsahern@gmail.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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).