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 128873230; Thu, 31 Aug 2017 15:40:55 +0200 (CEST) Received: from glumotte.dev.6wind.com (unknown [10.16.0.195]) by proxy.6wind.com (Postfix) with ESMTP id 293C5C9BD4; Thu, 31 Aug 2017 15:37:33 +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:15 +0200 Message-Id: <20170831134015.1383-10-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 9/9] net/virtio: fix Rx handler when checksum is requested 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 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") Cc: stable@dpdk.org 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 4845d44b0..0e616bcf0 100644 --- a/drivers/net/virtio/virtio_ethdev.c +++ b/drivers/net/virtio/virtio_ethdev.c @@ -1760,6 +1760,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