From: Leon Romanovsky <leon@kernel.org>
To: Jason Gunthorpe <jgg@nvidia.com>
Cc: Jakub Kicinski <kuba@kernel.org>,
davem@davemloft.net, netdev@vger.kernel.org, edumazet@google.com,
pabeni@redhat.com, johannes@sipsolutions.net,
pablo@netfilter.org, laforge@gnumonks.org, Jason@zx2c4.com
Subject: Re: [RFC net-next] net: add ndo_alloc_and_init and ndo_release to replace priv_destructor
Date: Fri, 13 May 2022 08:47:28 +0300 [thread overview]
Message-ID: <Yn3w8M3PuKUdzQYI@unreal> (raw)
In-Reply-To: <20220511234328.GO49344@nvidia.com>
On Wed, May 11, 2022 at 08:43:28PM -0300, Jason Gunthorpe wrote:
> On Wed, May 11, 2022 at 12:12:18PM -0700, Jakub Kicinski wrote:
> > Old API
<...>
> I would be happier if netdev was more like everything else and allowed
> a clean alloc/free vs register/unregister pairing. The usual lifecycle
> model cast to netdev terms would have the release function set around
> alloc_netdev and always called once at free_netdev.
>
> The caller should set the ops and release function after it has
> completed initializing whatever its release will undo, similare to how
> device_initialize()/put_device works.
Exactly, it will give much clearer picture of netdev life cycle than it
is now.
Thanks
prev parent reply other threads:[~2022-05-13 5:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-11 19:12 [RFC net-next] net: add ndo_alloc_and_init and ndo_release to replace priv_destructor Jakub Kicinski
2022-05-11 21:11 ` Jakub Kicinski
2022-05-11 23:43 ` Jason Gunthorpe
2022-05-13 5:47 ` Leon Romanovsky [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=Yn3w8M3PuKUdzQYI@unreal \
--to=leon@kernel.org \
--cc=Jason@zx2c4.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jgg@nvidia.com \
--cc=johannes@sipsolutions.net \
--cc=kuba@kernel.org \
--cc=laforge@gnumonks.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pablo@netfilter.org \
/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