From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olivier Matz Subject: [PATCH v2 10/10] net/virtio: fix Rx handler when checksum is requested Date: Thu, 7 Sep 2017 14:13:47 +0200 Message-ID: <20170907121347.16208-11-olivier.matz@6wind.com> References: <20170831134015.1383-1-olivier.matz@6wind.com> <20170907121347.16208-1-olivier.matz@6wind.com> Cc: stephen@networkplumber.org To: dev@dpdk.org, yliu@fridaylinux.org, maxime.coquelin@redhat.com 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 16573199BC for ; Thu, 7 Sep 2017 14:14:04 +0200 (CEST) In-Reply-To: <20170907121347.16208-1-olivier.matz@6wind.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" The simple Rx handler is selected even if Rx checksum offload is requested by the application, but this handler does not support offloads. This results in broken received packets (no checksum flag but invalid checksum in the mbuf data). Disable the simple Rx handler in that case. Fixes: 96cb6711939e ("net/virtio: support Rx checksum offload") Signed-off-by: Olivier Matz --- drivers/net/virtio/virtio_ethdev.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c index 271ebaedf..440c2d3b1 100644 --- a/drivers/net/virtio/virtio_ethdev.c +++ b/drivers/net/virtio/virtio_ethdev.c @@ -1755,6 +1755,9 @@ virtio_dev_configure(struct rte_eth_dev *dev) hw->use_simple_tx = 0; } + if (rxmode->hw_ip_checksum) + hw->use_simple_rx = 0; + return 0; } -- 2.11.0