From 11efa9f07c7b8dfaf0faa5fcb6a1a6ae0826a4db Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Fri, 13 Jun 2014 18:06:22 -0700 Subject: [PATCH] virtio: check for ip checksum offload This driver does not support receive IP checksum offload, therefore must check and return error if configured incorrectly. Signed-off-by: Stephen Hemminger Acked-by: Alan Carew --- lib/librte_pmd_virtio/virtio_ethdev.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/librte_pmd_virtio/virtio_ethdev.c b/lib/librte_pmd_virtio/virtio_ethdev.c index 5af71bdf72..6688ac7390 100644 --- a/lib/librte_pmd_virtio/virtio_ethdev.c +++ b/lib/librte_pmd_virtio/virtio_ethdev.c @@ -926,8 +926,17 @@ virtio_dev_tx_queue_release(__rte_unused void *txq) * It returns 0 on success. */ static int -virtio_dev_configure(__rte_unused struct rte_eth_dev *dev) +virtio_dev_configure(struct rte_eth_dev *dev) { + const struct rte_eth_rxmode *rxmode = &dev->data->dev_conf.rxmode; + + PMD_INIT_LOG(DEBUG, "configure"); + + if (rxmode->hw_ip_checksum) { + PMD_DRV_LOG(ERR, "HW IP checksum not supported"); + return (-EINVAL); + } + return 0; } -- 2.20.1