netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matteo Croce <mcroce@redhat.com>
To: David Ahern <dsahern@gmail.com>
Cc: netdev <netdev@vger.kernel.org>,
	Stephen Hemminger <stephen@networkplumber.org>,
	David Ahern <dsahern@kernel.org>
Subject: Re: [PATCH iproute2 v2 0/3] refactor the cmd_exec()
Date: Sat, 15 Jun 2019 16:06:38 +0200	[thread overview]
Message-ID: <CAGnkfhwH-4+Ov+QRBZaQaHnnbTczpavuV8_yJBg=GOHSLD0pQw@mail.gmail.com> (raw)
In-Reply-To: <11cdc79f-a8c9-e41f-ac4d-4906b358e845@gmail.com>

On Fri, Jun 14, 2019 at 4:36 PM David Ahern <dsahern@gmail.com> wrote:
>
> On 6/11/19 10:10 AM, Matteo Croce 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:
> >
>
> This breaks the vrf reset after namespace switch
>
>
> # ip vrf ls
> Name              Table
> -----------------------
> red               1001
>
> Set shell into vrf red context:
> # ip vrf exec red bash
>
> Add new namespace and do netns exec:
> # ip netns  add foo
> # ./ip netns exec foo bash
>
> Check the vrf id:
> # ip vrf id
> red
>
> With the current command:
> # ip netns exec foo bash
> # ip vrf id
> <nothing - no vrf bind>

Hi David,

if the vrf needs to be reset after a netns change, why don't we do in
netns_switch()?
This way all code paths will be covered.

Cheers,
-- 
Matteo Croce
per aspera ad upstream

  reply	other threads:[~2019-06-15 14:07 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-11 16:10 [PATCH iproute2 v2 0/3] refactor the cmd_exec() Matteo Croce
2019-06-11 16:10 ` [PATCH iproute2 v2 1/3] netns: switch netns in the child when executing commands Matteo Croce
2019-06-11 16:10 ` [PATCH iproute2 v2 2/3] ip vrf: use hook to change VRF in the child Matteo Croce
2019-06-11 16:10 ` [PATCH iproute2 v2 3/3] netns: make netns_{save,restore} static Matteo Croce
2019-06-13 17:07 ` [PATCH iproute2 v2 0/3] refactor the cmd_exec() Andrea Claudi
2019-06-14 14:35 ` David Ahern
2019-06-15 14:06   ` Matteo Croce [this message]
2019-06-17 22:20     ` Matteo Croce
2019-06-17 22:24       ` David Ahern
2019-06-18 14:49 Matteo Croce
2019-06-18 15:41 ` Matteo Croce
2019-06-20 21:31 ` Stephen Hemminger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAGnkfhwH-4+Ov+QRBZaQaHnnbTczpavuV8_yJBg=GOHSLD0pQw@mail.gmail.com' \
    --to=mcroce@redhat.com \
    --cc=dsahern@gmail.com \
    --cc=dsahern@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).