[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Yn3w8M3PuKUdzQYI@unreal>
Date: Fri, 13 May 2022 08:47:28 +0300
From: Leon Romanovsky <leon@...nel.org>
To: Jason Gunthorpe <jgg@...dia.com>
Cc: Jakub Kicinski <kuba@...nel.org>, davem@...emloft.net,
netdev@...r.kernel.org, edumazet@...gle.com, pabeni@...hat.com,
johannes@...solutions.net, pablo@...filter.org,
laforge@...monks.org, Jason@...c4.com
Subject: Re: [RFC net-next] net: add ndo_alloc_and_init and ndo_release to
replace priv_destructor
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
Powered by blists - more mailing lists