net/ipn3ke: remove configuration for i40e port bonding
[dpdk.git] / drivers / net / ipn3ke / ipn3ke_representor.c
index d37f5e2..8d9ebef 100644 (file)
@@ -2914,12 +2914,18 @@ ipn3ke_rpst_init(struct rte_eth_dev *ethdev, void *init_params)
        if (representor_param->port_id >= representor_param->hw->port_num)
                return -ENODEV;
 
+       if (ipn3ke_bridge_func.set_i40e_sw_dev == NULL)
+               return -ENOMEM;
+
        rpst->ethdev = ethdev;
        rpst->switch_domain_id = representor_param->switch_domain_id;
        rpst->port_id = representor_param->port_id;
        rpst->hw = representor_param->hw;
-       rpst->i40e_pf_eth = NULL;
-       rpst->i40e_pf_eth_port_id = 0xFFFF;
+       rpst->i40e_pf_eth = representor_param->i40e_pf_eth;
+       rpst->i40e_pf_eth_port_id = representor_param->i40e_pf_eth_port_id;
+       if (rpst->i40e_pf_eth)
+               ipn3ke_bridge_func.set_i40e_sw_dev(rpst->i40e_pf_eth_port_id,
+                                           rpst->ethdev);
 
        ethdev->data->mac_addrs = rte_zmalloc("ipn3ke", RTE_ETHER_ADDR_LEN, 0);
        if (!ethdev->data->mac_addrs) {