Allow running x710 in --VM mode 11/5211/1
authorIdo Barnea <[email protected]>
Sun, 25 Dec 2016 12:19:59 +0000 (14:19 +0200)
committerIdo Barnea <[email protected]>
Sun, 25 Dec 2016 12:19:59 +0000 (14:19 +0200)
Signed-off-by: Ido Barnea <[email protected]>
src/main_dpdk.cpp

index 95ab22b..e1ddc02 100644 (file)
@@ -6383,6 +6383,11 @@ static struct fdir_hw_id_params_t fdir_hw_id_rule_params[512];
 // So, the rule will apply if packet has either the correct ttl or IP ID, depending if we are in statfull or stateless.
 void CTRexExtendedDriverBase40G::add_del_rules(enum rte_filter_op op, uint8_t port_id, uint16_t type, uint8_t ttl
                                                , uint16_t ip_id, uint8_t l4_proto, int queue, uint16_t stat_idx) {
+    // We want to allow the use of X710 in "VM mode", for performance testing.
+    // In this mode, we don't want any hardware rules. Everything done by software.
+    if ( get_vm_one_queue_enable())
+         return;
+
     int ret=rte_eth_dev_filter_supported(port_id, RTE_ETH_FILTER_FDIR);
     static int filter_soft_id = 0;