[dpdk-dev] [PATCH 18/22] virtio: Fix descriptor index issue
Stephen Hemminger
stephen at networkplumber.org
Thu Jan 15 17:54:02 CET 2015
On Thu, 15 Jan 2015 13:15:26 +0800
Ouyang Changchun <changchun.ouyang at intel.com> wrote:
> It should use vring descriptor index instead of used_ring index to index vq_descx.
>
> Signed-off-by: Changchun Ouyang <changchun.ouyang at intel.com>
> ---
> lib/librte_pmd_virtio/virtio_rxtx.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/librte_pmd_virtio/virtio_rxtx.c b/lib/librte_pmd_virtio/virtio_rxtx.c
> index 12c2310..2529dc4 100644
> --- a/lib/librte_pmd_virtio/virtio_rxtx.c
> +++ b/lib/librte_pmd_virtio/virtio_rxtx.c
> @@ -144,9 +144,9 @@ virtio_xmit_cleanup(struct virtqueue *vq, uint16_t num)
>
> used_idx = (uint16_t)(vq->vq_used_cons_idx & (vq->vq_nentries - 1));
> uep = &vq->vq_ring.used->ring[used_idx];
> - dxp = &vq->vq_descx[used_idx];
>
> desc_idx = (uint16_t) uep->id;
> + dxp = &vq->vq_descx[desc_idx];
> vq->vq_used_cons_idx++;
> vq_ring_free_chain(vq, desc_idx);
>
Rather than patching a code added by earlier patch in series, why
not just fix/merge the two patches?
More information about the dev
mailing list