From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760182AbbJ3WLE (ORCPT ); Fri, 30 Oct 2015 18:11:04 -0400 Received: from a.ns.miles-group.at ([95.130.255.143]:11950 "EHLO radon.swed.at" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758454AbbJ3WLB (ORCPT ); Fri, 30 Oct 2015 18:11:01 -0400 Subject: Re: [PATCH net-next] hyperv: Add handler for RNDIS_STATUS_NETWORK_CHANGE event To: Haiyang Zhang , Vitaly Kuznetsov References: <06b508cbb6b949f4b3e13e7797948e56@DFM-DB3MBX15-06.exchange.corp.microsoft.com> <20140623131723.GA7026@aepfle.de> <5fb9ddebb68d456ab87979b5cc3830ec@DFM-DB3MBX15-06.exchange.corp.microsoft.com> <20140623.131018.1349792926453695313.davem@davemloft.net> <878u6ksjzg.fsf@vitty.brq.redhat.com> Cc: David Miller , "olaf@aepfle.de" , "jasowang@redhat.com" , "driverdev-devel@linuxdriverproject.org" , LKML , "netdev@vger.kernel.org" From: Richard Weinberger Message-ID: <5633EAEF.5030600@nod.at> Date: Fri, 30 Oct 2015 23:10:55 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am 30.10.2015 um 23:03 schrieb Haiyang Zhang: > > >> -----Original Message----- >> From: Vitaly Kuznetsov [mailto:vkuznets@redhat.com] >> Sent: Friday, October 30, 2015 6:56 AM >> To: Haiyang Zhang >> Cc: Richard Weinberger ; David Miller >> ; olaf@aepfle.de; jasowang@redhat.com; driverdev- >> devel@linuxdriverproject.org; LKML ; >> netdev@vger.kernel.org >> Subject: Re: [PATCH net-next] hyperv: Add handler for >> RNDIS_STATUS_NETWORK_CHANGE event >> >> Haiyang Zhang writes: >> >>>> -----Original Message----- >>>> From: Richard Weinberger [mailto:richard.weinberger@gmail.com] >>>> Sent: Tuesday, October 27, 2015 6:36 PM >>>> To: David Miller >>>> Cc: Haiyang Zhang ; olaf@aepfle.de; Greg >> Kroah- >>>> Hartman ; netdev@vger.kernel.org; jasowang@redhat.com; >>>> driverdev-devel@linuxdriverproject.org; LKML >>> kernel@vger.kernel.org> >>>> Subject: Re: [PATCH net-next] hyperv: Add handler for >>>> RNDIS_STATUS_NETWORK_CHANGE event >>>> >>>> On Mon, Jun 23, 2014 at 10:10 PM, David Miller >>>> wrote: >>>>> From: Haiyang Zhang >>>>> Date: Mon, 23 Jun 2014 16:09:59 +0000 >>>>> >>>>>> 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? >>>>> >>>>> No, you are not going to keep the usermodehelper invocation in your >>>> driver >>>>> please remove it. It is absolutely inappropriate, and I strictly >> do >>>> not want >>>>> to keep it in there because other people will copy it and then >> we'll >>>> have a >>>>> real mess on our hands. >>>> >>>> Sorry for digging up this old thread. >>>> While talking with some guys about usermodehelper abuses I came >> across >>>> this gem. >>>> Mainline still contains that "/etc/init.d/network restart" code. >>>> Haiyang, care to cleanup? >>> >>> Hi Richard and others, >>> >>> Thanks for the reminder. I will clean up the usermode helper. >>> >>> Do you have suggestions of trigger DHCP refresh from kernel mode? Any >>> sample code in the existing kernel code? >>> >> >> I think it's wrong to call dhcp refresh from kernel. What happens when >> we reconnect normal hardware adapter to another network? Link goes down >> and then up and userspace is supposed to react accordingly. I think we >> should emulate something similar for RNDIS_STATUS_NETWORK_CHANGE. > > When link is down physically for a few seconds, the DHCP will automatically > refresh. I will add code to emulate this. There were some discussions around > this and other possibilities previously... I agree emulating what happens > with physically plug/unplug a cable is a reasonable way to trigger the DHCP > refresh. Can't you propagate the event to userspace and let it take an appropriate action? Thanks, //richard