From: Olivier Matz Date: Thu, 7 Sep 2017 12:13:47 +0000 (+0200) Subject: net/virtio: fix Rx handler when checksum is requested X-Git-Tag: spdx-start~1658 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=16e48c9ed71d2160ccd7ade231b386638613fc82;p=dpdk.git net/virtio: fix Rx handler when checksum is requested 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 Acked-by: Yuanhan Liu --- diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c index 07eb723773..a006d4982d 100644 --- a/drivers/net/virtio/virtio_ethdev.c +++ b/drivers/net/virtio/virtio_ethdev.c @@ -1756,6 +1756,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; }