Received: by 10.223.176.5 with SMTP id f5csp2022623wra; Wed, 31 Jan 2018 15:24:34 -0800 (PST) X-Google-Smtp-Source: AH8x225nV+b9YbSqjiIn0UdIaWdVulVSYHTmRfwwebYfBT745rEx1pM/IL/De4ZevLvxr1uMTI+p X-Received: by 10.101.96.4 with SMTP id m4mr27852716pgu.104.1517441074012; Wed, 31 Jan 2018 15:24:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517441073; cv=none; d=google.com; s=arc-20160816; b=axIoKV3xv0Ki9tiqWjXX05QFuhixbAoYMs68rowo+Vxx3BvS5y1PvFB2MOTGOXnlXQ /bEHZxVxum6oiLBpxWF8nayHyY33f2TDll+JL2CBCZcbBRBBjR5Qztp++RP1I0CyXZ90 RHfssMt5EGsrO+i7RFQgsjypb9C4v+6p33r44h50vosLQy9LKwbKbRiFq1nncjqrG4ST 8ua03ghYE/k0D9QRUuzRLVBuliOBbWhGtC3JMgJK38TC+KzfVBuWB2c58B/hygcBRbDk 8Z6tovEyhXt/IjawLlk4YttssAHnUUkV8o9fVVYPVfMlONhlRA9kJU8ggsc7yBo2R4/F 7ByA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature:arc-authentication-results; bh=D1tkY7tIxZOiyL/hXqK9pR26JiFJTFG3yfUX98iBBeU=; b=cpT1JRICsj7gaakNyn06GGdgzGGDopi4uCKvSaFa7tPAxLVqC65+cs7ti/FgSNNURt aF8qF8pOnIP8g4lxGhuJVBs1h+w5v3QGqWFPF1m25axzumd1kn7AwUOpyAtJLMWyEBUh G6PQ7VJ9NatJx+m65qlH0dMoHgFgNzkhnuWfGOFhVUQl5grZW3nZQk3o6i7tE7mLt7ZR 340qhaunnEhF2HCrCdBgb2arHCIiWZR6ZdIpvtiJbyxb3H2YRbZsDOKMgVmLNOHD96L+ jPwQAUv2jg66IclAZdTLkvkJ6HKTuGQHo8p+zRwqSicWV1+L/cT64EqFs8bIBAQF1sSb 7XzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@networkplumber-org.20150623.gappssmtp.com header.s=20150623 header.b=1hJGM7i3; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a80si311199pfa.6.2018.01.31.15.23.49; Wed, 31 Jan 2018 15:24:33 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@networkplumber-org.20150623.gappssmtp.com header.s=20150623 header.b=1hJGM7i3; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753480AbeAaXBw (ORCPT + 99 others); Wed, 31 Jan 2018 18:01:52 -0500 Received: from mail-pg0-f65.google.com ([74.125.83.65]:36614 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753423AbeAaXBl (ORCPT ); Wed, 31 Jan 2018 18:01:41 -0500 Received: by mail-pg0-f65.google.com with SMTP id k68so11312935pga.3 for ; Wed, 31 Jan 2018 15:01:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=D1tkY7tIxZOiyL/hXqK9pR26JiFJTFG3yfUX98iBBeU=; b=1hJGM7i3kUm/Z+NUzLXr+84brDVcZEJw9C+wlzW6lEZoCGMZvMHAK91zMO1EXQBJg8 GESDi5m9CkcFvStC9eZe8EcHaM97YUmzZE0H9BBCeVcdLUGixJYdUrw6V1BAoKpiT5Oh qgF2mSFfsIVpkZ08QN54kL7vz5khuzhCVP7on16nRX9e0W2K7iFcTf2od1eTb+2JNmQH J7WxrNZYDJpsZ7KYCobAUVXKjMpZ93XD8mSx/sE2JmA+doS9NMwF+EmG0WqI+hZUj9Ud TY/xrJW+dWtmOjpx+rY1swTHJ9pEUOm+TgJZ6zpda3EQw7NLcOBJDaAL5OTUG8jnF91T Hu+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=D1tkY7tIxZOiyL/hXqK9pR26JiFJTFG3yfUX98iBBeU=; b=ZityYNlimqbcFEnHWhY74SoNeQtTTd7K/ne8mpbF/oiT/As/rvWCkVeWft07ZhHJtE bdimcVKlXz/FehMI+5hwC/R1tkws3pkR5QSdeX59uYJncmL1o8+F7zGIoR7JrCnXCFq9 1/INzxAPwJDm3xNtDKow1EuIcQlW5DpMzjQgi3K8nzJrQeAshDFZ3LBhGSu5f+ELwx8d vRTy6C3rQgk61xYGTcibQ4uaAR25V5AKvoJbDqi2AfSrXEPE6wxVLWirOkD5O4Xxqqxq ANZVsaoovod3qZlrUIZbHibws+shNX5UKpvrWLLXKE8F52qiyEoDx2MLXi/J1ZacqogS 9kCw== X-Gm-Message-State: AKwxytfLK2SjyCYT/3uUQl8d27+lw9pxr4ztzVtIedDfF95zdkMtE3p/ azjRUBPOyzIQbm3Kqv2oIiKbkw== X-Received: by 2002:a17:902:6e88:: with SMTP id v8-v6mr30301059plk.374.1517439700093; Wed, 31 Jan 2018 15:01:40 -0800 (PST) Received: from xeon-e3 ([172.92.74.152]) by smtp.gmail.com with ESMTPSA id v20sm41906090pfe.176.2018.01.31.15.01.39 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 31 Jan 2018 15:01:39 -0800 (PST) Date: Wed, 31 Jan 2018 15:01:37 -0800 From: Stephen Hemminger To: Mohammed Gamal Cc: netdev@vger.kernel.org, otubo@redhat.com, sthemmin@microsoft.com, haiyangz@microsoft.com, linux-kernel@vger.kernel.org, devel@linuxdriverproject.org, vkuznets@redhat.com Subject: Re: [RFC PATCH 1/2] hv_netvsc: Split netvsc_revoke_buf() and netvsc_teardown_gpadl() Message-ID: <20180131150137.58abee5b@xeon-e3> In-Reply-To: <1517397409.3452.7.camel@redhat.com> References: <1516700045-32142-1-git-send-email-mgamal@redhat.com> <1516700045-32142-2-git-send-email-mgamal@redhat.com> <20180130112926.53f3c166@xeon-e3> <1517397409.3452.7.camel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 31 Jan 2018 12:16:49 +0100 Mohammed Gamal wrote: > On Tue, 2018-01-30 at 11:29 -0800, Stephen Hemminger wrote: > > On Tue, 23 Jan 2018 10:34:04 +0100 > > Mohammed Gamal wrote: > > > > > Split each of the functions into two for each of send/recv buffers > > > > > > Signed-off-by: Mohammed Gamal > > > > Splitting these functions is not necessary > > How so? We need to send each message independently, and hence the split > (see cover letter). Is there another way? This is all that is needed. Subject: [PATCH] hv_netvsc: work around for gpadl teardown on older windows server On WS2012 the host ignores messages after vmbus channel is closed. Workaround this by doing what Windows does and send the teardown before close on older versions of NVSP protocol. Reported-by: Mohammed Gamal Fixes: 0cf737808ae7 ("hv_netvsc: netvsc_teardown_gpadl() split") Signed-off-by: Stephen Hemminger --- drivers/net/hyperv/netvsc.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c index 17e529af79dc..1a3df0eff42f 100644 --- a/drivers/net/hyperv/netvsc.c +++ b/drivers/net/hyperv/netvsc.c @@ -574,10 +574,17 @@ void netvsc_device_remove(struct hv_device *device) */ netdev_dbg(ndev, "net device safe to remove\n"); + /* Workaround for older versions of Windows require that + * buffer be revoked before channel is disabled + */ + if (net_device->nvsp_version < NVSP_PROTOCOL_VERSION_4) + netvsc_teardown_gpadl(device, net_device); + /* Now, we can close the channel safely */ vmbus_close(device->channel); - netvsc_teardown_gpadl(device, net_device); + if (net_device->nvsp_version >= NVSP_PROTOCOL_VERSION_4) + netvsc_teardown_gpadl(device, net_device); /* And dissassociate NAPI context from device */ for (i = 0; i < net_device->num_chn; i++) -- 2.15.1