[dpdk-stable] patch 'net/virtio: fix mbuf port for simple Rx function' has been queued to LTS release 16.11.4

luca.boccassi at gmail.com luca.boccassi at gmail.com
Mon Oct 30 16:34:45 CET 2017


FYI, your patch has been queued to LTS release 16.11.4

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


Kind regards,
Luca Boccassi

>From cd893c90234f400679ee5ccd56812ade596e999e Mon Sep 17 00:00:00 2001
From: Olivier Matz <olivier.matz at 6wind.com>
Date: Thu, 7 Sep 2017 14:13:42 +0200
Subject: [PATCH] net/virtio: fix mbuf port for simple Rx function

[ upstream commit 0c4f909c17af3cff8859439436a8fa0b9a9689c5 ]

The mbuf->port 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 correct 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>
Acked-by: Yuanhan Liu <yliu at fridaylinux.org>
 drivers/net/virtio/virtio_rxtx_simple.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/virtio/virtio_rxtx_simple.c b/drivers/net/virtio/virtio_rxtx_simple.c
index b651e53b2..a6c0b34e7 100644
--- a/drivers/net/virtio/virtio_rxtx_simple.c
+++ b/drivers/net/virtio/virtio_rxtx_simple.c
@@ -65,6 +65,8 @@ virtqueue_enqueue_recv_refill_simple(struct virtqueue *vq,
 	struct vring_desc *start_dp;
 	uint16_t desc_idx;
+	cookie->port = vq->rxq.port_id;
 	desc_idx = vq->vq_avail_idx & (vq->vq_nentries - 1);
 	dxp = &vq->vq_descx[desc_idx];
 	dxp->cookie = (void *)cookie;

More information about the stable mailing list