X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;ds=inline;f=drivers%2Fnet%2Fipn3ke%2Fipn3ke_representor.c;h=b673c49149a6efbba9de9b36384cdb60a0d8bb1d;hb=fae4b8c47c25286e5d87cde55ff16d1bed298e15;hp=4bd2d016b4b95c6acc33a79734e0932815a99401;hpb=9970a9ad07db7745ca6bc441819b287940ae86ea;p=dpdk.git diff --git a/drivers/net/ipn3ke/ipn3ke_representor.c b/drivers/net/ipn3ke/ipn3ke_representor.c index 4bd2d016b4..b673c49149 100644 --- a/drivers/net/ipn3ke/ipn3ke_representor.c +++ b/drivers/net/ipn3ke/ipn3ke_representor.c @@ -701,7 +701,7 @@ struct ipn3ke_rpst_hw_port_stats *hw_stats) &tmp, IPN3KE_25G_TX_STATISTICS_STATUS, port_id, - 1); + 0); if (tmp & IPN3KE_25G_TX_STATISTICS_STATUS_SHADOW_REQUEST_MASK) { tmp = 0x00000000; (*hw->f_mac_read)(hw, @@ -2598,7 +2598,8 @@ ipn3ke_rpst_scan_check(void) int ret; if (ipn3ke_rpst_scan_num == 1) { - ret = pthread_create(&ipn3ke_rpst_scan_thread, + ret = rte_ctrl_thread_create(&ipn3ke_rpst_scan_thread, + "ipn3ke scanner", NULL, ipn3ke_rpst_scan_handle_request, NULL); if (ret) { @@ -2674,7 +2675,7 @@ ipn3ke_rpst_promiscuous_disable(struct rte_eth_dev *ethdev) return 0; } -void +int ipn3ke_rpst_allmulticast_enable(struct rte_eth_dev *ethdev) { struct ipn3ke_hw *hw = IPN3KE_DEV_PRIVATE_TO_HW(ethdev); @@ -2698,9 +2699,11 @@ ipn3ke_rpst_allmulticast_enable(struct rte_eth_dev *ethdev) rpst->port_id, 0); } + + return 0; } -void +int ipn3ke_rpst_allmulticast_disable(struct rte_eth_dev *ethdev) { struct ipn3ke_hw *hw = IPN3KE_DEV_PRIVATE_TO_HW(ethdev); @@ -2724,6 +2727,8 @@ ipn3ke_rpst_allmulticast_disable(struct rte_eth_dev *ethdev) rpst->port_id, 0); } + + return 0; } int @@ -2910,12 +2915,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) {