Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp149685imm; Fri, 21 Sep 2018 11:52:47 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYPMxhf8WfMSwRWVT0OX7XR9wK29riwJEF99fFWmWnbQ6hCWGrbJrNh6LvmMt8os8ZQY4a6 X-Received: by 2002:a17:902:be07:: with SMTP id r7-v6mr44933146pls.275.1537555967727; Fri, 21 Sep 2018 11:52:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537555967; cv=none; d=google.com; s=arc-20160816; b=T6jqKdH/724Y1fiqefCh/oH0RADBLKkxDDI2g0BRlSk5MbAfdpoLOTR3XpYxZoHlPt PtP8qqyt1WmoIIDeg+yQ7DgeAcbY/I6JFHtgFzifsOX/bm4ox/9HftXmguejfW/O298Q 4rr2FIMjxnryg8Cy8Id0pZ9nN1NdOd/+QfPzdjLFLdS1+98/5Eu1TB9C0n0j2aiqaC30 Oymm3c0jWUglouK4gJ7f64Jerphhi3ReSctD5aUrrvu6NyIxxLLOlgtJqDyVzQdsinK4 nl1LnOu/daEl7bEQLWUrSpu2Tvrzof0qcS7INqpvn8TOZl5LQS2kGdV52A5bVFMfCjWm XvQA== 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; bh=kFDzp3N+qhAygYoplrzxV8wViZd2WXdXsz4rFqVWDzc=; b=Y3c54SixdHGd2E921BWTZaVg4YFK0ilUP75b8M1HCCdEmkMSW697yTRGzFviKPI6VD o2m1TUtKQVlm3wRCvcvS3skoVZ4V+RIkEAdyN/eiUm9hw+fmmzh+im/Mbzo7OBcSKeZd xy6ldSqZQrR+4w2iBw4sTtxbaChXilur2S4igx4Ynx7NSWbDRyZaI/igb61i4xQOY+ja cGst6+YZEpbc31KUq3HhgI4FCLAZXTkyzLOf26RpcAlOn0Bq5g150kvrXgMInJAHYBMu LHrE3aoOS1ns3R5U4o5mDp9HeYj3x3DocuwWBhoyhzI3iP+KXzBg08SDgx1gvXc3SlFv GC4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=Y4hgULPc; 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 c22-v6si6406434pgb.472.2018.09.21.11.52.31; Fri, 21 Sep 2018 11:52:47 -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=Y4hgULPc; 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 S2391303AbeIVAmI (ORCPT + 99 others); Fri, 21 Sep 2018 20:42:08 -0400 Received: from mail-cys01nam02on0122.outbound.protection.outlook.com ([104.47.37.122]:39616 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2391089AbeIVAmI (ORCPT ); Fri, 21 Sep 2018 20:42:08 -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:X-MS-Exchange-SenderADCheck; bh=kFDzp3N+qhAygYoplrzxV8wViZd2WXdXsz4rFqVWDzc=; b=Y4hgULPcgSSJ+xM0fo6PR6R2AcCqf5Se5fcy91hl33rG7P6I1Co9wti6q3Ra5MWsl2nuazY5JB2E5m4aO0ywEfG40S9GXMVb7JNoFZuONNpzJAcP3Vk+Y7Yrl2+kTG7MIMjyO02VA9gZSjFf77+wWmzR4aQzClPp278mEH8BwOA= Received: from BN6PR21MB0161.namprd21.prod.outlook.com (10.173.200.7) by BN6PR21MB0115.namprd21.prod.outlook.com (10.173.199.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1185.6; Fri, 21 Sep 2018 18:51:55 +0000 Received: from BN6PR21MB0161.namprd21.prod.outlook.com ([fe80::2dba:ece1:ce16:551a]) by BN6PR21MB0161.namprd21.prod.outlook.com ([fe80::2dba:ece1:ce16:551a%4]) with mapi id 15.20.1185.010; Fri, 21 Sep 2018 18:51:55 +0000 From: Haiyang Zhang To: Stephen Hemminger CC: "davem@davemloft.net" , "netdev@vger.kernel.org" , "olaf@aepfle.de" , "linux-kernel@vger.kernel.org" , "devel@linuxdriverproject.org" , vkuznets Subject: RE: [PATCH net-next, v2, 1/3] hv_netvsc: Add support for LRO/RSC in the vSwitch Thread-Topic: [PATCH net-next, v2, 1/3] hv_netvsc: Add support for LRO/RSC in the vSwitch Thread-Index: AQHUUdoPKfeeW+WL/UOZ5UolOzJblaT7EbCA Date: Fri, 21 Sep 2018 18:51:54 +0000 Message-ID: References: <20180921182037.10077-1-haiyangz@linuxonhyperv.com> <20180921182037.10077-2-haiyangz@linuxonhyperv.com> <20180921113620.62a004cb@xeon-e3> In-Reply-To: <20180921113620.62a004cb@xeon-e3> 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=haiyangz@microsoft.com; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2018-09-21T18:51:53.1039996Z; 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: [96.61.92.94] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;BN6PR21MB0115;6:LYudV+f0nFP78kCzsSbkzo9GPWDnCFucLxNC7VZnnRToFTPg4mcuBci4uRViHcLdFkrnakKB+1Nph5VMuTN2H/ZZd0RvgyctBu6NBhkgqF4lXbuTSimdDaUD19oBTN0oVw/TbI5FYyHhKNI6JyTSdHvKnu2qkcmVA0wJV4OKypU83RwYbDEPwkTMs4Sl8GLA9FSQOY0xE2JRJYkBO18NCYTRahC/+/5ppPtuXTfhQQNIHUgyzHn4W/8C5KZ4N28fUMJnJCM4n6wZeSuj85FLAHabR0yjkv7YBbDkFDqZ3vt9jId52n3aRS80z3T0nYFQ7FYjaOH9gH5OlQ8gy/lSpR5NVyQReFiXSFpPk2QiGloaT/sVY5LUplf8hVet2MS01npPxwZsX11qNRqRmMMM2HwztJoVjB9jPpjjCYucP0/zC8KaHm4857ju3Vrzr1hTDYlOLINOarbFK0PSPOhBrw==;5:Jvv1uVe7IQ8vpUGDBtTfdt+q2k5lnxxlV8jxY92NMee+iGoLdQSbsHRPX1TBiNTKsj1UgBsVL6jnnvEJPHlDwWKEKAvuiAFXaKsPTxeI1/sbaOETFw4+wvUSXGQCaEOLNPWzQLdqHQ3PtcQ5TAhw9vZv9+/03ApjHF7gltHhE2c=;7:YN7VCMVGPiJob/jZUrt15A1Ecg3sqhwlIEPyEAF5W243f/UJfRIVoS9GICdMr92km1u5vbZkV4jTrI402OwhSEgkvNC/NXs/1CBY9rgOjwg0urlPDDUE5SGOdZUEQ8GsiaddV+GCskm8r3j38PQWTOGanE5c5hW+jW4Aq8RzpYz+oRFodOSLIiNOZ1ALM4eX6t4pDlTZsj9PaV/fmuaXuZsaZQ4kulbMk02dGLQD/RxPVRhNgfYidDB2QKCVctvu x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: 20320081-a9b7-424f-9d05-08d61ff34d1b x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989299)(4534165)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7193020);SRVR:BN6PR21MB0115; x-ms-traffictypediagnostic: BN6PR21MB0115: x-ld-processed: 72f988bf-86f1-41af-91ab-2d7cd011db47,ExtAddr x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(9452136761055)(28532068793085)(89211679590171); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(10201501046)(3231355)(944501410)(52105095)(2018427008)(3002001)(93006095)(93001095)(6055026)(149049)(150027)(6041310)(20161123558120)(20161123564045)(20161123560045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699051)(76991041);SRVR:BN6PR21MB0115;BCL:0;PCL:0;RULEID:;SRVR:BN6PR21MB0115; x-forefront-prvs: 0802ADD973 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(39860400002)(136003)(396003)(366004)(346002)(376002)(13464003)(189003)(199004)(71190400001)(71200400001)(6116002)(105586002)(3846002)(25786009)(6436002)(33656002)(106356001)(9686003)(53936002)(86362001)(14454004)(74316002)(4326008)(86612001)(81156014)(81166006)(2906002)(305945005)(10290500003)(6246003)(8676002)(55016002)(7736002)(478600001)(54906003)(8936002)(186003)(53546011)(68736007)(5660300001)(10090500001)(99286004)(2900100001)(66066001)(229853002)(102836004)(6916009)(6506007)(11346002)(256004)(97736004)(22452003)(7696005)(486006)(476003)(316002)(6346003)(446003)(8990500004)(76176011)(5250100002)(26005);DIR:OUT;SFP:1102;SCL:1;SRVR:BN6PR21MB0115;H:BN6PR21MB0161.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: LE6GO6yBNibDyPZ9Xk6me+hIy10yH1tq10p5EiROvpWLRvahn4HT5GGzIqlqO9vR2inR9n3LJHmvssnIkwTwYNRVPKkqt1VLf+Temn74oEaAPdpuCirSyCEpm32+/hzOf5yMJJ2xVOCyLkkFFTn9F9l0wwOW/9Xxs6OLHHD7s3BAvHvqdXZjWtBGE2Mu+ZKN9qPiF100ZITWQol9Lk4jMTGg6SKQUYBRrG20TCzjo6HArqujQ3ta0cOqdIRGnVLQQq5klveSFbd2fVlFgqDzYZZxXG3f/0biHxnQCKLuu7tQwlaTUZGiripcgw0RZXo4UYW+0JtQRUqPr14lNiiSzXzrENSDjS6GnhWYsfqXAPM= 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: 20320081-a9b7-424f-9d05-08d61ff34d1b X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Sep 2018 18:51:54.7950 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR21MB0115 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > -----Original Message----- > From: Stephen Hemminger > Sent: Friday, September 21, 2018 2:37 PM > To: Haiyang Zhang > Cc: Haiyang Zhang ; davem@davemloft.net; > netdev@vger.kernel.org; olaf@aepfle.de; linux-kernel@vger.kernel.org; > devel@linuxdriverproject.org; vkuznets > Subject: Re: [PATCH net-next, v2, 1/3] hv_netvsc: Add support for LRO/RSC= in > the vSwitch >=20 > On Fri, 21 Sep 2018 18:20:35 +0000 > Haiyang Zhang wrote: >=20 > Overall, this looks good. Some minor suggestions. >=20 > > +struct nvsc_rsc { > > + const struct ndis_pkt_8021q_info *vlan; > > + const struct ndis_tcp_ip_checksum_info *csum_info; > > + u8 is_last; /* last RNDIS msg in a vmtransfer_page */ > > + u32 cnt; /* #fragments in an RSC packet */ > > + u32 pktlen; /* Full packet length */ > > + void *data[NVSP_RSC_MAX]; > > + u32 len[NVSP_RSC_MAX]; > > +}; > > + >=20 > This new state structure is state on a per-channel basis. > Do you really need this to be persistent across packets? >=20 > Could this be on stack or do you need it to handle split packets arriving= in > different polls? Or is the stack space a problem? >=20 > Also, maybe data and length could be in one structure since they are rela= ted. The stack space is a problem. NVSP_RSC_MAX is 562, which is defined by host= . It will be too large for limited stack space.=20 struct nvsc_rsc includes the data, len, cnt, chksum, vlan for one RSC packe= t. They are all related to construction of one SKB and its meta data. So I put them= in one structure. Thanks, - Haiyang