Skip to content

refactor the cmd_exec()

Matteo Croce netdev 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest posting 2/23 patches 2 repliesIn review
  2. v2 posting 1/23 patches 5 repliesSuperseded
  3. v12 patches 4 repliesSuperseded

Patches in v2 posting 2/2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3netns: switch netns in the child when executing commandsinclude/utils.h ip/ipnetns.c ip/ipvrf.c +2 more+25 -470 replies
2/3ip vrf: use hook to change VRF in the childip/ipvrf.c+8 -40 replies
3/3netns: make netns_{save,restore} staticinclude/namespace.h ip/ip.c ip/ipnetns.c +1 more+31 -340 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH iproute2 v2 0/3] refactor the cmd_exec()

Refactor the netns and ipvrf code so less steps are needed to exec commands in a netns or a VRF context.
Also remove some code which became dead. bloat-o-meter shows a tiny saving.

Matteo Croce (3):
netns: switch netns in the child when executing commands ip vrf: use hook to change VRF in the child
netns: make netns_{save,restore} static

 include/namespace.h |  2 --
 include/utils.h     |  6 ++---
 ip/ip.c             |  1 -
 ip/ipnetns.c        | 61 ++++++++++++++++++++++++++++++++++-----------
 ip/ipvrf.c          | 12 ++++++---
 lib/exec.c          |  7 +++++-
 lib/namespace.c     | 31 -----------------------
 lib/utils.c         | 27 --------------------
 8 files changed, 63 insertions(+), 84 deletions(-)
Signature · 1 line
2.21.0