net/i40e: ensure vector mode is not used with QinQ
authorBernard Iremonger <bernard.iremonger@intel.com>
Thu, 13 Apr 2017 09:53:05 +0000 (10:53 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 19 Apr 2017 13:37:37 +0000 (15:37 +0200)
In rx vector mode, QinQ is not supported.
When hw_vlan_extend is set for QinQ ensure that
rx vector mode is not selected.

Fixes: 8e109464c022 ("i40e: allow vector Rx and Tx usage")
Cc: stable@dpdk.org
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
drivers/net/i40e/i40e_rxtx_vec_common.h

index 952fd4b..6920966 100644 (file)
@@ -234,6 +234,10 @@ i40e_rx_vec_dev_conf_condition_check_default(struct rte_eth_dev *dev)
        if (rxmode->header_split == 1)
                return -1;
 
+       /* no QinQ support */
+       if (rxmode->hw_vlan_extend == 1)
+               return -1;
+
        return 0;
 #else
        RTE_SET_USED(dev);