DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: maxime.coquelin@redhat.com, dev@dpdk.org
Cc: bruce.richardson@intel.com, Chenbo Xia <chenbox@nvidia.com>
Subject: [PATCH v2 5/6] vhost: rename packed layout helpers for batches
Date: Fri,  4 Sep 2026 09:46:47 +0200	[thread overview]
Message-ID: <20260904074649.1979166-6-david.marchand@redhat.com> (raw)
In-Reply-To: <20260904074649.1979166-1-david.marchand@redhat.com>

Now that the async datapath has been removed, the _sync in function names
gives no useful information.

Besides, vhost_reserve_avail_batch_packed does not reserve anything and
its name is confusing, rename it following the other rx/tx split/packed
helpers convention.

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 lib/vhost/virtio_net.c | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/lib/vhost/virtio_net.c b/lib/vhost/virtio_net.c
index 9ad7fa3295..79034ae036 100644
--- a/lib/vhost/virtio_net.c
+++ b/lib/vhost/virtio_net.c
@@ -1111,7 +1111,7 @@ virtio_dev_rx_split(struct virtio_net *dev, struct vhost_virtqueue *vq,
 }
 
 static __rte_always_inline int
-virtio_dev_rx_sync_batch_check(struct virtio_net *dev,
+virtio_dev_rx_batch_check(struct virtio_net *dev,
 			   struct vhost_virtqueue *vq,
 			   struct rte_mbuf **pkts,
 			   uint64_t *desc_addrs,
@@ -1213,7 +1213,7 @@ virtio_dev_rx_batch_packed_copy(struct virtio_net *dev,
 }
 
 static __rte_always_inline int
-virtio_dev_rx_sync_batch_packed(struct virtio_net *dev,
+virtio_dev_rx_batch_packed(struct virtio_net *dev,
 			   struct vhost_virtqueue *vq,
 			   struct rte_mbuf **pkts)
 	__rte_requires_shared_capability(&vq->iotlb_lock)
@@ -1221,7 +1221,7 @@ virtio_dev_rx_sync_batch_packed(struct virtio_net *dev,
 	uint64_t desc_addrs[PACKED_BATCH_SIZE];
 	uint64_t lens[PACKED_BATCH_SIZE];
 
-	if (virtio_dev_rx_sync_batch_check(dev, vq, pkts, desc_addrs, lens) == -1)
+	if (virtio_dev_rx_batch_check(dev, vq, pkts, desc_addrs, lens) == -1)
 		return -1;
 
 	if (vq->shadow_used_idx) {
@@ -1273,8 +1273,7 @@ virtio_dev_rx_packed(struct virtio_net *dev,
 		rte_prefetch0(&vq->desc_packed[vq->last_avail_idx]);
 
 		if (count - pkt_idx >= PACKED_BATCH_SIZE) {
-			if (!virtio_dev_rx_sync_batch_packed(dev, vq,
-							&pkts[pkt_idx])) {
+			if (!virtio_dev_rx_batch_packed(dev, vq, &pkts[pkt_idx])) {
 				pkt_idx += PACKED_BATCH_SIZE;
 				continue;
 			}
@@ -1971,7 +1970,7 @@ virtio_dev_tx_split_compliant(struct virtio_net *dev,
 }
 
 static __rte_always_inline int
-vhost_reserve_avail_batch_packed(struct virtio_net *dev,
+virtio_dev_tx_batch_packed_check(struct virtio_net *dev,
 				 struct vhost_virtqueue *vq,
 				 struct rte_mbuf **pkts,
 				 uint16_t avail_idx,
@@ -2055,8 +2054,7 @@ virtio_dev_tx_batch_packed(struct virtio_net *dev,
 	uint16_t ids[PACKED_BATCH_SIZE];
 	uint16_t i;
 
-	if (vhost_reserve_avail_batch_packed(dev, vq, pkts, avail_idx,
-					     desc_addrs, ids))
+	if (virtio_dev_tx_batch_packed_check(dev, vq, pkts, avail_idx, desc_addrs, ids))
 		return -1;
 
 	vhost_for_each_try_unroll(i, 0, PACKED_BATCH_SIZE)
-- 
2.54.0


  parent reply	other threads:[~2026-09-04  7:47 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-23 15:31 [RFC 0/3] Drop vhost async (DMA-accelerated) datapath David Marchand
2026-07-23 15:31 ` [RFC 1/3] examples: stop using vhost async datapath David Marchand
2026-08-25 11:39   ` David Marchand
2026-07-23 15:31 ` [RFC 2/3] vhost: refuse " David Marchand
2026-07-23 15:31 ` [RFC 3/3] vhost: drop " David Marchand
2026-08-18  9:10 ` [RFC 0/3] Drop vhost async (DMA-accelerated) datapath Maxime Coquelin
2026-08-26 14:02 ` [PATCH 0/5] " David Marchand
2026-08-26 14:02   ` [PATCH 1/5] vhost: decouple guest pages population from async datapath David Marchand
2026-08-26 14:02   ` [PATCH 2/5] examples/vhost: stop using " David Marchand
2026-08-26 14:02   ` [PATCH 3/5] vhost: drop " David Marchand
2026-08-26 14:02   ` [PATCH 4/5] vhost: rename packed layout helpers for batches David Marchand
2026-08-26 14:02   ` [PATCH 5/5] vhost: simplify some descriptor handling David Marchand
2026-09-04  7:46 ` [PATCH v2 0/6] Drop vhost async (DMA-accelerated) datapath David Marchand
2026-09-04  7:46   ` [PATCH v2 1/6] vhost: decouple guest pages population from async datapath David Marchand
2026-09-04  7:46   ` [PATCH v2 2/6] examples/vhost: stop using " David Marchand
2026-09-04  7:46   ` [PATCH v2 3/6] examples/vdpa: remove dependency on PCI library David Marchand
2026-09-04  7:46   ` [PATCH v2 4/6] vhost: drop async datapath David Marchand
2026-09-04  7:46   ` David Marchand [this message]
2026-09-04  7:46   ` [PATCH v2 6/6] vhost: simplify some descriptor handling David Marchand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260904074649.1979166-6-david.marchand@redhat.com \
    --to=david.marchand@redhat.com \
    --cc=bruce.richardson@intel.com \
    --cc=chenbox@nvidia.com \
    --cc=dev@dpdk.org \
    --cc=maxime.coquelin@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox