From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1425047AbcFHSc0 (ORCPT ); Wed, 8 Jun 2016 14:32:26 -0400 Received: from shards.monkeyblade.net ([149.20.54.216]:38371 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1424472AbcFHScY (ORCPT ); Wed, 8 Jun 2016 14:32:24 -0400 Date: Wed, 08 Jun 2016 11:32:20 -0700 (PDT) Message-Id: <20160608.113220.1066436035256605334.davem@davemloft.net> To: vkuznets@redhat.com Cc: netdev@vger.kernel.org, devel@linuxdriverproject.org, linux-kernel@vger.kernel.org, kys@microsoft.com, haiyangz@microsoft.com Subject: Re: [PATCH net-next v2] netvsc: get rid of completion timeouts From: David Miller In-Reply-To: <1465406261-20233-1-git-send-email-vkuznets@redhat.com> References: <1465406261-20233-1-git-send-email-vkuznets@redhat.com> X-Mailer: Mew version 6.7 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]); Wed, 08 Jun 2016 11:32:21 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Vitaly Kuznetsov Date: Wed, 8 Jun 2016 19:17:41 +0200 > I'm hitting 5 second timeout in rndis_filter_set_rss_param() while setting > RSS parameters for the device. When this happens we end up returning > -ETIMEDOUT from the function and rndis_filter_device_add() falls back to > setting > > net_device->max_chn = 1; > net_device->num_chn = 1; > net_device->num_sc_offered = 0; > > but after a moment the rndis request succeeds and subchannels start to > appear. netvsc_sc_open() does unconditional nvscdev->num_sc_offered-- and > it becomes U32_MAX-1. Consequent rndis_filter_device_remove() will hang > while waiting for all U32_MAX-1 subchannels to appear and this is not > going to happen. > > The immediate issue could be solved by adding num_sc_offered > 0 check to > netvsc_sc_open() but we're getting out of sync with the host and it's not > easy to adjust things later, e.g. in this particular case we'll be creating > queues without a user request for it and races are expected. Same applies > to other parts of the driver which have the same completion timeout. > > Following the trend in drivers/hv/* code I suggest we remove all these > timeouts completely. As a guest we can always trust the host we're running > on and if the host screws things up there is no easy way to recover anyway. > > Signed-off-by: Vitaly Kuznetsov > Acked-by: Haiyang Zhang This doesn't apply cleanly to net-next, I get rejects.