X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fipn3ke%2Fipn3ke_representor.c;h=856d21ef9bdbaf035395459a75e0c98d0631a04c;hb=6ceb7ab83f168fa6b8e90e4bd5a1392de1a48c70;hp=80122e3fc5654d428cd36d5c08ebcb80a872656d;hpb=eeb1497641cb6d7945abf62a4ea65f514df807e7;p=dpdk.git diff --git a/drivers/net/ipn3ke/ipn3ke_representor.c b/drivers/net/ipn3ke/ipn3ke_representor.c index 80122e3fc5..856d21ef9b 100644 --- a/drivers/net/ipn3ke/ipn3ke_representor.c +++ b/drivers/net/ipn3ke/ipn3ke_representor.c @@ -12,7 +12,7 @@ #include #include -#include +#include #include #include @@ -193,7 +193,7 @@ ipn3ke_rpst_dev_start(struct rte_eth_dev *dev) return 0; } -static void +static int ipn3ke_rpst_dev_stop(struct rte_eth_dev *dev) { struct ipn3ke_hw *hw = IPN3KE_DEV_PRIVATE_TO_HW(dev); @@ -206,14 +206,19 @@ ipn3ke_rpst_dev_stop(struct rte_eth_dev *dev) /* Disable the RX path */ ipn3ke_xmac_rx_disable(hw, rpst->port_id, 0); } + + return 0; } -static void +static int ipn3ke_rpst_dev_close(struct rte_eth_dev *dev) { struct ipn3ke_hw *hw = IPN3KE_DEV_PRIVATE_TO_HW(dev); struct ipn3ke_rpst *rpst = IPN3KE_DEV_PRIVATE_TO_RPST(dev); + if (rte_eal_process_type() != RTE_PROC_PRIMARY) + return 0; + if (hw->retimer.mac_type == IFPGA_RAWDEV_RETIMER_MAC_TYPE_10GE_XFI) { /* Disable the TX path */ ipn3ke_xmac_tx_disable(hw, rpst->port_id, 0); @@ -221,6 +226,8 @@ ipn3ke_rpst_dev_close(struct rte_eth_dev *dev) /* Disable the RX path */ ipn3ke_xmac_rx_disable(hw, rpst->port_id, 0); } + + return 0; } /* @@ -2598,7 +2605,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) { @@ -2793,7 +2801,7 @@ ipn3ke_rpst_mtu_set(struct rte_eth_dev *ethdev, uint16_t mtu) return -EBUSY; } - if (frame_size > RTE_ETHER_MAX_LEN) + if (frame_size > IPN3KE_ETH_MAX_LEN) dev_data->dev_conf.rxmode.offloads |= (uint64_t)(DEV_RX_OFFLOAD_JUMBO_FRAME); else @@ -2958,7 +2966,8 @@ ipn3ke_rpst_init(struct rte_eth_dev *ethdev, void *init_params) return -ENODEV; } - ethdev->data->dev_flags |= RTE_ETH_DEV_REPRESENTOR; + ethdev->data->dev_flags |= RTE_ETH_DEV_REPRESENTOR | + RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS; rte_spinlock_lock(&ipn3ke_link_notify_list_lk); TAILQ_INSERT_TAIL(&ipn3ke_rpst_list, rpst, next);