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 4364F46096; Thu, 16 Jan 2025 13:15:17 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 26C8E4066A; Thu, 16 Jan 2025 13:15:17 +0100 (CET) Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on2043.outbound.protection.outlook.com [40.107.96.43]) by mails.dpdk.org (Postfix) with ESMTP id 8DEB540668 for ; Thu, 16 Jan 2025 13:15:15 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=TulCCFUFaYl1VJSBxnzDKWHrarDxrcuDajZjVAHErSONC5OPsi9rmE1+pTuLaZfA7JJvZbGk77Fa/eNtboW8/vXtekPVIhf+GhseZ1mpdJ2z/qSTo8ywx/cnJqJFaIYsSLcStVxXvkhLllAFdJH4qTYVBQ/+9vEhPNdzXW+hv8eywTSo5qvdUgoY/e0AtuczqwhjVTaYVU8kNyLP89CdOPqbu3sFg1FgoWEhS9DzLapNejnaf8ZROK6ZS8rOQ2LCiJvf9g317Xjd0IQqYfER3CM2MN+mOMvzWTG13Um04p8QNq9laZPAjse7oQ7oj9aa4HIoyl5MYruKfWpTunbYtA== 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=2dMvKI8duvzf+XIaCG3XqBnvZl1ZmRZUyjc3LrrH+Tc=; b=xS+BW/zMHg9mhvN73JdxUs8hIqq8w5ITFFDGtgJEiqg2ruHJgnD2rlhQnOXF25qJRqR/vyMLaJzoPqzLPHGyDQP5FthrjcqgxoXo2qkhMp9EqWWHaDTTXzDZdlJAf9DPFfmiBmMFts+/oq0U0R8NrA1/GQ5YerihA3VrlZb8PkfFVlUla200G+Ws1BCo/qtf1jB6XFOq6dHwKidNplCktKA6BVuRqkpgEttqb4eDO99CkZP4hu4ks32KxMK1SWvqSzsohUnY904dNYQ1zYkpi4K4FDlriTCsK9ts1fOFOad46uYHaf4tvUgICSMs2EjWZ0XhevN31227C0NG5a+e+A== 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=2dMvKI8duvzf+XIaCG3XqBnvZl1ZmRZUyjc3LrrH+Tc=; b=fzTKxOtmny8eKwqf+guyArOD1io10N1dozdhuKaqujHz3mUBa1OpC61LFVkToy0AZKdONs1kXIE91OJdWKpaXkfMVUXur5lEYkBDL3xD6Sr03XkHZC8HyPE2QPnhBKgqLUg/DxwZwnfILTLNdwL26TexpTug9Q2Gvvch7GkswUeRwbjssywx3gOttuyTFKp10QUK+inTJbExS1VcFQbZfdCB/wWDhiQDxv1yHzVj7yDzzN61tBWDq5Pqh72d/8mgxowu6fzGt2zZEVTZslKsnUpQwP7rF2d/vVa+O9AQcQTMBNuWRfOPICDfbEvAzOkGMCwdi6jfMoZl/+m1M5qdnw== 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:15:13 +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:15:13 +0000 From: Chenbo Xia To: Maxime Coquelin CC: "dev@dpdk.org" , "david.marchand@redhat.com" Subject: Re: [PATCH v3 2/3] vhost: rework dequeue paths error handling Thread-Topic: [PATCH v3 2/3] vhost: rework dequeue paths error handling Thread-Index: AQHbZ/ymybdHpw60HEifivCK1FB3fLMZUJAA Date: Thu, 16 Jan 2025 12:15:13 +0000 Message-ID: References: <20250116095416.3655699-1-maxime.coquelin@redhat.com> <20250116095416.3655699-3-maxime.coquelin@redhat.com> In-Reply-To: <20250116095416.3655699-3-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: d4711710-1bd6-425c-987d-08dd36276df5 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?03IXwWdEY4rHuJSXQjWxCJCafjUzDBME1RQFTM/MCsthR09lQMhuIXzV58GA?= =?us-ascii?Q?YoJZYOOY/c7smaKsSiFv3BDzTvTDj28h47KwPfyJO0+Mo37D1boQltOPYWD2?= =?us-ascii?Q?6fspPZXa3nmjhDIwTUhrB+uLpF0XIXe806RvIWVjgCofRIc7CrJ85VpPd/9m?= =?us-ascii?Q?S3TIvWxmProfXIycN2y7rlQ4OcCS28twtq4wIXX0K4/oBhOZS9z0NG3Wmmyg?= =?us-ascii?Q?PiWvrONMJ4mMDxN7Zh0QvWNjSIacwiHoo24pM1VWGM9d4imFnlzFHmRrmMz9?= =?us-ascii?Q?Swm3p5wcnCeSHd+Eub2N+cmUeUT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?us-ascii?Q?DH2cWkLZv719Wm89RtMyOq932B1oUmQ5Y01Ut/IvmyCc6qd+muOBYlTViOCw?= =?us-ascii?Q?bNeNy41yIcoXz0cvhI+2trDxE1+/4Uj4mzcEC1xyvzTLuxPhIUJzL1Cq9UYp?= =?us-ascii?Q?j210TPPRZttKyR45Nz76K2LMnPhO3GnDXOIhuJn6eM/6LYtiMfOUr4qtmBRE?= =?us-ascii?Q?lQmgI/Lg2OHLW4fO2N3OXU6dB849rTrB4tTm9aYO5Kuhg44Bo0qoQ7W2YSbd?= =?us-ascii?Q?UK33vSmhq2zdpEF8UoKcIZ6do+xmg6rB?= 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?Y87TwhUNDw3RJ0NQ0lJYjtyYgp7pl0nL8FORiHyXbjN8RoQF2lhUdQlUU76j?= =?us-ascii?Q?MgoUS7f72pM2ANhH126AilAKJ4Z1Pjd1MnVYOVOKk2DBftQ7KRxQflFJbxf5?= =?us-ascii?Q?gsRWOdh+c6TYeZ2SH4i7fpxRfVrxKFI8W4PEYTCnrSNzEZ9duC1OAPPbQVFq?= =?us-ascii?Q?MX8hWYU7wFBqTx7Nocb82A1dlVC6PoeoWXNtaZLZkjXXz0BBR5aMjPYc+CPw?= =?us-ascii?Q?4Xhs+oqGWp9G8e3P15hLj/LdVati/NsZsmHd8CYqPbdovU/cxHSDWDmSUiKK?= =?us-ascii?Q?6lY4HbDtRLWe8lT8DuOHPo4IT5m6PmCEhsM1hanZFuXgmVLTM+oNt6PwhtW9?= =?us-ascii?Q?cL4nTfUNZopdXNijf7RcofB7CZKooZ4yZ/5+IVYsuaodp8eHU3F2v8jQMI37?=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v8SVtMwwef7+VZ/XD/cUg8+tK1fBC?= =?us-ascii?Q?I9DOCjog8MBW6JzX1XWS+QoyheIIeE+sGphF0og2QUPWL2NLaPXqYWCwsBd/?= =?us-ascii?Q?PaoT7gOomdIuzaSgGWr58c2TVapFqkv6j4MJzKczIEX8ofskzRBecEvYRWZW?= =?us-ascii?Q?nQxhdgNAMhCWEGVQbQgu3fJV1+ZSZDMUZd+IH+RrRe7cdTK8Uj0NPLBfHoAV?= =?us-ascii?Q?wVYRULZoYRhelbmuXRzPmRzWTflJoy2G2FU6Rh1rw4Zn1ZTnXNw87SJmr17d?= =?us-ascii?Q?WgoRDyERMVPvTZ9SodBr6kAURFwXES6j/lLaW5uI?= Content-Type: text/plain; charset="us-ascii" Content-ID: <48A7B49A4FCD0F429686BEA028157D21@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: d4711710-1bd6-425c-987d-08dd36276df5 X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Jan 2025 12:15:13.2339 (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: QFDwzQR6Hf3l+uJJpT7Bp3BNBhvm6wIHGcClPsRggE/lFgP/04spJbo4OdEoTuVQZ6idW33nMuceyGoJnrBvcg== 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 refactors the error handling in the Vhost > dequeue paths to ease its maintenance and readability. >=20 > Suggested-by: David Marchand > Signed-off-by: Maxime Coquelin > --- > lib/vhost/virtio_net.c | 58 +++++++++++++++++++----------------------- > 1 file changed, 26 insertions(+), 32 deletions(-) >=20 > diff --git a/lib/vhost/virtio_net.c b/lib/vhost/virtio_net.c > index a340e5a772..59ea2d16a5 100644 > --- a/lib/vhost/virtio_net.c > +++ b/lib/vhost/virtio_net.c > @@ -3593,6 +3593,7 @@ rte_vhost_dequeue_burst(int vid, uint16_t queue_id, > struct rte_mbuf *rarp_mbuf =3D NULL; > struct vhost_virtqueue *vq; > int16_t success =3D 1; > + uint16_t nb_rx =3D 0; >=20 > dev =3D get_device(vid); > if (!dev) > @@ -3602,25 +3603,23 @@ rte_vhost_dequeue_burst(int vid, uint16_t queue_i= d, > VHOST_DATA_LOG(dev->ifname, ERR, > "%s: built-in vhost net backend is disabled.", > __func__); > - return 0; > + goto out_no_unlock; > } >=20 > if (unlikely(!is_valid_virt_queue_idx(queue_id, 1, dev->nr_vring))= ) { > VHOST_DATA_LOG(dev->ifname, ERR, > "%s: invalid virtqueue idx %d.", > __func__, queue_id); > - return 0; > + goto out_no_unlock; > } >=20 > vq =3D dev->virtqueue[queue_id]; >=20 > if (unlikely(rte_rwlock_read_trylock(&vq->access_lock) !=3D 0)) > - return 0; > + goto out_no_unlock; >=20 > - if (unlikely(!vq->enabled)) { > - count =3D 0; > + if (unlikely(!vq->enabled)) > goto out_access_unlock; > - } >=20 > vhost_user_iotlb_rd_lock(vq); >=20 > @@ -3630,7 +3629,6 @@ rte_vhost_dequeue_burst(int vid, uint16_t queue_id, >=20 > virtio_dev_vring_translate(dev, vq); >=20 > - count =3D 0; > goto out_no_unlock; > } >=20 > @@ -3657,7 +3655,6 @@ rte_vhost_dequeue_burst(int vid, uint16_t queue_id, > rarp_mbuf =3D rte_net_make_rarp_packet(mbuf_pool, &dev->ma= c); > if (rarp_mbuf =3D=3D NULL) { > VHOST_DATA_LOG(dev->ifname, ERR, "failed to make R= ARP packet."); > - count =3D 0; > goto out; > } > /* > @@ -3672,17 +3669,17 @@ rte_vhost_dequeue_burst(int vid, uint16_t queue_i= d, >=20 > if (vq_is_packed(dev)) { > if (dev->flags & VIRTIO_DEV_LEGACY_OL_FLAGS) > - count =3D virtio_dev_tx_packed_legacy(dev, vq, mb= uf_pool, pkts, count); > + nb_rx =3D virtio_dev_tx_packed_legacy(dev, vq, mb= uf_pool, pkts, count); > else > - count =3D virtio_dev_tx_packed_compliant(dev, vq,= mbuf_pool, pkts, count); > + nb_rx =3D virtio_dev_tx_packed_compliant(dev, vq,= mbuf_pool, pkts, count); > } else { > if (dev->flags & VIRTIO_DEV_LEGACY_OL_FLAGS) > - count =3D virtio_dev_tx_split_legacy(dev, vq, mbu= f_pool, pkts, count); > + nb_rx =3D virtio_dev_tx_split_legacy(dev, vq, mbu= f_pool, pkts, count); > else > - count =3D virtio_dev_tx_split_compliant(dev, vq, = mbuf_pool, pkts, count); > + nb_rx =3D virtio_dev_tx_split_compliant(dev, vq, = mbuf_pool, pkts, count); > } >=20 > - vhost_queue_stats_update(dev, vq, pkts, count); > + vhost_queue_stats_update(dev, vq, pkts, nb_rx); >=20 > out: > vhost_user_iotlb_rd_unlock(vq); > @@ -3691,10 +3688,10 @@ rte_vhost_dequeue_burst(int vid, uint16_t queue_i= d, > rte_rwlock_read_unlock(&vq->access_lock); >=20 > if (unlikely(rarp_mbuf !=3D NULL)) > - count +=3D 1; > + nb_rx +=3D 1; >=20 > out_no_unlock: > - return count; > + return nb_rx; > } >=20 > static __rte_always_inline uint16_t > @@ -4200,52 +4197,51 @@ rte_vhost_async_try_dequeue_burst(int vid, uint16= _t queue_id, > struct rte_mbuf *rarp_mbuf =3D NULL; > struct vhost_virtqueue *vq; > int16_t success =3D 1; > + uint16_t nb_rx =3D 0; >=20 > dev =3D get_device(vid); > if (!dev || !nr_inflight) > - return 0; > + goto out_no_unlock; >=20 > *nr_inflight =3D -1; >=20 > if (unlikely(!(dev->flags & VIRTIO_DEV_BUILTIN_VIRTIO_NET))) { > VHOST_DATA_LOG(dev->ifname, ERR, "%s: built-in vhost net b= ackend is disabled.", > __func__); > - return 0; > + goto out_no_unlock; > } >=20 > if (unlikely(!is_valid_virt_queue_idx(queue_id, 1, dev->nr_vring))= ) { > VHOST_DATA_LOG(dev->ifname, ERR, "%s: invalid virtqueue id= x %d.", > __func__, queue_id); > - return 0; > + goto out_no_unlock; > } >=20 > if (unlikely(dma_id < 0 || dma_id >=3D RTE_DMADEV_DEFAULT_MAX)) { > VHOST_DATA_LOG(dev->ifname, ERR, "%s: invalid dma id %d.", > __func__, dma_id); > - return 0; > + goto out_no_unlock; > } >=20 > if (unlikely(!dma_copy_track[dma_id].vchans || > !dma_copy_track[dma_id].vchans[vchan_id].p= kts_cmpl_flag_addr)) { > VHOST_DATA_LOG(dev->ifname, ERR, "%s: invalid channel %d:%= u.", > __func__, dma_id, vchan_id); > - return 0; > + goto out_no_unlock; > } >=20 > vq =3D dev->virtqueue[queue_id]; >=20 > if (unlikely(rte_rwlock_read_trylock(&vq->access_lock) !=3D 0)) > - return 0; > + goto out_no_unlock; >=20 > if (unlikely(vq->enabled =3D=3D 0)) { > - count =3D 0; > goto out_access_unlock; > } >=20 > if (unlikely(!vq->async)) { > VHOST_DATA_LOG(dev->ifname, ERR, "%s: async not registered= for queue id %d.", > __func__, queue_id); > - count =3D 0; > goto out_access_unlock; > } >=20 > @@ -4256,7 +4252,6 @@ rte_vhost_async_try_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 > @@ -4283,7 +4278,6 @@ rte_vhost_async_try_dequeue_burst(int vid, uint16_t= queue_id, > rarp_mbuf =3D rte_net_make_rarp_packet(mbuf_pool, &dev->ma= c); > if (rarp_mbuf =3D=3D NULL) { > VHOST_DATA_LOG(dev->ifname, ERR, "failed to make R= ARP packet."); > - count =3D 0; > goto out; > } > /* > @@ -4298,22 +4292,22 @@ rte_vhost_async_try_dequeue_burst(int vid, uint16= _t queue_id, >=20 > if (vq_is_packed(dev)) { > if (dev->flags & VIRTIO_DEV_LEGACY_OL_FLAGS) > - count =3D virtio_dev_tx_async_packed_legacy(dev, = vq, mbuf_pool, > + nb_rx =3D virtio_dev_tx_async_packed_legacy(dev, = vq, mbuf_pool, > pkts, count, dma_id, vchan_id); > else > - count =3D virtio_dev_tx_async_packed_compliant(de= v, vq, mbuf_pool, > + nb_rx =3D virtio_dev_tx_async_packed_compliant(de= v, vq, mbuf_pool, > pkts, count, dma_id, vchan_id); > } else { > if (dev->flags & VIRTIO_DEV_LEGACY_OL_FLAGS) > - count =3D virtio_dev_tx_async_split_legacy(dev, v= q, mbuf_pool, > + nb_rx =3D virtio_dev_tx_async_split_legacy(dev, v= q, mbuf_pool, > pkts, count, dma_id, vchan_id); > else > - count =3D virtio_dev_tx_async_split_compliant(dev= , vq, mbuf_pool, > + nb_rx =3D virtio_dev_tx_async_split_compliant(dev= , vq, mbuf_pool, > pkts, count, dma_id, vchan_id); > } >=20 > *nr_inflight =3D vq->async->pkts_inflight_n; > - vhost_queue_stats_update(dev, vq, pkts, count); > + vhost_queue_stats_update(dev, vq, pkts, nb_rx); >=20 > out: > vhost_user_iotlb_rd_unlock(vq); > @@ -4322,8 +4316,8 @@ rte_vhost_async_try_dequeue_burst(int vid, uint16_t= queue_id, > rte_rwlock_read_unlock(&vq->access_lock); >=20 > if (unlikely(rarp_mbuf !=3D NULL)) > - count +=3D 1; > + nb_rx +=3D 1; >=20 > out_no_unlock: > - return count; > + return nb_rx; > } > -- > 2.47.1 >=20 Reviewed-by: Chenbo Xia