From: Jay Vosburgh <fubar@us.ibm.com>
To: =?UTF-8?B?Tmljb2xhcyBkZSBQZXNsb8O8YW4=?= <nicolas.2p.debian@gmail.com>
Cc: =?UTF-8?B?TWljaGHFgiBHw7Nybnk=?= <mgorny@gentoo.org>,
netdev@vger.kernel.org, roy@marples.name,
"Andy Gospodarek" <andy@greyhouse.net>
Subject: Re: The bonding driver should notify userspace of MAC address change
Date: Fri, 15 Apr 2011 14:45:32 -0700 [thread overview]
Message-ID: <16422.1302903932@death> (raw)
In-Reply-To: <4DA89ADC.7040808@gmail.com>
Nicolas de Pesloüan <nicolas.2p.debian@gmail.com> wrote:
>Agreed.
>
>> Is there some race window there between the register and the
>> netif_carrier_off?
>
>It might be that dhcpd does not wait for link to be up before starting to send DHCP requests.
It looks like it's not related to carrier state at all:
#212: dhcpcd requires restart to get an IP address for bonded interface
-----------------------+-----------------
Reporter: mgorny@… | Owner: roy
Type: defect | Status: new
Priority: major | Milestone:
Component: dhcpcd | Version: 5.1
Resolution: | Keywords:
-----------------------+-----------------
Comment (by roy):
Sorry, the above isn't too clear.
dhcpcd will read the hardware address when the interface is marked IFF_UP
or when given RTM_NEWLINK with ifi->ifi_change = ~0U, the latter being
sent by some drivers to tell userland that an interface characteristic has
changed - like say a hardware address - if the driver supports such a
change whilst still up. Normal behaviour is to mark device as DOWN before
changing hardware address. bonding does this whilst marked UP, hence this
issue.
carrier going up / down is just that, it's not a signal to re-read the
interface characteristics.
Now this confuses me again; I thought that running the dhcp
client (dhcpcd) over bonding has worked for years, although I've not
personally tried it recently. Perhaps it varies by distro. In any
event, this behavior of bonding (setting the bond's MAC without a
down/up flip) has never been different in my memory.
I've not yet dug down to see if NETDEV_CHANGEADDR will result in
an RTM_NEWLINK to user space. At first glance it doesn't look like it.
When bonding goes link up, however, I think linkwatch_do_dev
will issue an RTM_NEWLINK (via a call to netdev_state_change), or,
alternately, dev_change_flags will do it at IFF_UP time.
-J
---
-Jay Vosburgh, IBM Linux Technology Center, fubar@us.ibm.com
next prev parent reply other threads:[~2011-04-15 21:45 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-15 16:44 The bonding driver should notify userspace of MAC address change Michał Górny
2011-04-15 18:40 ` Nicolas de Pesloüan
2011-04-15 18:53 ` Jay Vosburgh
2011-04-15 19:10 ` [RFC net-next] bonding: notify when bonding device address changes Stephen Hemminger
2011-04-15 19:28 ` Jay Vosburgh
2011-04-16 16:18 ` Stephen Hemminger
2011-04-15 19:12 ` The bonding driver should notify userspace of MAC address change Phil Oester
2011-04-15 19:22 ` Jay Vosburgh
2011-04-15 19:22 ` Nicolas de Pesloüan
2011-04-15 21:45 ` Jay Vosburgh [this message]
2011-04-16 9:07 ` Nicolas de Pesloüan
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=16422.1302903932@death \
--to=fubar@us.ibm.com \
--cc=andy@greyhouse.net \
--cc=mgorny@gentoo.org \
--cc=netdev@vger.kernel.org \
--cc=nicolas.2p.debian@gmail.com \
--cc=roy@marples.name \
/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).