Skip to content

net: add debugfs files for showing netns refcount tracking info

Jeff Layton lkml netdev 2 versions – In review

Get series with b4
b4 am [email protected] change-id 20250324-netns-debugfs-df213b2ab9ce

Versions newest first

  1. v2 Latest2 patches 13 repliesIn review
  2. v11 patch 5 repliesSuperseded

Changes in v2 from the cover letter

- add top-level ref_tracker directory in debugfs, and move net_ns directory under it
- Link to v1: https://lore.kernel.org/r/[email protected]

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2ref_tracker: add a top level debugfs directory for ref_trackerinclude/linux/ref_tracker.h lib/ref_tracker.c+18 -02 replies
2/2net: add debugfs files for showing netns refcount tracking infonet/core/net_namespace.c+151 -011 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchKuniyuki Iwashima
1/2R-b
2/2

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 v2 0/2] net: add debugfs files for showing netns refcount tracking info

Recently, I had a need to track down some long-held netns references, and discovered CONFIG_NET_NS_REFCNT_TRACKER. The main thing that seemed to be missing from it though is a simple way to view the currently held references on the netns. This adds files in debugfs for this.

Eric, I didn't incorporate your proposed patch to limit how long this code spends in ref_tracker_dir_snprint(), as it didn't apply properly. If you send that as a formal patch, or point me at a branch to base this on, I can rebase this series on top.

---
Changes in v2:
- add top-level ref_tracker directory in debugfs, and move net_ns directory under it
- Link to v1: https://lore.kernel.org/r/[email protected]

---
Jeff Layton (2):
ref_tracker: add a top level debugfs directory for ref_tracker
net: add debugfs files for showing netns refcount tracking info

 include/linux/ref_tracker.h |   3 +
 lib/ref_tracker.c           |  15 +++++
 net/core/net_namespace.c    | 151 ++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 169 insertions(+)

---
base-commit: 695caca9345a160ecd9645abab8e70cfe849e9ff
change-id: 20250324-netns-debugfs-df213b2ab9ce

Best regards,

Signature · 1 line
Jeff Layton <[email protected]>