Received: by 10.213.65.68 with SMTP id h4csp172094imn; Sat, 24 Mar 2018 17:45:13 -0700 (PDT) X-Google-Smtp-Source: AG47ELt5dWLna95THKEYNskftrCvq1M7PmGGv2C7AzQuTdkEivLNeJPzVahNKwk79smDNI331fJ2 X-Received: by 10.98.153.204 with SMTP id t73mr19702220pfk.121.1521938713904; Sat, 24 Mar 2018 17:45:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521938713; cv=none; d=google.com; s=arc-20160816; b=u1ToYHu2rNjjs1uGDznyelNtTDXerDq2ZDClk4Ll7cr7KV3qz+qyUKP74CInMo5ZaT tOQoVdv4D4vJa4ABnvzBmvrEcKLbYGsEWl3W6UNQ3AlmOAJUdz32ugn522xx1xRO/GxR dEXb4ZCehl5gFX9K+Cbtlx7vNb4zA/X1kNiCGWzSFOtQxwQRkiCZEdabHfdEzaIix7j7 Lji6TFMueJQNbIx88HdRACjJmlq5hErEtLe3tLl1t13Qra8FiVbvvxGwK+rvp/xzyePt hA8oXwqfQo5+ihtc+BZkRDLVP5cDI2LOcptiVAzO14xBCe4+Z70P02xn/zvUHfdQYuKy z/ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:msip_labels :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=VHg6d78kBK36+FPUzQbGjMEafE8pJaHxyTC70JuoKhc=; b=BQnm7haEHTaaGrsM8Pph9FrgmbOMopJ/FoEKT6t5L8EMGckmD3g7AByTOU0zSiX23b TbygPWUU26SEuMhu2bEnHGWkFgbRqfSy36xQLldHGB6I8ox7kVpzproVOuJt3tqqH0N3 /6wWkQCQtr1gExKoAhaAvf64EbLOCHKYn6UfP+eh8JC5rXPQTVR3WK3c9XBDalBBFPRK Bpxibp3DOx97KlaKDuu2osJ8igKBFnpQAju9RZk7vRdzXGfaUhpyokrwW39F0cObutHZ 2PQXWeah74J44h5Evsz7+O2RslInF8YJjX7a4+Fa+0XzmtjqVAwsP2jvst/Gc/dyUGtz uP5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=Z9Wtdc7y; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y1si8293925pgq.423.2018.03.24.17.44.19; Sat, 24 Mar 2018 17:45:13 -0700 (PDT) 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=@microsoft.com header.s=selector1 header.b=Z9Wtdc7y; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753106AbeCYAlm (ORCPT + 99 others); Sat, 24 Mar 2018 20:41:42 -0400 Received: from mail-cys01nam02on0097.outbound.protection.outlook.com ([104.47.37.97]:45235 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752315AbeCYAlk (ORCPT ); Sat, 24 Mar 2018 20:41:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=VHg6d78kBK36+FPUzQbGjMEafE8pJaHxyTC70JuoKhc=; b=Z9Wtdc7yS/Pcd4MGHZgyLqOMjFFBRQDXLP3JTjnOsGp+mCmS7En8u8Ana+cQv9qudhW9ZLAUXuN+BvTEXu6mkd7lqGxHflXObNupKMn68AR1V0wIdfhb9v3sn0cBNNwY49OVjJxFzo4vjrGczvU8agAztBf87ao2LZVM9u3VfM4= Received: from BL0PR2101MB1108.namprd21.prod.outlook.com (52.132.24.31) by BL0PR2101MB0977.namprd21.prod.outlook.com (52.132.20.158) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.653.0; Sun, 25 Mar 2018 00:41:37 +0000 Received: from BL0PR2101MB1108.namprd21.prod.outlook.com ([fe80::a9c2:e3f3:4b2:9517]) by BL0PR2101MB1108.namprd21.prod.outlook.com ([fe80::a9c2:e3f3:4b2:9517%3]) with mapi id 15.20.0653.001; Sun, 25 Mar 2018 00:41:37 +0000 From: Haiyang Zhang To: "Michael Kelley (EOSG)" , "davem@davemloft.net" , "netdev@vger.kernel.org" CC: KY Srinivasan , Stephen Hemminger , "olaf@aepfle.de" , "vkuznets@redhat.com" , "devel@linuxdriverproject.org" , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH net-next,1/2] hv_netvsc: Fix the return status in RX path Thread-Topic: [PATCH net-next,1/2] hv_netvsc: Fix the return status in RX path Thread-Index: AQHTwhBZzy0DeWsSN022dpFRpCYf5KPfm6SAgACCAMA= Date: Sun, 25 Mar 2018 00:41:37 +0000 Message-ID: References: <20180322190114.25596-1-haiyangz@linuxonhyperv.com> <20180322190114.25596-2-haiyangz@linuxonhyperv.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=True; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Owner=mikelley@ntdev.microsoft.com; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2018-03-24T16:48:04.3236663Z; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Name=General; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Application=Microsoft Azure Information Protection; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Extended_MSFT_Method=Automatic; Sensitivity=General x-originating-ip: [69.130.166.81] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;BL0PR2101MB0977;7:KyKSBKOYQRUF7S2dBeIv6qLtz8jMDdRA9s6BF/gPCIbOr3/OA0X5atbdTMSfgLb2UEQd+3MKLTRGVl0M8zYyF6fY4zkXl8Yzth3pyYIyD+uOqEr1gdWk6cT6wgeVeBV0IpWj6pzcVHJ9IcA1BN5FLFXcEr3LYyMDSmsMlAK1IZM9II5PtOM7A7brYpu5ap0omRwN0dc+l7lSV6cSf670ly2HFQALtvX59I3EhHOpmnFun40cIWDG35QxiCWIEUfJ;20:WGKDRGSBXjaiBWf23zWrky4IWJP3D2cPttfO98QR1HaTBui6up69hhzCdizsXTisD+ZnuDKkyod+JaxyMzJlyUWXuCiTnoKm29RmPiKEp7FTeYHSkxLvColS+n7XiPoh9FzPqUXJdOaw/R40idctt2FU/8Qv/V8kb24ifCdRj2Q= x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: dc97eaae-af28-438f-8205-08d591e92ad5 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(2017052603328)(7193020);SRVR:BL0PR2101MB0977; x-ms-traffictypediagnostic: BL0PR2101MB0977: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(20558992708506)(89211679590171)(9452136761055); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(61425038)(6040522)(2401047)(5005006)(8121501046)(93006095)(93001095)(10201501046)(3002001)(3231221)(944501327)(52105095)(6055026)(61426038)(61427038)(6041310)(20161123560045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123564045)(6072148)(201708071742011);SRVR:BL0PR2101MB0977;BCL:0;PCL:0;RULEID:;SRVR:BL0PR2101MB0977; x-forefront-prvs: 0622A98CD5 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(346002)(376002)(396003)(366004)(39860400002)(39380400002)(189003)(199004)(13464003)(229853002)(8676002)(66066001)(76176011)(4326008)(74316002)(86362001)(14454004)(53936002)(54906003)(102836004)(26005)(8936002)(6116002)(6246003)(81166006)(6506007)(81156014)(110136005)(8990500004)(53546011)(2900100001)(99286004)(3846002)(86612001)(6346003)(9686003)(55016002)(10090500001)(316002)(106356001)(5250100002)(6436002)(2501003)(478600001)(22452003)(10290500003)(7696005)(446003)(5660300001)(7736002)(97736004)(1511001)(25786009)(68736007)(3280700002)(105586002)(33656002)(2906002)(305945005)(3660700001)(11346002)(2201001);DIR:OUT;SFP:1102;SCL:1;SRVR:BL0PR2101MB0977;H:BL0PR2101MB1108.namprd21.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=haiyangz@microsoft.com; x-microsoft-antispam-message-info: ZDHp8cyavxvcD5r/78rjb1ggbL8pIyNeBG8pQ2fiG3VIR96E+M3MDQaqQTyZWovWSBkGsN4/2BjczOgGSvsdEuUZCpR8TRqL3zl03ACVAgVuyfWUlSZBBxhNJo3VTYi0STmq0+CQzW91AgmImoWPaiQPvWOZ11f+gu3usXdYxszey7JmZMmG3hM+c3cSJA5ub+miO7cbfILVofXyHVIH15bQ2ntg2PWFi5rA2iMkbdGkUkT+YjCD4ySv4mGhCrskiXA7oZyxRxUzQycG25FHxTrtVqUBIJuL3m0sBLMKOerPXXRT24kvtlSC7znFdCxx3A+RlKPFmrtPGymWvuja6g== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: dc97eaae-af28-438f-8205-08d591e92ad5 X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Mar 2018 00:41:37.2994 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR2101MB0977 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > -----Original Message----- > From: Michael Kelley (EOSG) > Sent: Saturday, March 24, 2018 12:48 PM > To: Haiyang Zhang ; davem@davemloft.net; > netdev@vger.kernel.org > Cc: KY Srinivasan ; Stephen Hemminger > ; olaf@aepfle.de; vkuznets@redhat.com; > devel@linuxdriverproject.org; linux-kernel@vger.kernel.org > Subject: RE: [PATCH net-next,1/2] hv_netvsc: Fix the return status in RX = path >=20 > > -----Original Message----- > > From: linux-kernel-owner@vger.kernel.org > > On Behalf Of Haiyang Zhang > > Sent: Thursday, March 22, 2018 12:01 PM > > To: davem@davemloft.net; netdev@vger.kernel.org > > Cc: Haiyang Zhang ; KY Srinivasan > > ; Stephen Hemminger ; > > olaf@aepfle.de; vkuznets@redhat.com; devel@linuxdriverproject.org; > > linux-kernel@vger.kernel.org > > Subject: [PATCH net-next,1/2] hv_netvsc: Fix the return status in RX > > path > > > > From: Haiyang Zhang > > > > As defined in hyperv_net.h, the NVSP_STAT_SUCCESS is one not zero. > > Some functions returns 0 when it actually means NVSP_STAT_SUCCESS. > > This patch fixes them. > > > > In netvsc_receive(), it puts the last RNDIS packet's receive status > > for all packets in a vmxferpage which may contain multiple RNDIS > > packets. > > This patch puts NVSP_STAT_FAIL in the receive completion if one of the > > packets in a vmxferpage fails. >=20 > This patch changes the status field that is being reported back to the Hy= per-V > host in the receive completion message in > enq_receive_complete(). The current code reports 0 on success, > and with the patch, it will report 1 on success. So does this change aff= ect > anything on the Hyper-V side? Or is Hyper-V just ignoring > the value? If this change doesn't have any impact on the > interactions with Hyper-V, perhaps it would be good to explain why in the > commit message. Here is the definition of each status code for NetVSP.=20 enum { NVSP_STAT_NONE =3D 0, NVSP_STAT_SUCCESS, NVSP_STAT_FAIL, NVSP_STAT_PROTOCOL_TOO_NEW, NVSP_STAT_PROTOCOL_TOO_OLD, NVSP_STAT_INVALID_RNDIS_PKT, NVSP_STAT_BUSY, NVSP_STAT_PROTOCOL_UNSUPPORTED, NVSP_STAT_MAX, }; Existing code returns NVSP_STAT_NONE =3D 0, and with this patch we return NVSP_STAT_SUCCESS =3D 1.=20 Based on testing, either way works for now. But for correctness and future stability (e.g. host side becomes more stringent), we should follow the protocol. Thanks, - Haiyang