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 D61162C6D; Thu, 31 Aug 2017 15:40:54 +0200 (CEST) Received: from glumotte.dev.6wind.com (unknown [10.16.0.195]) by proxy.6wind.com (Postfix) with ESMTP id E776CC9BD0; Thu, 31 Aug 2017 15:37:32 +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, 31 Aug 2017 15:40:11 +0200 Message-Id: <20170831134015.1383-6-olivier.matz@6wind.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170831134015.1383-1-olivier.matz@6wind.com> References: <20170831134015.1383-1-olivier.matz@6wind.com> Subject: [dpdk-dev] [PATCH 5/9] net/virtio: fix mbuf port for simple Rx function X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Aug 2017 13:40:56 -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