From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 417C9A09EF for ; Wed, 16 Dec 2020 03:16:27 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id F182D2142; Wed, 16 Dec 2020 03:16:25 +0100 (CET) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2118.outbound.protection.outlook.com [40.107.92.118]) by dpdk.org (Postfix) with ESMTP id 68ECA2142 for ; Wed, 16 Dec 2020 03:16:23 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kk7p8Th99eUHm0R3tBfGFq72/93qtxiOUmG84FYUlB4vHhroClOzACzYF48vB2I5PdZaHGI/5ig8ECwePmLtqpDo0vY3JJfvVQ2leuhzcrDHgDBwLCtQuKusd7gErtCSiJx+EM9l3LzRRD5KB/XuYlzioI/KzRMIYTc9PIRAE3TIXhM0aiwvx728aIpEU5hXHhkb0wpki45gmwl0ZVm6Xwh8UcGYLa7ebsEtG/lY6Zbk6mTx69g/b4dJ+Ko8eQTEW3vdaVKwS3IOOtppzTKXDjw+4er4yGh4D3OHhvnG3UhkHN7UrN107gZtYRx8u/Gt5FjKAd74IpVzmMpxgvytTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=XANGIAgMi3l9FIS7k3HWr+RyP7vDVTBnFAFHH9ksJFs=; b=k92uArpZkc/8myiAKwdVefW8MwgzeJxFPcjsgEBrXJeYxAgeRLbYqtPwksZvjadNY/rkaAurHcAkADgmrn5dmS1hGyJt8RnKlClUPDDuDhfc3rxRQusiRX/jANdgWb24RxwKhMU2VnYQ8d3r3+hj7OhYHYGVmdRoc0Iyb3n2LKimBDddhoXbbLuEapgyD9ySm8ZmH3HaWWH/VAyJ9UN/aNWTQZ0FpDfryIu88yHDM1rbWbU/FUAvQgnqgEXfQifGmTJHluiId2C8tZJceWez2WJM/IVQ4dg/W8tmHzZ69f3AGLlEbll/4R+eGyKPCsa3rwoUSyykd8X3thvBKyOctw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microsoft.com; dmarc=pass action=none header.from=microsoft.com; dkim=pass header.d=microsoft.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=XANGIAgMi3l9FIS7k3HWr+RyP7vDVTBnFAFHH9ksJFs=; b=PFtOM/8E4Ektetq8qMFuGRj4NhynjhgCDlY3OD9C5N0pwVia2i7nwwBS0jQZBuaQGpq2rYtwGc87rXazIQUDGr9IKdsjynMQNcf3r3rasayK5gmAEVJKpoIzPmXOpbQK9vsQHRd69PomrI44lqS2ORwEeKdGtP2FkXI32GGWQZA= Received: from (2603:10b6:408:73::10) by BN6PR21MB0772.namprd21.prod.outlook.com (2603:10b6:404:9e::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3700.2; Wed, 16 Dec 2020 02:16:21 +0000 Received: from BN8PR21MB1155.namprd21.prod.outlook.com ([fe80::113b:feec:27f5:5ef0]) by BN8PR21MB1155.namprd21.prod.outlook.com ([fe80::113b:feec:27f5:5ef0%9]) with mapi id 15.20.3700.008; Wed, 16 Dec 2020 02:16:21 +0000 From: Long Li To: Stephen Hemminger , Luca Boccassi CC: Long Li , "stable@dpdk.org" Thread-Topic: [dpdk-stable] [PATCH 19.11 2/2] net/netvsc: control use of external mbuf on Rx Thread-Index: AQHWzotC3rvQJSssaE+A2CA9hZQ8Wanwp4UAgAAUnYCAB3jYgIAAvh2AgAARjaA= Date: Wed, 16 Dec 2020 02:16:20 +0000 Message-ID: References: <1607560037-30478-1-git-send-email-longli@linuxonhyperv.com> <1607560037-30478-2-git-send-email-longli@linuxonhyperv.com> <8a602c1ef8439139feb88d3f0b90db5d7a98a8ae.camel@debian.org> <710a6ab5601097c0168312e6670ea20066db139b.camel@debian.org> <20201215170923.3699aee6@hermes.local> In-Reply-To: <20201215170923.3699aee6@hermes.local> 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_ActionId=2e54d8bb-58b0-4628-9c19-2af7c59e1715; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ContentBits=0; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=true; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Method=Standard; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Name=Internal; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2020-12-16T02:12:12Z; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47; authentication-results: networkplumber.org; dkim=none (message not signed) header.d=none;networkplumber.org; dmarc=none action=none header.from=microsoft.com; x-originating-ip: [67.168.111.68] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: d8050e8a-3cf8-480f-b2ee-08d8a1689461 x-ms-traffictypediagnostic: BN6PR21MB0772: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:5236; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: PyJsRXS/nZXLKNGOjXBNVHxqP4DPR4BQO2N/dalZSJXmCfl0+qO/Z8ojFZaqDA74pi9gQ6nPL7z//nZJp5gFjSfAavORrj3rdcbnmXbFaIt5XiJss6Ffe01PrtWQ+QvY5Be0Rsy3ujMJrHkrPAiZTMVTRTynBAopaAWrH45rLumKvn6S2A4+/duwtfxPRyOaYCCVfk6axuw2ZquXnRUJI8ztdvaknvt7wb/IE5ROGtRnst5NgbhGnVC3ZnK1NV/Y/YIVlIYLW6pyQ/JzUQ3pLX1fKx9Dr/E0b3t0QUtJyw6vswsBiCa8y6l8Y7GVr0oDvAR/HmmKCxc4DAwTYIaG3XXw5Yc+Ksr45jg0r3hotOIhgJztYv7psJFdYbXhK8GydmatANtCgMlafgnhxzJ4oEG3HmFreo9s+zOE8HYN2ayVGboKvqhID2ByMZuJffwy x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BN8PR21MB1155.namprd21.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(346002)(136003)(396003)(376002)(39860400002)(7696005)(6506007)(10290500003)(33656002)(76116006)(4326008)(66556008)(86362001)(66446008)(478600001)(64756008)(9686003)(8990500004)(52536014)(66476007)(186003)(5660300002)(2906002)(71200400001)(26005)(66946007)(8936002)(83380400001)(55016002)(4001150100001)(316002)(82960400001)(82950400001)(54906003)(8676002)(110136005)(83323001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?WjrBXlGcL87XxMGL3La06SGI/qD5B0UrP/XK+mkR0e1c7VII4UdDGYbfAiSs?= =?us-ascii?Q?99bDW3kyiyhG9l7QzPeMk2OXExnP7KXZ330qVTL4f9WS/TS/SHmezxrDW6NG?= =?us-ascii?Q?B5tK71VVfiMBn7YDQhQWcqZxpcI2gBMwTJqFNTafu0xKtHjjWTSXfMNufzSB?= =?us-ascii?Q?/uy7/9KsDlpdItVy+e6EjRDKLHh4nZ3Hefp6PXaoBRp6AOgqR4CA3lHJkTH/?= =?us-ascii?Q?wukHgU/AvGg94/U+FCpvwlrDOrrKaxtrAonr5TaPLVkUMP9xGOwQbCPDmV3A?= =?us-ascii?Q?zNzMWNEGQH3+dMTtEVFLOmE/iUOw3gqn1twnoeDUxsZjft6EjzjrpCou2VMF?= =?us-ascii?Q?ZZf2tzeoC6Q07Vyafn/kdrEOhKYIOZuqM54JZGAVGZVARkFb/cWBYFJLndI+?= =?us-ascii?Q?NHG2TA/h+V9ZCszw+sqwQ2nUhfUHbM41CFDxu5Z36LxtwKqab+OSILwQ86OJ?= =?us-ascii?Q?epG0u82U5V1ys//jZnI/Z0hsOV6rpr5uBIScyZEK49vofZxZdEQPSm54+GK5?= =?us-ascii?Q?A5ZcFLOaHh9EuJV/xHuxxOPPbOPSSfkrF1L8P5/aWbbLYduRg86CQ3JR0iQj?= =?us-ascii?Q?3MQtWB0QcmUF4/RYLy33v/JttCtlzYpWRxjA6wvhQZ00vDiqEPg0liMXD0oQ?= =?us-ascii?Q?m5mB30+Xd/P8FgpkkGkKq5UMkIiEPQ8C+rtbIXTqlmrbs079Vxabv1VerUeC?= =?us-ascii?Q?PwdXsU7iER5xlOzB1HISlq/RIQQqEdgo27ZDSXyTfMnMMjw5nxnXavmGbUmg?= =?us-ascii?Q?AwlJIL0+vNpuo2AVLFP9RA7ANTgR/cYyhzBPxzF9+WiHyRZ5ui7lWXAPYszQ?= =?us-ascii?Q?Cv5IoLzUNvdIXf7o95API59RBf5WVOZCZiadDwnRXDpQIe0/Z4/BtgZQvF8Q?= =?us-ascii?Q?SX18Iv4U77zvVv62ktPKG0XQZjJjmfpgs1GV9ktZ3utTxSpGppldbxHpoB6V?= =?us-ascii?Q?BS4FpUN/b6P+Zg7XkfYg68L1C2qVAqDRUJgRb/QrHzA=3D?= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BN8PR21MB1155.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d8050e8a-3cf8-480f-b2ee-08d8a1689461 X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Dec 2020 02:16:20.9627 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: wfwY8HNwQU68ZTuAaYXsNZnVcZZbStFIz79zAhYm1+AqY1oxNOky32IUQ3Vr+xHGgghTkZx1hVKI76yWwCGb7w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR21MB0772 Subject: Re: [dpdk-stable] [PATCH 19.11 2/2] net/netvsc: control use of external mbuf on Rx X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" > Subject: Re: [dpdk-stable] [PATCH 19.11 2/2] net/netvsc: control use of > external mbuf on Rx >=20 > On Tue, 15 Dec 2020 13:48:57 +0000 > Luca Boccassi wrote: >=20 > > On Thu, 2020-12-10 at 19:44 +0000, Long Li wrote: > > > > Subject: Re: [dpdk-stable] [PATCH 19.11 2/2] net/netvsc: control > > > > use of external mbuf on Rx > > > > > > > > On Wed, 2020-12-09 at 16:27 -0800, Long Li wrote: > > > > > From: Long Li > > > > > > > > > > [ upstream commit 096b31fc0d8c989cc455c35f4d1def24a4ed6dee ] > > > > > > > > > > When receiving packets, netvsp puts data in a buffer mapped throu= gh > UIO. > > > > > Depending on packet size, netvsc may attach the buffer as an > > > > > external mbuf. This is not a problem if this mbuf is consumed in > > > > > the application, and the application can correctly read data out > > > > > of an external > > > > mbuf. > > > > > However, there are two problems with data in an external mbuf. > > > > > 1. Due to the limitation of the kernel UIO implementation, physic= al > > > > > address of this external buffer is not exposed to the user-mod= e. If > > > > > this mbuf is passed to another driver, the other driver is una= ble to > > > > > map this buffer to iova. > > > > > 2. Some DPDK applications are not aware of external mbuf, and may > bug > > > > > when they receive an mbuf with external buffer attached. > > > > > > > > > > Introduce a driver parameter "rx_extmbuf_enable" to control if > > > > > netvsc should use external mbuf for receiving packets. The defaul= t > value is 0. > > > > > (netvsc doesn't use external mbuf, it always allocates mbuf and > > > > > copy data to mbuf) A non-zero value tells netvsc to attach > > > > > external buffers to mbuf on receiving packets, thus avoid copying > memory. > > > > > > > > > > Signed-off-by: Long Li > > > > > --- > > > > > doc/guides/nics/netvsc.rst | 8 ++++++++ > > > > > drivers/net/netvsc/hn_ethdev.c | 10 +++++++++- > > > > > drivers/net/netvsc/hn_rxtx.c | 2 +- > > > > > drivers/net/netvsc/hn_var.h | 3 +++ > > > > > 4 files changed, 21 insertions(+), 2 deletions(-) > > > > > > > > Correct me if I'm wrong, but these 2 patches look a bit more like > > > > new features than bug fixes? It's new options for the PMD, right? > > > > > > > > In general, we do not take new features in LTS releases. Stable > > > > means stable > > > > - we make very few exceptions. > > > > > > > > Is the PMD broken/unusable without these options? > > > > > > This patch changes the default behavior of netvsc PMD to not use > external mbufs on receiving data. > > > > > > Using external mbufs has shown problems in many applications. Changin= g > the default behavior will fix those. > > > > Sorry but I don't think adding new options is appropriate for an LTS > > release. > > The expectations is that everything works as-is without any need to > > even recompile, let alone changing options. This patch effectively disables external mbuf without any changes to applic= ation. > > >=20 > Can we just turn external mbuf usage in this driver off for the stable ve= rsion > instead? That will require a separate patch not in upstream. If that's acceptable I = can submit another patch. But this will create some confusion to someone do= ing bisecting in 19.11.