From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755077AbbLAUED (ORCPT ); Tue, 1 Dec 2015 15:04:03 -0500 Received: from shards.monkeyblade.net ([149.20.54.216]:56434 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751837AbbLAUEB (ORCPT ); Tue, 1 Dec 2015 15:04:01 -0500 Date: Tue, 01 Dec 2015 15:03:59 -0500 (EST) Message-Id: <20151201.150359.1001330212099906860.davem@davemloft.net> To: vkuznets@redhat.com Cc: netdev@vger.kernel.org, kys@microsoft.com, haiyangz@microsoft.com, linux-kernel@vger.kernel.org, devel@linuxdriverproject.org Subject: Re: [PATCH net-next] hv_netvsc: rework link status change handling From: David Miller In-Reply-To: <1448620795-8572-1-git-send-email-vkuznets@redhat.com> References: <1448620795-8572-1-git-send-email-vkuznets@redhat.com> X-Mailer: Mew version 6.6 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Tue, 01 Dec 2015 12:04:01 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Vitaly Kuznetsov Date: Fri, 27 Nov 2015 11:39:55 +0100 > There are several issues in hv_netvsc driver with regards to link status > change handling: > - RNDIS_STATUS_NETWORK_CHANGE results in calling userspace helper doing > '/etc/init.d/network restart' and this is inappropriate and broken for > many reasons. > - link_watch infrastructure only sends one notification per second and > in case of e.g. paired disconnect/connect events we get only one > notification with last status. This makes it impossible to handle such > situations in userspace. > > Redo link status changes handling in the following way: > - Create a list of reconfig events in network device context. > - On a reconfig event add it to the list of events and schedule > netvsc_link_change(). > - In netvsc_link_change() ensure 2-second delay between link status > changes. > - Handle RNDIS_STATUS_NETWORK_CHANGE as a paired disconnect/connect event. > > Signed-off-by: Vitaly Kuznetsov Applied, thank you.