From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from proxy.6wind.com (host.76.145.23.62.rev.coltfrance.com [62.23.145.76]) by dpdk.org (Postfix) with ESMTP id 42456199BF; Thu, 7 Sep 2017 14:14:26 +0200 (CEST) Received: from glumotte.dev.6wind.com (unknown [10.16.0.195]) by proxy.6wind.com (Postfix) with ESMTP id 06458CD5C5; Thu, 7 Sep 2017 14:10:17 +0200 (CEST) From: Olivier Matz To: dev@dpdk.org, yliu@fridaylinux.org, maxime.coquelin@redhat.com Cc: stephen@networkplumber.org, stable@dpdk.org Date: Thu, 7 Sep 2017 14:13:42 +0200 Message-Id: <20170907121347.16208-6-olivier.matz@6wind.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170907121347.16208-1-olivier.matz@6wind.com> References: <20170831134015.1383-1-olivier.matz@6wind.com> <20170907121347.16208-1-olivier.matz@6wind.com> Subject: [dpdk-stable] [PATCH v2 05/10] net/virtio: fix mbuf port for simple Rx function X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Sep 2017 12:14:26 -0000 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") Cc: stable@dpdk.org Signed-off-by: Olivier Matz --- 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 542cf805d..54ababae9 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; -- 2.11.0