Skip to content

net: create device lookup API with reference tracking

Jakub Kicinski netdev 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 9 repliesIn review 1 of 2 applied
  2. v12 patches 5 repliesSuperseded

Changes in v2 from the cover letter

- fix a dev_put() in ethtool
v1: https://lore.kernel.org/all/[email protected]/

Patches in v2 1 of 2 applied

#Subject and filesSizeRepliesApplied
1/2net: create device lookup API with reference trackinginclude/linux/netdevice.h net/core/dev.c net/ethtool/netlink.c +1 more+66 -354 replies
2/2netpoll: allocate netdev tracker right awaynet/core/netpoll.c+2 -30 repliesApplied

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchEric DumazetDavid Ahern
1/2R-b R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH net-next v2 0/2] net: create device lookup API with reference tracking

We still see dev_hold() / dev_put() calls without reference tracker getting added in 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.

v2:
- fix a dev_put() in ethtool
v1: https://lore.kernel.org/all/[email protected]/

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     | 10 +++---
 net/ipv6/route.c          | 12 +++----
 5 files changed, 68 insertions(+), 38 deletions(-)
Signature · 1 line
2.40.1