This driver does not support receive IP checksum offload,
therefore must check and return error if configured incorrectly.

Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>


--- a/lib/librte_pmd_virtio/virtio_ethdev.c     2014-06-13 17:55:19.928278206 
-0700
+++ b/lib/librte_pmd_virtio/virtio_ethdev.c     2014-06-13 17:56:08.080371208 
-0700
@@ -901,8 +901,17 @@ virtio_dev_tx_queue_release(__rte_unused
  * 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;
 }


Reply via email to