[dpdk-dev] [PATCH 1/3] net/virtio: fix improper read barriers on packed Tx cleanup

Jens Freimann jfreimann at redhat.com
Fri Jan 25 13:43:03 CET 2019


On Thu, Jan 24, 2019 at 07:59:00PM +0300, Ilya Maximets wrote:
>Read barrier must be implied between reading descriptor flags
>and descriptor id. Otherwise, in case of reordering, we could
>read wrong descriptor id.
>
>For the reference, similar barrier for split rings is the read
>barrier between VIRTQUEUE_NUSED (reading the used->idx) and
>the call to the virtio_xmit_cleanup().
>
>Additionally removed double update of 'used_idx'. It's enough
>to set it in the end of the loop.
>
>Fixes: 892dc798fa9c ("net/virtio: implement Tx path for packed queues")
>Cc: stable at dpdk.org
>
>Signed-off-by: Ilya Maximets <i.maximets at samsung.com>
>---
> drivers/net/virtio/virtio_rxtx.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>

Reviewed-by: Jens Freimann <jfreimann at redhat.com>




More information about the dev mailing list