netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/2] net: create device lookup API with reference tracking
@ 2023-06-09 18:32 Jakub Kicinski
  2023-06-09 18:32 ` [PATCH net-next 1/2] " Jakub Kicinski
  2023-06-09 18:32 ` [PATCH net-next 2/2] netpoll: allocate netdev tracker right away Jakub Kicinski
  0 siblings, 2 replies; 8+ messages in thread
From: Jakub Kicinski @ 2023-06-09 18:32 UTC (permalink / raw)
  To: edumazet; +Cc: davem, netdev, pabeni, dsahern, Jakub Kicinski

We still see dev_hold() / dev_put() calls without reference tracker
getting added in the new code. dev_get_by_name() / dev_get_by_index()
seem to be one of the sources of those. Provide appropriate helpers.
Allocating the tracker can obviously be done with an additional call
to netdev_tracker_alloc(), but a single API feels cleaner.

Eric, LMK if you prefer to keep the current flow, maybe it's just me.

Jakub Kicinski (2):
  net: create device lookup API with reference tracking
  netpoll: allocate netdev tracker right away

 include/linux/netdevice.h |  4 +++
 net/core/dev.c            | 75 ++++++++++++++++++++++++++-------------
 net/core/netpoll.c        |  5 ++-
 net/ethtool/netlink.c     |  8 ++---
 net/ipv6/route.c          | 12 +++----
 5 files changed, 67 insertions(+), 37 deletions(-)

-- 
2.40.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-06-09 19:16 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).