[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <26b7bfd9-c438-2170-5300-7eb8dacd749e@intel.com>
Date: Fri, 6 Jan 2023 09:06:01 -0800
From: Jacob Keller <jacob.e.keller@...el.com>
To: Jakub Kicinski <kuba@...nel.org>, <davem@...emloft.net>
CC: <netdev@...r.kernel.org>, <edumazet@...gle.com>,
<pabeni@...hat.com>, <jiri@...nulli.us>
Subject: Re: [PATCH net-next 0/9] devlink: remove the wait-for-references on
unregister
On 1/5/2023 10:33 PM, Jakub Kicinski wrote:
> Move the registration and unregistration of the devlink instances
> under their instance locks. Don't perform the netdev-style wait
> for all references when unregistering the instance.
>
> Instead the devlink instance refcount will only ensure that
> the memory of the instance is not freed. All places which acquire
> access to devlink instances via a reference must check that the
> instance is still registered under the instance lock.
>
> This fixes the problem of the netdev code accessing devlink
> instances before they are registered.
>
> RFC: https://lore.kernel.org/all/20221217011953.152487-1-kuba@kernel.org/
> - rewrite the cover letter
> - rewrite the commit message for patch 1
> - un-export and rename devl_is_alive
> - squash the netdevsim patches
>
> Jakub Kicinski (9):
> devlink: bump the instance index directly when iterating
> devlink: update the code in netns move to latest helpers
> devlink: protect devlink->dev by the instance lock
> devlink: always check if the devlink instance is registered
> devlink: remove the registration guarantee of references
> devlink: don't require setting features before registration
> devlink: allow registering parameters after the instance
> netdevsim: rename a label
> netdevsim: move devlink registration under the instance lock
>
> drivers/net/netdevsim/dev.c | 15 +++--
> include/net/devlink.h | 2 +
> net/devlink/core.c | 121 ++++++++++++++++--------------------
> net/devlink/devl_internal.h | 28 ++++-----
> net/devlink/leftover.c | 64 ++++++++++++-------
> net/devlink/netlink.c | 19 ++++--
> 6 files changed, 137 insertions(+), 112 deletions(-)
>
The whole series looks good to me. It looks like Jiri also has some
planned followups that will clean some of this up even more, which is great.
Reviewed-by: Jacob Keller <jacob.e.keller@...el.com>
Powered by blists - more mailing lists