From 8fc9eaaac7181bdfc024230a63a89d550c625dd0 Mon Sep 17 00:00:00 2001 From: Joyce Kong Date: Mon, 21 Dec 2020 23:50:28 +0800 Subject: [PATCH] vhost: remove unnecessary SMP barrier for desc flags As function desc_is_avail performs a load-acquire barrier to enforce the ordering between desc flags and desc content, it is unnecessary to add a rte_smp_rmb barrier around the trace which follows desc_is_avail. Signed-off-by: Joyce Kong Reviewed-by: Ruifeng Wang Reviewed-by: Maxime Coquelin --- lib/librte_vhost/virtio_net.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c index 6c5128665e..ae67237669 100644 --- a/lib/librte_vhost/virtio_net.c +++ b/lib/librte_vhost/virtio_net.c @@ -1281,8 +1281,6 @@ virtio_dev_rx_batch_packed(struct virtio_net *dev, return -1; } - rte_smp_rmb(); - vhost_for_each_try_unroll(i, 0, PACKED_BATCH_SIZE) lens[i] = descs[avail_idx + i].len; @@ -1343,7 +1341,6 @@ virtio_dev_rx_single_packed(struct virtio_net *dev, struct buf_vector buf_vec[BUF_VECTOR_MAX]; uint16_t nr_descs = 0; - rte_smp_rmb(); if (unlikely(vhost_enqueue_single_packed(dev, vq, pkt, buf_vec, &nr_descs) < 0)) { VHOST_LOG_DATA(DEBUG, -- 2.39.5