public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Nicolas Dichtel <nicolas.dichtel@6wind.com>
To: Cong Wang <xiyou.wangcong@gmail.com>
Cc: David Miller <davem@davemloft.net>,
	Linux Kernel Network Developers <netdev@vger.kernel.org>,
	Hongjun Li <hongjun.li@6wind.com>
Subject: Re: [PATCH net] ip[6]: don't register inet[6]dev when dev is down
Date: Thu, 6 Jul 2017 14:08:08 +0200	[thread overview]
Message-ID: <7238f160-2547-c51a-c8fe-bcbc5d774239@6wind.com> (raw)
In-Reply-To: <CAM_iQpUtniWmKAOGnjJ+d-cWeQkgEPhcwKFdMeVy49rCe2Sh5g@mail.gmail.com>

Le 06/07/2017 à 00:43, Cong Wang a écrit :
> On Wed, Jul 5, 2017 at 8:57 AM, Nicolas Dichtel
> <nicolas.dichtel@6wind.com> wrote:
>> When a device changes from one netns to another, it's first unregistered,
>> then the netns reference is updated and the dev is registered in the new
>> netns. Thus, when a slave moves to another netns, it is first
>> unregistered. This triggers a NETDEV_UNREGISTER event which is caught by
>> the bonding driver. The driver calls bond_release(), which calls
>> dev_set_mtu() and thus triggers NETDEV_CHANGEMTU (the device is still in
>> the old netns).
> 
> I think in this special case it is meaningless to send
> NETDEV_CHANGEMTU, because the device is dying within
> its old netns, who still cares about its mtu change?
> 
> Something like the attached patch...
Yes, your patch seems good and I hesitated with something like this.
But I don't see a valid case where the inet[6]dev must be created on a down
interface. I think the patch is valid, even with your patch.


Regards,
Nicolas

  reply	other threads:[~2017-07-06 12:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-05 15:57 [PATCH net] ip[6]: don't register inet[6]dev when dev is down Nicolas Dichtel
2017-07-05 22:43 ` Cong Wang
2017-07-06 12:08   ` Nicolas Dichtel [this message]
2017-07-06 18:16     ` Cong Wang
2017-07-07 12:39       ` Nicolas Dichtel
2017-07-08 18:56         ` Cong Wang
2017-07-10  8:20           ` Nicolas Dichtel
2017-07-08 10:02 ` David Miller
2017-07-08 18:44   ` Cong Wang
2017-07-10  8:19     ` Nicolas Dichtel

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=7238f160-2547-c51a-c8fe-bcbc5d774239@6wind.com \
    --to=nicolas.dichtel@6wind.com \
    --cc=davem@davemloft.net \
    --cc=hongjun.li@6wind.com \
    --cc=netdev@vger.kernel.org \
    --cc=xiyou.wangcong@gmail.com \
    /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