From: Joyce Kong Date: Mon, 21 Dec 2020 14:23:20 +0000 (+0800) Subject: net/virtio: replace full barrier with relaxed ones for Arm X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=e51a474ceda7fbdbb3c1b8ef37794496a86ccdf6;p=dpdk.git net/virtio: replace full barrier with relaxed ones for Arm Relax the full write barriers to one-way barriers for virtio control path for Arm platform Signed-off-by: Joyce Kong Reviewed-by: Ruifeng Wang Reviewed-by: Maxime Coquelin --- diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c index 9600624d08..92a3d4efa5 100644 --- a/drivers/net/virtio/virtio_ethdev.c +++ b/drivers/net/virtio/virtio_ethdev.c @@ -203,8 +203,8 @@ virtio_send_command_packed(struct virtnet_ctl *cvq, vq->vq_packed.cached_flags ^= VRING_PACKED_DESC_F_AVAIL_USED; } - virtio_wmb(vq->hw->weak_barriers); - desc[head].flags = VRING_DESC_F_NEXT | flags; + virtqueue_store_flags_packed(&desc[head], VRING_DESC_F_NEXT | flags, + vq->hw->weak_barriers); virtio_wmb(vq->hw->weak_barriers); virtqueue_notify(vq);