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 1BA9146096; Thu, 16 Jan 2025 13:15:03 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DE3C7402C2; Thu, 16 Jan 2025 13:15:02 +0100 (CET) Received: from NAM04-BN8-obe.outbound.protection.outlook.com (mail-bn8nam04on2045.outbound.protection.outlook.com [40.107.100.45]) by mails.dpdk.org (Postfix) with ESMTP id E758A4025F; Thu, 16 Jan 2025 13:15:00 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=n/GNLNXjaTXKrmIMjH5nk95yXGJlxmrRovnyQVqu7gkjAq48+f1ZaJuoAqZ2AanNEmYuEg8S6aSlm+H1FvP0LsDoC+2Qs5Ysi7i9SRK99mNpVwIST5rVdLQjyTJM/MvGWWYQYCjzaJoswK8A01PA2ZOO3X6bWVSj0m6LVmEJBO3S1IqhMM5IMuyhx1hERIsSfDCsw8wVDG5Q2cEM7IySmqaqnJC/IUutFapCpnupgVb+OrxhqymtWu+rOyDBJFXNB5tTWgecWipoafuGdshVQLJr9QAYSsKnuxO9tHgZdQ53nWtU63yvfxK+Ibv4R3fOfrx8nbedFyDHZgYpbf3irQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=INSQqSe4qqjcSNkv42RbDMNvkrBtMWKfu5C1nQ2U9NM=; b=UQvKO2iVMqlB0AxBiwIWH0Alh7i158qgSMunEiMHkQnO/o2mjdh+fUTlRRPGk+T9EwBcHPaJtdP/9WEpHbTXjN4F0PL+xk83HPeQUh+EowNJ2QdbcZJyLA572xVIk4PEr6sUXWih846WRowIfRhV9kvode2gp1wJcSlZSGh/elPpj9wDPT9vTukzRxxv9S0sguizau1fPv9KH0Gcyzc/onI1sRbnN8Rlkn3w1orPEvNQkJtaCBTyE4NR5cZPGHfF6Y7MrLzq9427eBFkvz/LE1HSfleprXW1adJ/vgMd8mvfqj2lyJoHY39rS9u8W27f/lO1HKPZEgUN1m0kV4Tvlg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=INSQqSe4qqjcSNkv42RbDMNvkrBtMWKfu5C1nQ2U9NM=; b=Ujbptsqb2saM1NqTerD6vr4dLt7axJlp72L8eSZkM7kA58QDrILnKqyxZ5NlZJglmLhLWtkCumU2YWYYoqcqpRJOvvcKBjb8x5gzDaNWUaXkjKnu9HEOW6JeoGXQ1ZtnaSdWSAEL4UjmqOTAuqA27bffpgg2cefVG8WqpXVPczapdqvQzgDbjD5F63J94QEQCs+H3kfQgR0Nh+0ov0wW0Khh5Go2bgXkU1uPjriIEsRER+wOdwX2CPYj4rXtLc/awPMoPR5UIRUs8zPk6pxc+CmKzrdK4fF6zWtYKpv5DPjREP3Hgk2vr0DhMSsHK2agXGiamyCWyt1VnzpREJTGUQ== Received: from MN0PR12MB6103.namprd12.prod.outlook.com (2603:10b6:208:3c9::19) by CYYPR12MB8854.namprd12.prod.outlook.com (2603:10b6:930:b8::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8356.14; Thu, 16 Jan 2025 12:14:58 +0000 Received: from MN0PR12MB6103.namprd12.prod.outlook.com ([fe80::3c6c:6f63:917e:98d8]) by MN0PR12MB6103.namprd12.prod.outlook.com ([fe80::3c6c:6f63:917e:98d8%4]) with mapi id 15.20.8356.010; Thu, 16 Jan 2025 12:14:58 +0000 From: Chenbo Xia To: Maxime Coquelin CC: "dev@dpdk.org" , "david.marchand@redhat.com" , "stable@dpdk.org" Subject: Re: [PATCH v3 1/3] vhost: fix missing packets count reset when not ready Thread-Topic: [PATCH v3 1/3] vhost: fix missing packets count reset when not ready Thread-Index: AQHbZ/ylNxnPHXiW/0qUGGn90FMCKLMZUH0A Date: Thu, 16 Jan 2025 12:14:58 +0000 Message-ID: References: <20250116095416.3655699-1-maxime.coquelin@redhat.com> <20250116095416.3655699-2-maxime.coquelin@redhat.com> In-Reply-To: <20250116095416.3655699-2-maxime.coquelin@redhat.com> Accept-Language: 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=nvidia.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MN0PR12MB6103:EE_|CYYPR12MB8854:EE_ x-ms-office365-filtering-correlation-id: bed34677-68e5-4a00-b3a6-08dd36276525 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230040|376014|366016|1800799024|38070700018; x-microsoft-antispam-message-info: =?us-ascii?Q?EI3rI9XthDXoavaW8UW+7Ddx9YwFW/TsNqm9kff3mHCO4um5+1f5vc7WY9C2?= =?us-ascii?Q?VOx4OFoDY/62iHDBctWZ/Q6OXRu1AeWKifdz50n/U4ZKRt0trFj01ohHzozC?= =?us-ascii?Q?l8dH3h0Ks1ifDP62gVufAm+kYuoVScV5VdpeSKiG40c6inIy0RfkVYy6mO+p?= =?us-ascii?Q?wOY6HzMq+OWf2pYfWXjlUhZ9grm2KtdmO0lzbHLeAyB4UcYqbru9Qn4jr+zw?= =?us-ascii?Q?tGSkIK1EDqOkB5YqPQiSzsZxv8w0gGaCC8sHJDFQQOxL1BUu2oUq44re0FQp?= =?us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DTHb1NdpCbV6aY6TYc?= =?us-ascii?Q?ZoL1riJ34WquiHlBtOPt3PtKiDK4WFCFaENbQOuo+CDt3dBVmJb1cFlmvDrF?= =?us-ascii?Q?nUxLN0BdEtMe12xWnico0KgdztQJJUB+l7OKTLePwu4SqMePAA8FgZbxkwie?= =?us-ascii?Q?rymKLlr5J4h9V3E+weBdHyHco0SGtH36DTBwGLUCGeicPAuxkhDAZtrCzSI+?= =?us-ascii?Q?gUdW474ngg9ElsGAFbHCA8nDpXxVmypdCHyCmUUJueQn45bYubTO/hLoX4y4?= =?us-ascii?Q?B9I55XZxHYTsVDUqqyY4ZGzFo1RkHtIs?= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MN0PR12MB6103.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(376014)(366016)(1800799024)(38070700018); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?sJC0PUP3KgdDS+bky5AXa0mb72eKG2ua9H31LrRiixBSJS+pH4LX86tyAMqa?= =?us-ascii?Q?sN0NsmvC5H7voEoH83Q2WexnmEKj3q+/M2bBAAwFwGfiUhM9+xvZFHPkLEB1?= =?us-ascii?Q?PyQyDSFqTI1F5n63Mt5whYolIh9vpx4YPybw6Bmz9SMBus/5v/FrRMWkcUkt?= =?us-ascii?Q?eMKXvi5TBeLq3fti9922CxFI5PFTagxYH31KXYcz5hdVVr4phx6Pb0CZdyEc?= =?us-ascii?Q?piur+lF64s9+E1WBYS9ykBSTOycCv++TzJvI+KNt4JpuVOoyyyry2DmxhOb3?= =?us-ascii?Q?dlSLrELxvevkGHsX2tjO9S1wNmJUdUAZPT0jV13ZtdYxRnB7vD5Ti1aZJrUb?= =?us-ascii?Q?fT9FiegqaH2LGNOXoYUFn9vwmzhwLPWS6M6BYc/kMCmh7Zn4eivlhXYgkbP3?= =?us-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+BLTLwRwST8tPnX?= =?us-ascii?Q?+HfDnuDdXvW0Nomw+PK8LNvOQqTJMF6ppVSXl9VEJ6FGxzm4YHEJji/A37PS?= =?us-ascii?Q?BqtitSfJmG0CsxhbCpNtRKE4DECbVCylL10rj0eHkQj0ZJX4b/fyDGhVJynw?= =?us-ascii?Q?GeXgLezXTvZYG46uMwsXZqVC0bGUEhpdupthW8ZIjxBZxIll0c2qlbtVek7R?= =?us-ascii?Q?P+t6zTYAf2UX2QhlEWE60rnltLB2khxuAvM3F857WMd6q1yLua8T/rHWbzVV?= =?us-ascii?Q?Uojz+4AbUVOn9aW0APVff0kfqu5UpnyByukjozzB?= Content-Type: text/plain; charset="us-ascii" Content-ID: <73FACC17ED6AAE47B6594FEAEB923E65@namprd12.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MN0PR12MB6103.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: bed34677-68e5-4a00-b3a6-08dd36276525 X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Jan 2025 12:14:58.4837 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: glDz4P0GGtiDyf8fh4wpR64mMEpjruxrSUDH3Gbow9QElBgzo93vpXC6sd1dp7FH9m3jaYwRGgwBRFDYABj+7Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CYYPR12MB8854 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 > On Jan 16, 2025, at 17:54, Maxime Coquelin w= rote: >=20 > External email: Use caution opening links or attachments >=20 >=20 > This patch fixes the rte_vhost_dequeue_burst return value > when the virtqueue is not ready. Without it, a discrepancy > between the packet array and its size is faced by the caller > of this API when the virtqueue is not ready. >=20 > Fixes: 9fc93a1e2320 ("vhost: fix virtqueue access check in datapath") > Cc: stable@dpdk.org >=20 > Signed-off-by: Maxime Coquelin > --- > lib/vhost/virtio_net.c | 2 ++ > 1 file changed, 2 insertions(+) >=20 > diff --git a/lib/vhost/virtio_net.c b/lib/vhost/virtio_net.c > index 69901ab3b5..a340e5a772 100644 > --- a/lib/vhost/virtio_net.c > +++ b/lib/vhost/virtio_net.c > @@ -3629,6 +3629,8 @@ rte_vhost_dequeue_burst(int vid, uint16_t queue_id, > rte_rwlock_read_unlock(&vq->access_lock); >=20 > virtio_dev_vring_translate(dev, vq); > + > + count =3D 0; > goto out_no_unlock; > } >=20 > -- > 2.47.1 >=20 Reviewed-by: Chenbo Xia