mbox series

[iproute2,v2,0/3] refactor the cmd_exec()

Message ID 20190618144935.31405-1-mcroce@redhat.com
Headers show
Series refactor the cmd_exec() | expand

Message

Matteo Croce June 18, 2019, 2:49 p.m. UTC
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(-)

Comments

Matteo Croce June 18, 2019, 3:41 p.m. UTC | #1
On Tue, Jun 18, 2019 at 4:49 PM Matteo Croce <mcroce@redhat.com> wrote:
>
> 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(-)
>
> --
> 2.21.0
>

Hi all,

this should really be the v3, I did an off-by-one.

Sorry,
Stephen Hemminger June 20, 2019, 9:31 p.m. UTC | #2
On Tue, 18 Jun 2019 16:49:32 +0200
Matteo Croce <mcroce@redhat.com> wrote:

> 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(-)
> 

Ok, applied.