[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPpH65yOS8OKX1cUDtvjVHwXSTEifbCGXQhMUKg9R-aEbMNnWQ@mail.gmail.com>
Date: Thu, 13 Jun 2019 19:07:20 +0200
From: Andrea Claudi <aclaudi@...hat.com>
To: Matteo Croce <mcroce@...hat.com>
Cc: netdev@...r.kernel.org,
Stephen Hemminger <stephen@...workplumber.org>,
David Ahern <dsahern@...nel.org>
Subject: Re: [PATCH iproute2 v2 0/3] refactor the cmd_exec()
On Tue, Jun 11, 2019 at 6:11 PM Matteo Croce <mcroce@...hat.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 output:
>
> $ bloat-o-meter ip.old ip
> add/remove: 1/4 grow/shrink: 3/4 up/down: 174/-312 (-138)
> Function old new delta
> netns_add 971 1058 +87
> cmd_exec 207 256 +49
> on_netns_exec 32 60 +28
> do_switch - 10 +10
> netns_restore 69 67 -2
> do_ipvrf 811 802 -9
> netns_switch 838 822 -16
> on_netns_label 45 - -45
> do_netns 1226 1180 -46
> do_each_netns 57 - -57
> on_netns 60 - -60
> netns_save 77 - -77
> Total: Before=668234, After=668096, chg -0.02%
>
> 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 | 56 +++++++++++++++++++++++++++++++++------------
> ip/ipvrf.c | 12 ++++++----
> lib/exec.c | 7 +++++-
> lib/namespace.c | 31 -------------------------
> lib/utils.c | 27 ----------------------
> 8 files changed, 58 insertions(+), 84 deletions(-)
>
> --
> 2.21.0
>
For patch series:
Reviewed-and-tested-by: Andrea Claudi <aclaudi@...hat.com>
Powered by blists - more mailing lists