From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 198CCA00C3; Tue, 14 Dec 2021 08:29:19 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 92AF740395; Tue, 14 Dec 2021 08:29:18 +0100 (CET) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id B07A040042; Tue, 14 Dec 2021 08:29:16 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1639466957; x=1671002957; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=P0BCe0DXB13gARIbLycnqtJtl6axUlo3rZjpil17NRM=; b=TiciiQFF+rZAFK0/+5J1MtRzNf3Or0WgGKwdkOK5b4KMwc5Tb7KBMv5G ixoOKL+DFi1B+qfyePXhfpy8bJapW3le2l52gmlR0UJGs3MeaFn5QSC0M mGlw0v+EYRzGZN/o1PYxU38O2k18AcNwshvihJzBjaumZNdI4EEOuHRWx iiLBBvg9WtfbOsLwbcZZ4t1E2QvIWiqPjUON+wf/6VFvDcXPq20XUXbZd sd8xLs+ugFgDCrhKttMdH8GO0kQAcbiyX048KjtqKbyHEnOGwBIV+Zgrq Wn6K87Hj5JONlJ5anJh5ThaJ8+pM1MqteEg3a1jvvRNpRPePdkisyzbqo w==; X-IronPort-AV: E=McAfee;i="6200,9189,10197"; a="218934060" X-IronPort-AV: E=Sophos;i="5.88,204,1635231600"; d="scan'208";a="218934060" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Dec 2021 23:29:15 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,204,1635231600"; d="scan'208";a="481811574" Received: from fmsmsx604.amr.corp.intel.com ([10.18.126.84]) by orsmga002.jf.intel.com with ESMTP; 13 Dec 2021 23:29:15 -0800 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Mon, 13 Dec 2021 23:29:15 -0800 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20 via Frontend Transport; Mon, 13 Dec 2021 23:29:15 -0800 Received: from NAM02-BN1-obe.outbound.protection.outlook.com (104.47.51.45) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.20; Mon, 13 Dec 2021 23:29:14 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hXd/1s68ySF/HV6VedPA2U8Cu36rgUevx43H8wP01t7ZhNnTMJfz0FqUeD2TXD0gjUBdyMiiCV68V8dlHnaSk4fXdm7jDFpNG+ZUFULVYRpedvsCvE3GAXFk/w50Lt8XOU3rvWu6kni+8Dr+vAM6M/zeDau5v9oU2hVBgACvaM9YH3WMQC6oN/EC/4omJ+FHYhZ7bu5D/NqSAIms4TXO/B1snLl/sp0weJO4OsCGczx/IputqvdZOlheE2rcLntB8Pu+gI6AT46xUmNjQerK646LPnMqg5CmvZURwiJhoTKVk+4LRCBfF8aipGPr+vDVjCmc9UK7Lq6M3Onx4cdBrw== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=If2cyyFqyHh7vsDFKLz14tGznJG6DYCdciVHJMyDUHM=; b=bjQW3l0V6PfwZqLk/UuREgv8i95J309T/wQAh3Woja+JmyKdkMjugpYX1CreIQ3TTgVndodOGpxnHFY1Bp6X/gjgdxqI2cIWmxnXtnn35NSekKytdF50bLAas/YsT6ENGUwKE/7EldOBo7ueRlaaouUf1wZamurb19TKDM1uRen1NNOrN2UYx7qPPM7Mdcoh7aRey3bwCxvts6xEtXQZZ7xu8C2uJX5L9XubxWK2O1yUFmEraFxEa/qaOeorGikEGhfUL9mDECrzdGE9Opve4PBUjtVXn/5B33K69wHc669tcyqHTipHWgtMWrWSEOjtgsvRf0Z+IxfrPvnrkSq/2w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=If2cyyFqyHh7vsDFKLz14tGznJG6DYCdciVHJMyDUHM=; b=JFEAeN8q3v6cpKYLW9GJOCr2YulvEoCFfMyWCHyhxUCQFrbkcZziik4Kv9Vb2dLCYYZrSsJ+aXwicjmazsFKizMAJcW07J/bTzRxwVLrI+pZu8SMfBl9kuXeeO/2ykpa0SOrjS8cqX1u7j6upEYhYVRhllqUGKDOQIBzhzgVUUE= Received: from DM4PR11MB5518.namprd11.prod.outlook.com (2603:10b6:5:39f::18) by DM6PR11MB4137.namprd11.prod.outlook.com (2603:10b6:5:199::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4801.14; Tue, 14 Dec 2021 07:29:12 +0000 Received: from DM4PR11MB5518.namprd11.prod.outlook.com ([fe80::1990:22ec:9e24:fdb1]) by DM4PR11MB5518.namprd11.prod.outlook.com ([fe80::1990:22ec:9e24:fdb1%5]) with mapi id 15.20.4778.018; Tue, 14 Dec 2021 07:29:12 +0000 From: "Wang, Haiyue" To: "Rong, Leyi" , Bin Zheng , "dev@dpdk.org" CC: "liangma@liangbit.com" , "stable@dpdk.org" , "jia.guo@intel.com" Subject: RE: [PATCH v3] net/ixgbe: add vector Rx parameter check Thread-Topic: [PATCH v3] net/ixgbe: add vector Rx parameter check Thread-Index: AQHX7Z8hHAJOE5MR602G0DGIOxxfjKwvwH8AgAHcWPA= Date: Tue, 14 Dec 2021 07:29:12 +0000 Message-ID: References: <20211202092001.1830481-2-zhengbin.89740@bytedance.com> <20211210082209.4102794-1-zhengbin.89740@bytedance.com> In-Reply-To: Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.6.200.16 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: bd059b87-c1be-4af7-d6a8-08d9bed36cda x-ms-traffictypediagnostic: DM6PR11MB4137:EE_ x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:3173; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 1rB0VnMfPqq0c0cgRVVsqr7gPXn5GlwiojH7I29zc593vsH4IUEoUfeQCOOQRkv68PLzpUav0XsaM+MNPjjHE5asd9uYlYYpc9WWqEEX/mwZ4VWSzEzI/A7BGksLPmEYSCMLFBb0Ok2zDxl6yL4UAx3VBJ5hqnVdwnlF774uxU/G91bftFbvGGU+jEhgnaVnbHKVBoF9hzYbQN0zJiMQVn4/lguywIPfDUT7FaK0FJ1WZ7jkYCKo3uRBjvnjhZHad9VsjS4c88NRlFf1yqFVRzJdlmo6KId895nCAA+v1DNk0ykVWlGoC6hsbsiZMehMJRFLmsKO2mbwP3sxEjC07sAZjolgDW5W8G73QMVDrUeX+1SOpUMIVsUO0y5Jt90h3Jmfu9V+hU46MhVF/vqvvAPFLWvPDQi6ycUeg19wnBBrj6dJG325+QkmA52VNveXbksXcDT3Sx52QcUxtZCOUqGUMVJs0GapQooIQoNFW5t1g7NEELLlq5GOYRDVUel8pb77zue3Xfap3TIILqpmyI2G+dIUaov7/fd1HeogdsPWjEyCQRvzE45Isj+nkXB6x4dngbxYMA+HLfK7d1jF9NssI00d1GiATowjNbezdtd8tawdSg+VUcH75Iimfo01icHWgLYpr2AOV73jQ4yTCwxNHePzhpJY4UJzUYQIQUdG9dv/S3dG0jq1njY6FXvkjCMtyhjA88ZwkI/MNRVVeA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM4PR11MB5518.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(110136005)(4326008)(82960400001)(64756008)(66556008)(66446008)(55016003)(8676002)(316002)(86362001)(26005)(38100700002)(122000001)(71200400001)(186003)(54906003)(107886003)(7696005)(508600001)(5660300002)(76116006)(66946007)(6506007)(38070700005)(53546011)(33656002)(52536014)(8936002)(83380400001)(2906002)(66476007)(9686003); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?/NZxpQJolUX56cXFCX8p0LQ/IFzQgOFaHF+jw6lgN4OPD++B2FmfUr3EITTU?= =?us-ascii?Q?tZwYemwMOmOql/NqYsc1YM2i2l3Ns52ntytyB7F1n20gVrdKDmkv38ejhdrG?= =?us-ascii?Q?KNGkRbQBuGl6rAKO3TJSyt+7odcv0YzZUvi7ibxUePRpzF8k/iO7cy256rF2?= =?us-ascii?Q?mDIa8LGtHW9QZfix95PVyvaVF4iH94uyCSHE47DCijE6ztBDVHBe/CUEsWEs?= =?us-ascii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dKtdQP63bTU5jUjUUXRNv2QA?= =?us-ascii?Q?8CC8SR3814NPOMOUElfRhY/MYPCULDhwY/+ep1g30mYfC52793L7+EhVSH0m?= =?us-ascii?Q?5ocJSk2qCCoKFuHd0j/RaY8kFvXQWBdTkwdRnYkVo5poAsjDuC+mWIAknEPk?= =?us-ascii?Q?1jzk5I1VCDcbosE7Ft8WkfCFTW2IF2zBG1uoPan2BishSryZyE/hs8PUNAnk?= =?us-ascii?Q?RrRUmspszGeIRTNDqVyV6cikDESXviVMpORUY8s1f3+7rPBR3xBSsuQl94zG?= =?us-ascii?Q?nAS8Unxwrpv3YjA29pHUcsHqfiKbBEr9dMMPsbC4qrHZWTuuzA6iqhnOcini?= =?us-ascii?Q?b+ej+2ZMZi8h8O2lveVCw3Mgu+JkObrnD1ohTMmxLFPQUBTlx1ig5GsGW+BG?= =?us-ascii?Q?47bw6UGA66wggBAXl6ZugcbkANeWcFZU7v1DrxxKrtEjbfB5Okg17aUBq/7n?= =?us-ascii?Q?cGkuJ76xJrOp3UVHadWTdu4T6iY/lp6oh1xjJZbd047CFVxW1CcUxhPJ+hZb?= =?us-ascii?Q?Dw=3D=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM4PR11MB5518.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: bd059b87-c1be-4af7-d6a8-08d9bed36cda X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Dec 2021 07:29:12.2668 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: xdMTWJH5kVd6gCvFCGCH3GSKGR8C7V/X6e1PxaaQ6YNchaRvxE5nCPNs5uQqW9VhgsZEfewZq+mIgmp4VOLTuw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB4137 X-OriginatorOrg: intel.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org > -----Original Message----- > From: Rong, Leyi > Sent: Monday, December 13, 2021 11:03 > To: Bin Zheng ; dev@dpdk.org > Cc: Wang, Haiyue ; liangma@liangbit.com; stable@dp= dk.org; jia.guo@intel.com > Subject: RE: [PATCH v3] net/ixgbe: add vector Rx parameter check >=20 >=20 > > -----Original Message----- > > From: Bin Zheng > > Sent: Friday, December 10, 2021 4:22 PM > > To: dev@dpdk.org > > Cc: Wang, Haiyue ; liangma@liangbit.com; > > stable@dpdk.org; Rong, Leyi ; Bin Zheng > > ; jia.guo@intel.com > > Subject: [PATCH v3] net/ixgbe: add vector Rx parameter check > > > > Under the circumstance that `rx_tail` wrap back to zero and the advance= speed > > of `rx_tail` is greater than `rxrearm_start`, `rx_tail` will catch up w= ith > > `rxrearm_start` and surpass it. > > This may cause some mbufs be reused by application. > > > > So we need to make some restrictions to ensure that `rx_tail` will not= exceed > > `rxrearm_start`. > > > > e.g. > > > > RDH: 972 RDT: 991 rxrearm_nb: 991 rxrearm_start: 992 rx_tail: 959 > > RDH: 1004 RDT: 1023 rxrearm_nb: 991 rxrearm_start: 0 rx_tail: 991 > > RDH: 12 RDT: 31 rxrearm_nb: 991 rxrearm_start: 32 rx_tail: 1023 > > RDH: 31 RDT: 63 rxrearm_nb: 960 rxrearm_start: 64 rx_tail: 0 > > RDH: 95 RDT: 95 rxrearm_nb: 1016 rxrearm_start: 96 rx_tail: 88 > > RDH: 95 RDT: 127 rxrearm_nb: 991 rxrearm_start: 128 rx_tail: 95 ... > > RDH: 908 RDT: 927 rxrearm_nb: 991 rxrearm_start: 928 rx_tail: 895 > > RDH: 940 RDT: 959 rxrearm_nb: 991 rxrearm_start: 960 rx_tail: 927 > > RDH: 980 RDT: 991 rxrearm_nb: 991 rxrearm_start: 992 rx_tail: 959 > > RDH: 991 RDT: 991 rxrearm_nb: 1026 rxrearm_start: 992 rx_tail: 994 > > > > when `rx_tail` catches up with `rxrearm_start`, > > 2(994 - 992) mbufs be reused by application ! > > > > Bugzilla ID: 882 > > Fixes: 5a3cca342417 ("net/ixgbe: fix vector Rx") > > Cc: jia.guo@intel.com > > Cc: stable@dpdk.org > > > > Signed-off-by: Bin Zheng > > --- > > drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c | 11 +++++++++++ > > 1 file changed, 11 insertions(+) > > >=20 > Acked-by: Leyi Rong Reviewed-by: Haiyue Wang