Skip to content

Ease to interpret net-nsid

Nicolas Dichtel netdev 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest5 patches 1 replyIn review
  2. v35 patches 1 replySuperseded
  3. v25 patches 6 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v14 patches7 repliesSuperseded

Changes in v4 from the cover letter

- patch 5/5: fix imbalance lock in error path

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5netns: remove net arg from rtnl_net_fill()net/core/net_namespace.c+4 -60 replies
2/5netns: introduce 'struct net_fill_args'net/core/net_namespace.c+34 -140 replies
3/5netns: add support of NETNSA_TARGET_NSIDinclude/uapi/linux/net_namespace.h net/core/net_namespace.c+76 -110 replies
4/5netns: enable to specify a nsid for a get requestnet/core/net_namespace.c+5 -00 replies
5/5netns: enable to dump full nsid translation tableinclude/uapi/linux/net_namespace.h net/core/net_namespace.c+27 -60 replies

Reviews trailers per patch

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

PatchDavid Ahern
1/5R-b
2/5R-b
3/5R-b
4/5R-b
5/5R-b

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

Read the v4 thread

Cover letter [PATCH net-next v4 0/5] Ease to interpret net-nsid

The goal of this series is to ease the interpretation of nsid received in netlink messages from other netns (when the user uses NETLINK_F_LISTEN_ALL_NSID).

After this series, with a patched iproute2:

$ ip netns add foo
$ ip netns add bar
$ touch /var/run/netns/init_net
$ mount --bind /proc/1/ns/net /var/run/netns/init_net
$ ip netns set init_net 11
$ ip netns set foo 12
$ ip netns set bar 13
$ ip netns
init_net (id: 11)
bar (id: 13)
foo (id: 12)
$ ip -n foo netns set init_net 21
$ ip -n foo netns set foo 22
$ ip -n foo netns set bar 23
$ ip -n foo netns
init_net (id: 21)
bar (id: 23)
foo (id: 22)
$ ip -n bar netns set init_net 31
$ ip -n bar netns set foo 32
$ ip -n bar netns set bar 33
$ ip -n bar netns
init_net (id: 31)
bar (id: 33)
foo (id: 32)
$ ip netns list-id target-nsid 12
nsid 21 current-nsid 11 (iproute2 netns name: init_net)
nsid 22 current-nsid 12 (iproute2 netns name: foo)
nsid 23 current-nsid 13 (iproute2 netns name: bar)
$ ip -n bar netns list-id target-nsid 32 nsid 31
nsid 21 current-nsid 31 (iproute2 netns name: init_net)

v3 -> v4:
- patch 5/5: fix imbalance lock in error path

v2 -> v3:
- patch 5/5: account NETNSA_CURRENT_NSID in rtnl_net_get_size()

v1 -> v2:
- patch 1/5: remove net from struct rtnl_net_dump_cb
- patch 2/5: new in this version
- patch 3/5: use a bool to know if rtnl_get_net_ns_capable() was called
- patch 5/5: use struct net_fill_args

 include/uapi/linux/net_namespace.h |   2 +
 net/core/net_namespace.c           | 159 +++++++++++++++++++++++++++++++------
 2 files changed, 135 insertions(+), 26 deletions(-)

Comments are welcomed,
Regards,
Nicolas