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 <[email protected]> --- 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

