numam-dpdk/drivers/net/virtio
Maxime Coquelin 4785747066 net/virtio: fix resuming port with Rx vector path
Since commit efc83a1e7f ("net/virtio: fix queue setup consistency"),
when resuming a virtio port, the rx rings are refilled with new mbufs
until they are full (vq->vq_free_cnt == 0). This is done without
ensuring that the descriptor index remains a multiple of
RTE_VIRTIO_VPMD_RX_REARM_THRESH, which is a prerequisite when using the
vector mode. This can cause an out of bound access in the rx ring.

This commit changes the vector refill method from
virtqueue_enqueue_recv_refill_simple() to virtio_rxq_rearm_vec(), which
properly checks that the refill is done by batch of
RTE_VIRTIO_VPMD_RX_REARM_THRESH.

As virtqueue_enqueue_recv_refill_simple() is no more used, this
patch also removes the function.

Fixes: efc83a1e7f ("net/virtio: fix queue setup consistency")
Cc: stable@dpdk.org

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Jianfeng Tan <jianfeng.tan@intel.com>
2018-02-13 18:57:59 +01:00
..
virtio_user net/virtio-user: fix crash as features change 2018-01-29 10:04:28 +01:00
Makefile mk: add experimental tag check 2018-01-29 23:35:29 +01:00
rte_pmd_virtio_version.map
virtio_ethdev.c net/virtio: fix crash while freeing mbufs 2018-02-05 19:56:04 +01:00
virtio_ethdev.h net/virtio: support guest announce 2018-01-21 15:51:52 +01:00
virtio_logs.h net/virtio: implement dynamic logging 2018-01-16 18:47:49 +01:00
virtio_pci.c drivers: use SPDX tag for Intel copyright files 2018-01-04 22:41:39 +01:00
virtio_pci.h ethdev: separate driver APIs 2018-01-22 01:26:49 +01:00
virtio_ring.h drivers: use SPDX tag for Intel copyright files 2018-01-04 22:41:39 +01:00
virtio_rxtx_simple_neon.c ethdev: separate driver APIs 2018-01-22 01:26:49 +01:00
virtio_rxtx_simple_sse.c ethdev: separate driver APIs 2018-01-22 01:26:49 +01:00
virtio_rxtx_simple.c net/virtio: fix resuming port with Rx vector path 2018-02-13 18:57:59 +01:00
virtio_rxtx_simple.h net/virtio: fix resuming port with Rx vector path 2018-02-13 18:57:59 +01:00
virtio_rxtx.c net/virtio: fix resuming port with Rx vector path 2018-02-13 18:57:59 +01:00
virtio_rxtx.h net/virtio: fix resuming port with Rx vector path 2018-02-13 18:57:59 +01:00
virtio_user_ethdev.c net/virtio-user: check error on clearing non block flag 2018-02-06 22:09:17 +01:00
virtqueue.c net/virtio: fix typo in function name 2018-01-29 10:04:28 +01:00
virtqueue.h net/virtio: fix typo in function name 2018-01-29 10:04:28 +01:00