]> git.droids-corp.org - dpdk.git/blobdiff - drivers/net/ice/ice_dcf_parent.c
net/ice: enable switch flow on DCF
[dpdk.git] / drivers / net / ice / ice_dcf_parent.c
index ff08292a14f4f2b8c11c10f23031ee32c44f8e93..37f0e2be2cc49d92f406efcb3828c982a20e1f45 100644 (file)
@@ -9,6 +9,7 @@
 #include <rte_spinlock.h>
 
 #include "ice_dcf_ethdev.h"
+#include "ice_generic_flow.h"
 
 #define ICE_DCF_VSI_UPDATE_SERVICE_INTERVAL    100000 /* us */
 static rte_spinlock_t vsi_update_lock = RTE_SPINLOCK_INITIALIZER;
@@ -321,6 +322,12 @@ ice_dcf_init_parent_adapter(struct rte_eth_dev *eth_dev)
        }
        parent_adapter->active_pkg_type = ice_load_pkg_type(parent_hw);
 
+       err = ice_flow_init(parent_adapter);
+       if (err) {
+               PMD_INIT_LOG(ERR, "Failed to initialize flow");
+               goto uninit_hw;
+       }
+
        ice_dcf_update_vf_vsi_map(parent_hw, hw->num_vfs, hw->vf_vsi_map);
 
        mac = (const struct rte_ether_addr *)hw->avf.mac.addr;
@@ -347,5 +354,6 @@ ice_dcf_uninit_parent_adapter(struct rte_eth_dev *eth_dev)
 
        eth_dev->data->mac_addrs = NULL;
 
+       ice_flow_uninit(parent_adapter);
        ice_dcf_uninit_parent_hw(parent_hw);
 }