X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fionic%2Fionic_ethdev.c;h=ef7d06e526bf1b387945a4a7377044c0488095d0;hb=eca9a0d6c8436eba70e60873dd5625bd52a65262;hp=800f6e5d64b75c571f1a7eed4538c8fb231cbc9c;hpb=9c99878aa1b16de26fcce82c112b401766dd910e;p=dpdk.git diff --git a/drivers/net/ionic/ionic_ethdev.c b/drivers/net/ionic/ionic_ethdev.c index 800f6e5d64..ef7d06e526 100644 --- a/drivers/net/ionic/ionic_ethdev.c +++ b/drivers/net/ionic/ionic_ethdev.c @@ -25,7 +25,7 @@ static int ionic_dev_configure(struct rte_eth_dev *dev); static int ionic_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu); static int ionic_dev_start(struct rte_eth_dev *dev); static void ionic_dev_stop(struct rte_eth_dev *dev); -static void ionic_dev_close(struct rte_eth_dev *dev); +static int ionic_dev_close(struct rte_eth_dev *dev); static int ionic_dev_set_link_up(struct rte_eth_dev *dev); static int ionic_dev_set_link_down(struct rte_eth_dev *dev); static int ionic_dev_link_update(struct rte_eth_dev *eth_dev, @@ -956,25 +956,29 @@ ionic_dev_stop(struct rte_eth_dev *eth_dev) /* * Reset and stop device. */ -static void +static int ionic_dev_close(struct rte_eth_dev *eth_dev) { struct ionic_lif *lif = IONIC_ETH_DEV_TO_LIF(eth_dev); int err; IONIC_PRINT_CALL(); + if (rte_eal_process_type() != RTE_PROC_PRIMARY) + return 0; err = ionic_lif_stop(lif); if (err) { IONIC_PRINT(ERR, "Cannot stop LIF: %d", err); - return; + return -1; } err = eth_ionic_dev_uninit(eth_dev); if (err) { IONIC_PRINT(ERR, "Cannot destroy LIF: %d", err); - return; + return -1; } + + return 0; } static int