vhost: remove unnecessary SMP barrier for avail idx
The ordering between avail index and desc reads has been enforced by load-acquire for split vring, so smp_rmb barrier is not needed behind it. Signed-off-by: Joyce Kong <joyce.kong@arm.com> Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
This commit is contained in:
parent
8fc9eaaac7
commit
2d031675b2
@ -1494,13 +1494,10 @@ virtio_dev_rx_async_submit_split(struct virtio_net *dev,
|
||||
struct async_inflight_info *pkts_info = vq->async_pkts_info;
|
||||
int n_pkts = 0;
|
||||
|
||||
avail_head = __atomic_load_n(&vq->avail->idx, __ATOMIC_ACQUIRE);
|
||||
|
||||
/*
|
||||
* The ordering between avail index and
|
||||
* desc reads needs to be enforced.
|
||||
* The ordering between avail index and desc reads need to be enforced.
|
||||
*/
|
||||
rte_smp_rmb();
|
||||
avail_head = __atomic_load_n(&vq->avail->idx, __ATOMIC_ACQUIRE);
|
||||
|
||||
rte_prefetch0(&vq->avail->ring[vq->last_avail_idx & (vq->size - 1)]);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user