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 AC308A00C3; Thu, 23 Jun 2022 09:20:46 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 45F164069D; Thu, 23 Jun 2022 09:20:46 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id C99474067B; Thu, 23 Jun 2022 09:20:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1655968845; x=1687504845; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=zL6oae8egr9ccGIA8WZrHc0z7BDJuDpgaK+wV71Apj4=; b=Ag7tUntbjhjCVG8oas/effXR8X6smnGm0ls8os+jMTsPIkfUL0rWYJi1 QSN9r261sRMCZcj750m+ZyXIflp3uFc/BfdaKD3nvGySt4XaYfcf6qeKJ DAhMB3zcyLTEitu/lWOxFeL/CN/KMoKeUwXPrbw/r0hiqbRFsyXBhzGwJ yF77ZrIfLM1I5ZA4327URpid5VT4EsdtFkHtphT3QyCc7NZ/ehmPxdlA/ 9ofae5k0Ao5AR8Ov0LxstbFlGOLxGewLbrP9mFb3kJVLeWzzlrWNVvLtM PeKtuYJFctYccHldIo3WvG6x9Im378mzXpYwgR3KYDuMBb+e8duLbpCiD w==; X-IronPort-AV: E=McAfee;i="6400,9594,10386"; a="279416752" X-IronPort-AV: E=Sophos;i="5.92,215,1650956400"; d="scan'208";a="279416752" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Jun 2022 00:20:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,215,1650956400"; d="scan'208";a="588518229" Received: from fmsmsx606.amr.corp.intel.com ([10.18.126.86]) by orsmga002.jf.intel.com with ESMTP; 23 Jun 2022 00:20:42 -0700 Received: from fmsmsx606.amr.corp.intel.com (10.18.126.86) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Thu, 23 Jun 2022 00:20:42 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx606.amr.corp.intel.com (10.18.126.86) 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, 23 Jun 2022 00:20:42 -0700 Received: from NAM02-SN1-obe.outbound.protection.outlook.com (104.47.57.43) 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.27; Thu, 23 Jun 2022 00:20:41 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NMxKxcOYqm8rhp/d5l2gx1lyTPfNSrKbrSb6qPNX9LtVjvNbuYjHNHDajDnkja8DPMHUgPhkdGgtXg4idGpLHnAcb3wDoijtsprNAHacXi2KeO5TWj3YiZI2reOZk62W/gbV+RUQ3GM/DwD0QjtXxquRCYiQuSIVuU6vJATHS2BoPvhpVJqkPKIOjqiBF5F5mQ2xlVv081mYRKKLJ6MSxrQVAloEZxZQisHHYHb7jUKFPuYIH+AiQdgCLzYV7IEzT/dJ4+SJMFSlgQVhQcqsg9+to9nt5h150PagQGJVXgqRbXnW9T2ewGR2avdaVkdEXeUxVWAEVIUL40GeHNEAGQ== 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=zL6oae8egr9ccGIA8WZrHc0z7BDJuDpgaK+wV71Apj4=; b=NGEnPTYZwjnybb8P0k2q6A1AJUNCEcs8C8Of5pUX4MrVBys+9LhzL17KetGqGGYf1xaSJIqNMgg6V/A2SDJq0S6qU+D6Wx6PtmOGmzd657rEiGL2dqZHWmWvy0i4vDD6eLHFLIKYCLUy9uTxfiq4uwt1PruWYVUoWZz/Ia1NEqX+opZOQwJ9lmW/o6mqWHvodBhtoY8ozG3mVfRr5FjkAFfVE2fSSMQ0uAcReW0iv7A1iDH9n1luJA/ISNQsD1bFWB8c40JBLOn4ERcEi/P+rvX+772lSu442keg26RczXgkwbvPZiwb5waXfncu9xd1+HwcFvWnuHWLlHHRm/dhkA== 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 SJ1PR11MB6251.namprd11.prod.outlook.com (2603:10b6:a03:458::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5373.15; Thu, 23 Jun 2022 07:20:35 +0000 Received: from PH7PR11MB6006.namprd11.prod.outlook.com ([fe80::807:fe31:4ea3:50ac]) by PH7PR11MB6006.namprd11.prod.outlook.com ([fe80::807:fe31:4ea3:50ac%4]) with mapi id 15.20.5353.022; Thu, 23 Jun 2022 07:20:35 +0000 From: "Ling, WeiX" To: "Wang, YuanX" , "maxime.coquelin@redhat.com" , "Xia, Chenbo" , "dev@dpdk.org" CC: "Hu, Jiayu" , "He, Xingguang" , "Jiang, Cheng1" , "stable@dpdk.org" Subject: RE: [PATCH v4] examples/vhost: fix retry logic on eth rx path Thread-Topic: [PATCH v4] examples/vhost: fix retry logic on eth rx path Thread-Index: AQHYhhpLPIkNo/uLI0WSL34gPjVrba1clx6A Date: Thu, 23 Jun 2022 07:20:35 +0000 Message-ID: References: <20220518162505.1691401-1-yuanx.wang@intel.com> <20220622092555.1149810-1-yuanx.wang@intel.com> In-Reply-To: <20220622092555.1149810-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: 96eb024e-0d6b-4526-bbb2-08da54e8dd93 x-ms-traffictypediagnostic: SJ1PR11MB6251: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: AyxF1nSJLEKtmdzOQtD7UxmG3A/wLORhdYrvB73Im7hQUkWgOY6HG7h2lu5XVr3E4ZDqC8B/wBWv2KfLjkHFRXyEq4+nNxX2sZtUVQx3AEDr4b0sia4dG11Af8GS5fr3THP2AG72uoWYRtcm+Ax1zCoxAm1pZ76ndldX4ELvgVNsPJ7lmiwGFrbD7+t4Rmgcz6TwAfm2Ud3n0Ps7bJCdP55TUNqscEJaoI4V3AYzIZIWpyPZWTZBfHZRaD5iebBUT2b3xw7S1udB1a+EE9zuGMHdg7XguhxYf8mISOv+opQbgAShqePhJUhyfOvKQO3C87busoPm5kpCU87MCkdlG7ZvpJ1QaH+2WilOrIO7n4YRCo3Skr7Pf60VIO4Y9X5yX9LY5seVfHE8N/84L2A6//X0qD+OaZbD/s04jot+k3lMM0bZi/MBdF++8IZ8Q2azdLm9H6QbqFc5UTK0+FRZg5Q9+tKIw63Tq+sxQBc7yFKa6oF01n7GAmm67yXVAa8rKRDwswbCUMH3IDZ8mbVCIQL7E+2Y2DMZOh9Dy5cpSYjIvn/6iRD3Nss0h2WIODwTybBjHdXtnOckdebMD00Dye+c3rYHbcspvg4AOkvWUepsk0+E57zST/9Q+RKJ+3eqjKY0n7zdgC2XZ+ucUxf0hgngB0BESKjl93W7tehs33b44u3xeOGh6JFAoXOa0jys0wke97ljB0svBtq8ntKQsr89zdYLdLZFzmEfl9JmC4nX5am/ndP344NcWjVrbTto 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:(13230016)(136003)(346002)(39860400002)(396003)(376002)(366004)(66946007)(54906003)(110136005)(316002)(64756008)(38070700005)(76116006)(478600001)(66556008)(53546011)(41300700001)(9686003)(4744005)(122000001)(26005)(2906002)(5660300002)(66446008)(6506007)(66476007)(8676002)(52536014)(4326008)(8936002)(7696005)(38100700002)(186003)(71200400001)(83380400001)(55016003)(33656002)(86362001)(82960400001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?piBnIFtpVjlG1nYPkAQfGt+Y4ikdupd1i7XIYtg8c2UsvOVlKVq1nhlXjCWA?= =?us-ascii?Q?4fAKEHAYUymuYsxjyPBIz5Fir8lDKtcPRy3mhi2LOGHnm8ebGKBLB1q49Kfg?= =?us-ascii?Q?jmWzPPyqRZ9I2ysFcg2JbQvCCXZNf4IVWKnQUHufU0s04d4PmaWuTwTsRNUE?= =?us-ascii?Q?J0AFFJkvj4Z1wxypNJwUMrwUNWnAk3LSBI3jg5OUXQAofUMNkrQW1I7yv8/S?= =?us-ascii?Q?yxs8qRGDM+/fkeiq9WX9+9F/HQidEJcK235fBg4NIFS+cINq/I6U1d3unhni?= =?us-ascii?Q?sbwm5iabl0j2scg1JY4OiQ5WQA/bZoLC9aCpmGBla0/oW2IiTS+BVJbdSpZd?= =?us-ascii?Q?LY3Oz+Bsb7cWUBErCdzP9BNlQmh8h7S6MtKLzcVGCQvOr5XN9n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ZZsZJNmxkoQ6y/IXM1yvkOrwz+n6k8I6NLvXJtS5+5CNbWHh?= =?us-ascii?Q?s5FfKHsNqxpwvmhnxn+ORQmSeyU7/S+0e9e06G/tRFpJgIRGW3OJ9jnJiz1t?= =?us-ascii?Q?NxRaGEI19VwxssTei0MP9W+iYZpyg/d5GNFOI8rrmV1QV8hFQ1PvKN/cZTqA?= =?us-ascii?Q?R91K5n5K9bfybpY6vPmKBUB9v6k/yxw3J0anKrILpB5kqdcONEP5i8eZGZLw?= =?us-ascii?Q?ZBRX57ddej/l2M2WkYXzJ/8IRT0kpYyCXulFOQMw+uXW6YPx+VrW9/abw2Yo?= =?us-ascii?Q?CCzmRK6Q8/ryqQ9iEygnN7atrPE6N7q1rCpS6Nbt?= 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: 96eb024e-0d6b-4526-bbb2-08da54e8dd93 X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Jun 2022 07:20:35.2783 (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: q1eFdwGPaIrl2UYiWqiK1e9sPma3ra/NQP9s+YumJu4CtqTicypgYWkau7GUDmaasTsbrcYjv2UTxlwrIaeUoQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ1PR11MB6251 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: Wang, YuanX > Sent: Wednesday, June 22, 2022 5:26 PM > To: maxime.coquelin@redhat.com; Xia, Chenbo ; > dev@dpdk.org > Cc: Hu, Jiayu ; He, Xingguang > ; Jiang, Cheng1 ; Wang, > YuanX ; stable@dpdk.org; Ling, WeiX > > Subject: [PATCH v4] examples/vhost: fix retry logic on eth rx path >=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 fix that by using the difference between tx/rx burst as the re= try > condition. >=20 > Fixes: be800696c26e ("examples/vhost: use burst enqueue and dequeue > from lib") > Cc: stable@dpdk.org >=20 > Signed-off-by: Yuan Wang > Tested-by: Wei Ling > --- > V4: Fix fiexs tag. > V3: Fix mbuf index. > V2: Rebase to 22.07 rc1. > --- Tested-by: Wei Ling