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 AA2CBA0556 for ; Thu, 26 May 2022 11:31:03 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A397442670; Thu, 26 May 2022 11:31:03 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 8587340DF7; Thu, 26 May 2022 11:31:00 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1653557461; x=1685093461; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=HZ6Mn13b4FqLm7fhaaTAbhJzaeFiKEiWco1pMQJ5GzY=; b=M0ViTmuPSKSoyRSvgZ+NG/kJhwjvlXT8fztoEqzOB6gETa55JbAIKMOs ieNVyHBgxKYpVbFBMhTkg6a2GZKBtwv/yrRLWmL8Rv4d81PUQT+uEJEF+ UqC1pipA9rbbV56FbQWIkhbZQKbcLSOuXl2Tk+QGnlx38pTTY2b6+xwqz gTKgvud5xsz88kaZ0U27KN9/Atq8XztuEeCc+2KvxKD4uQNRLEdoK5+Hu 0yK5C8yZ5qbjaKHIdjZ+dg6V4VuQ9V7a1aqTAIHTi+FSFmNFrK+xvUhYy UmlK+8shsIgaNTxGp5Jm97zfpbFUHeCYywtkxI6rpVGRZ1cS7DG5QDGRk w==; X-IronPort-AV: E=McAfee;i="6400,9594,10358"; a="273820408" X-IronPort-AV: E=Sophos;i="5.91,252,1647327600"; d="scan'208";a="273820408" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 May 2022 02:30:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,252,1647327600"; d="scan'208";a="901933428" Received: from orsmsx606.amr.corp.intel.com ([10.22.229.19]) by fmsmga005.fm.intel.com with ESMTP; 26 May 2022 02:30:57 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX606.amr.corp.intel.com (10.22.229.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Thu, 26 May 2022 02:30:50 -0700 Received: from orsmsx603.amr.corp.intel.com (10.22.229.16) by ORSMSX610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Thu, 26 May 2022 02:30:50 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27 via Frontend Transport; Thu, 26 May 2022 02:30:50 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.170) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.27; Thu, 26 May 2022 02:30:49 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TCAuUcL+moSEr2XiqBh2TaHB6J/RrlBf0a55Psrk9SWXtCdV+dVEZf8pQ/8hNcQdSzLERMJPiakeBFCq/8eQ8+0fHoTEdDYC4iXaWg/ihMme7IotX4tNP3uPgFnaWdTRk458S8EnNUuZQobEamCtLPS/1L1XsrWWQLsCsyUW0DP+eIs//8ODaay3YL9vLoWEw5StPpWLYQCTYCu+gsGQhn7tpUsedn/C3s7oDPGTcW//Wx7WI4/QxxbIQ+nIskY0bMPgeo9DgBrS0SrqXq8BO6UHBi9U4Jjh/RRQY35/GSPuYJWhbL4A6BZ/rbYVPi9kvYqXW3ulOKyzyykWi8ak7g== 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=HZ6Mn13b4FqLm7fhaaTAbhJzaeFiKEiWco1pMQJ5GzY=; b=GCex18geARWc2HKdN4zA7FwUVfK2paNz3XA0kCBZdSljM8KQ+tSFNbzOyK6gdwajqaruvWbMHMHYl52Sn+uYYp9uRDq40nMnnDnb3OrCV+Moz3yKyfmdqagFhDW9XVP4IG0nrdLDgPjJeiJm3yDM+P7yG9wTiLMTcB58AS8Oj4IqTGss0rY+RBLrLhIPFsuupGnnGsXaCHlOBo34VwYivBKvp6ff2t76sQ2lhItOr1cf6UMEZmwy5np9qzltR2sxd553E5PtJo+CHhBAmZA8sVBTIFPOTPoENmonjdaWhb24MSyWZqxYogoajtdk5pa94wn9kENXI/5xcLpG2Siimw== 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 Received: from PH7PR11MB6006.namprd11.prod.outlook.com (2603:10b6:510:1e1::13) by BN6PR11MB1457.namprd11.prod.outlook.com (2603:10b6:405:8::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5273.16; Thu, 26 May 2022 09:30:47 +0000 Received: from PH7PR11MB6006.namprd11.prod.outlook.com ([fe80::a414:94ac:532:112e]) by PH7PR11MB6006.namprd11.prod.outlook.com ([fe80::a414:94ac:532:112e%8]) with mapi id 15.20.5293.013; Thu, 26 May 2022 09:30:47 +0000 From: "Ling, WeiX" To: "Wang, YuanX" , "maxime.coquelin@redhat.com" , "Xia, Chenbo" CC: "dev@dpdk.org" , "Hu, Jiayu" , "He, Xingguang" , "stable@dpdk.org" Subject: RE: [PATCH] examples/vhost: Fix retry logic on Rx Thread-Topic: [PATCH] examples/vhost: Fix retry logic on Rx Thread-Index: AQHYapI/T5n6eCHjbEKm8g5t73VSpq0w8UIA Date: Thu, 26 May 2022 09:30:47 +0000 Message-ID: References: <20220518162505.1691401-1-yuanx.wang@intel.com> In-Reply-To: <20220518162505.1691401-1-yuanx.wang@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: 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: 046fee43-2cbc-4ced-7793-08da3efa6a35 x-ms-traffictypediagnostic: BN6PR11MB1457:EE_ x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: /49TQTD3lCc/mlFyhP2OfFhlC/S3VEbPZcr1JiytG8aL2gzbo5ILrVDxjAv/YACPiEIWtbluYTt/Bo7Fs4SMvO3iYqAQbnUEh/AiXB1qsnzeORi0+cCD0RJmWMfRS7VKqnzLXjoVn+S6SlTD1fRtUd0MzDM70T5TT8oaZc5kju9bGtZ5pv1e2wsaFFbyAiPLNDwikgFluNAs2J0zetu6jTQSMarcjs2FxH+APC9Ad/h2ZTvFC55tPEgiaCEIvGo2n+A11ycLfWB5g0BsVXPDjT6IHLY5gRlz1zwDaJHNmvybSc9UhPNYF6UlrgCq7SgbAe7ydIid6MVnjHLOwPDJhirWcqDHznUzXUGm0o6OIB8RTLjuzXtoVPDriIjGGPAu6UaaamRAtATtOhRTUECfT+NE74JCe1QibPCuE4g/cUWLR+0NNIXA+c0/R2IHGl38noC3IJsHAKolShPrrrV6OShPN6ONc8A4P+tsgqsGmsTVzBDYLjMaQq88URTH6h7L3r+ja//jGURgtEDJcmYCm7rgBbv3CqmI5ugT3GSmmnF0BHHTkWoWTnGt0ST/oObLeSsHsXrq+POcMO8PpCCAokj5r1zlqI0DGpjiWxzcMFp86lMhP8Bto9Q5IuTKxJOBAq5R1pkYLt/CJkFV34X8op/CHlyKnLuXQmtbTd+/yjawQRynnWViC2l1P01BA6OXiM/h+kskqe8dDlzpo5DovrOmu/a6ZeL+RgKt0ACnjII= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH7PR11MB6006.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(55016003)(4744005)(186003)(8936002)(33656002)(5660300002)(83380400001)(2906002)(52536014)(38100700002)(64756008)(122000001)(82960400001)(71200400001)(7696005)(6506007)(86362001)(66946007)(66476007)(66446008)(76116006)(66556008)(316002)(110136005)(508600001)(26005)(9686003)(54906003)(53546011)(8676002)(4326008)(6636002)(38070700005)(83323001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?iQ46ZwdAMIY+vSf781Z1VleHhbbgVYRX3XrmIw0W6EUhrixn6yDYBt9nJsUP?= =?us-ascii?Q?3J9EYntAlJZ+iC9yb1w+qRL4Mix03/hbKehbYbT+8v3A9uNULe1ke+tq6oqp?= =?us-ascii?Q?6vQdkT/23DBsQyuuT3wRWli03C2btGc4RtFdx5/Rug6z/sHiLRmMtT2bwrqb?= =?us-ascii?Q?Bi6anoG+b/bEJ7fnHakMO21XV/ew4VabxR+p2QlSQwgQQoh3tkOLNVlJFhC/?= =?us-ascii?Q?t4TRd7Hx8yS1rOCfuxNrq9vFoQ4bAPEfYOCsbrJfM8zCwfNuqSM+GjppL4oZ?= =?us-ascii?Q?7gcSTnFNSyi62XVbtd4oBRZAfvmg6DVQ+TNl1YvR61meFt/F/QzDzIQf9qLJ?= =?us-ascii?Q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Gclo7RP+df/FCZGz3tGdBZXL?= =?us-ascii?Q?tSq1V7xt/2xVJmK61BBzuz8IRUCqTyUmg9g1JZj/GBzJW+QoTUF3S2m9L22T?= =?us-ascii?Q?z2EXqaBi/eelFGYaBgR3aU/Lq6evyyf1d4bisxSfS4YNcah/TS971yPgnKNk?= =?us-ascii?Q?iZl8+m5sT3DJVFmO9JmUNGCiLs0dpe64at97MSQTbn0VyrdQhcFfWYTUWYDu?= =?us-ascii?Q?EOxqTst8bXvw7P+eWjH9VV8qSSEfY2Dq+1TVUb61F6xizED01pn+FXwrT/DA?= =?us-ascii?Q?CHbADFvTLu+j0DN4C90SxaWy3YoWoZhh8raf6v7BF9wvk2ctlgqgyVfWqKNx?= =?us-ascii?Q?WOki3bFEed+s/LK8njxmlB0JnVZrUEevGVbbYeSjD/I1EXyt5XFe3IRZMSJ5?= =?us-ascii?Q?tOrMQmM4ra87ePjILQiddaPCGXuOJoueP74akbBQvbcbCvEP4ja5lH1hKrqU?= =?us-ascii?Q?mc14JxyJPiwKA2K3651wwGgh8N8mzUr3CA23XBmwvFtoDEzJx3LiRWoA+i4A?= =?us-ascii?Q?Ck6kpRVGBg=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: PH7PR11MB6006.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 046fee43-2cbc-4ced-7793-08da3efa6a35 X-MS-Exchange-CrossTenant-originalarrivaltime: 26 May 2022 09:30:47.0356 (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: 5UXH+O0bKw7n9IELXb+p+Z1bA/kpvRfxtT7HCOQ4YLokXn8jUv9ITjPxkC/IGtTst7nxA5E+gO1aN8IURoj+uA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR11MB1457 X-OriginatorOrg: intel.com X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 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 > -----Original Message----- > From: Wang, YuanX > Sent: Thursday, May 19, 2022 12:25 AM > To: maxime.coquelin@redhat.com; Xia, Chenbo > Cc: dev@dpdk.org; Hu, Jiayu ; He, Xingguang > ; Ling, WeiX ; Wang, YuanX > ; stable@dpdk.org > Subject: [PATCH] examples/vhost: Fix retry logic on Rx >=20 > drain_eth_rx() uses rte_vhost_avail_entries() to calculate the available > entries to determine if a retry is required. > However, this function only works with split rings, and calculating packe= d > rings will return the wrong value and cause unnecessary retries resulting= in a > significant performance penalty. >=20 > This patch uses the difference between tx burst and rx burst as a retry > condition, and introduces enqueue_pkts() to reduce code duplication. >=20 > Fixes: 4ecf22e356 ("vhost: export device id as the interface to applicati= ons") > Cc: stable@dpdk.org >=20 > Signed-off-by: Yuan Wang > --- Tested-by: Wei Ling