Re: [PATCH net-next] hyperv: Add handler for RNDIS_STATUS_NETWORK_CHANGE event

5 views
Skip to first unread message

Olaf Hering

unread,
Jun 23, 2014, 4:06:56 AM6/23/14
to Haiyang Zhang, Greg KH, net...@vger.kernel.org, jaso...@redhat.com, driverd...@linuxdriverproject.org, linux-...@vger.kernel.org, da...@davemloft.net
On Fri, Jun 20, Haiyang Zhang wrote:

> This command ("/etc/init.d/network restart") exists on our supported distros
> currently. We will also look into some better ways to refresh the network for
> the distros without this command. I have tried setting IF_OPER_DORMANT then
> IF_OPER_UP, but not working. I will look into the suspend/resume cycle as
> well.

I think its reasonable to expect guest config changes on this new kind
of host. Would a link-down/link-up event work? I'm sure it will, there
is enough code floating around in the guests which handles cable unplug.

Olaf
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majo...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Olaf Hering

unread,
Jun 23, 2014, 9:23:42 AM6/23/14
to Haiyang Zhang, Greg KH, net...@vger.kernel.org, jaso...@redhat.com, driverd...@linuxdriverproject.org, linux-...@vger.kernel.org, da...@davemloft.net
On Mon, Jun 23, Haiyang Zhang wrote:

> > I think its reasonable to expect guest config changes on this new kind
> > of host. Would a link-down/link-up event work? I'm sure it will, there
> > is enough code floating around in the guests which handles cable unplug.
>
> Do you mean netif_carrier_off() / netif_carrier_on()? They are already
> called in the code before this patch, but DHCP renew is not triggered by
> them.

I do not know how to simulate a cable unplug. The point is that calling
/etc/init.d/network will fail, at least in SLES12.
Maybe some sort of "DHCP refresh required" event is required?
Maybe the DHCP clients need to renew on cable unplug?
No idea what the solution to the issue really is.

Olaf Hering

unread,
Jun 23, 2014, 12:31:21 PM6/23/14
to Haiyang Zhang, Greg KH, net...@vger.kernel.org, jaso...@redhat.com, driverd...@linuxdriverproject.org, linux-...@vger.kernel.org, da...@davemloft.net
On Mon, Jun 23, Haiyang Zhang wrote:

> I have tried some possibilities, like IF_OPER_DORMANT then IF_OPER_UP with
> netdev_state_change() etc. but not able to trigger DHCP review. I will look at this
> further...

Is there a link down/up event anyway?
If the interface is configured to "on hotplug" or "on cable plugged in"
or whatever the setting name is, the network scripts should do
something. Even if its not a DHCP renew.

> So, what's the equivalent or similar command to "network restart" on SLES12? Could
> you update the command line for the usermodehelper when porting this patch to SLES
> 12?

I see a /sbin/rcnetwork in SLES, which links either to
'/etc/init.d/network' or 'service'. This could be used as a quick
workaround.

Olaf Hering

unread,
Jun 26, 2014, 4:59:25 AM6/26/14
to Haiyang Zhang, Greg KH, net...@vger.kernel.org, jaso...@redhat.com, driverd...@linuxdriverproject.org, linux-...@vger.kernel.org, da...@davemloft.net
On Mon, Jun 23, Haiyang Zhang wrote:

> Yes, there is a link down/up event from the host, we currently call netif_carrier_off()
> / netif_carrier_on() with these events. Will hotplug scripts be triggered by
> netif_carrier_off/on? Where are the scripts located at (SLES)?

In /etc/sysconfig/network/ifcfg-eth0 STARTMODE= should be set to
"ifplugd", this will most likely fix this sort of setup.
Reply all
Reply to author
Forward
0 new messages