[dpdk-stable] patch 'net/virtio: fix mbuf data offset for simple Rx' has been queued to LTS release 16.11.5

Luca Boccassi bluca at debian.org
Thu Feb 15 13:03:04 CET 2018


Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/17/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 7afdb08d88e46b6dabb71a5d3cbfb8c473f2c4be Mon Sep 17 00:00:00 2001
From: Olivier Matz <olivier.matz at 6wind.com>
Date: Mon, 12 Feb 2018 16:46:10 +0100
Subject: [PATCH] net/virtio: fix mbuf data offset for simple Rx

[ upstream commit 9fedc2da388cbe261e43c7b1cafb7463ccce3747 ]

The mbuf->data_off was was not properly set for the first received
mbufs. Fix this by setting it in virtqueue_enqueue_recv_refill_simple(),
which is used to enqueue the first mbuf in the ring.

The function virtio_rxq_rearm_vec(), which is used to rearm the ring
with new mbufs, is valid and does not need to be updated.

Fixes: cab0461234e7 ("virtio: fill Rx avail ring with blank mbufs")

Signed-off-by: Olivier Matz <olivier.matz at 6wind.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>
---
 drivers/net/virtio/virtio_rxtx_simple.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/virtio/virtio_rxtx_simple.c b/drivers/net/virtio/virtio_rxtx_simple.c
index a6c0b34e7..aa29b6eec 100644
--- a/drivers/net/virtio/virtio_rxtx_simple.c
+++ b/drivers/net/virtio/virtio_rxtx_simple.c
@@ -66,6 +66,7 @@ virtqueue_enqueue_recv_refill_simple(struct virtqueue *vq,
 	uint16_t desc_idx;
 
 	cookie->port = vq->rxq.port_id;
+	cookie->data_off = RTE_PKTMBUF_HEADROOM;
 
 	desc_idx = vq->vq_avail_idx & (vq->vq_nentries - 1);
 	dxp = &vq->vq_descx[desc_idx];
-- 
2.14.2



More information about the stable mailing list