X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;ds=sidebyside;f=drivers%2Fnet%2Fvmxnet3%2Fvmxnet3_ethdev.c;h=5bffbb8a0e039901d02b14606434e804c962d802;hb=20339b09cf71bc195dc6cf3facacbc5548505fd5;hp=ecdecc427c20356c728f529669177f605adefd2a;hpb=df96fd0d73955bdc7ca3909e772ff2ad903249c6;p=dpdk.git diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c index ecdecc427c..5bffbb8a0e 100644 --- a/drivers/net/vmxnet3/vmxnet3_ethdev.c +++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c @@ -67,6 +67,7 @@ static int vmxnet3_dev_configure(struct rte_eth_dev *dev); static int vmxnet3_dev_start(struct rte_eth_dev *dev); static int vmxnet3_dev_stop(struct rte_eth_dev *dev); static int vmxnet3_dev_close(struct rte_eth_dev *dev); +static int vmxnet3_dev_reset(struct rte_eth_dev *dev); static void vmxnet3_dev_set_rxmode(struct vmxnet3_hw *hw, uint32_t feature, int set); static int vmxnet3_dev_promiscuous_enable(struct rte_eth_dev *dev); static int vmxnet3_dev_promiscuous_disable(struct rte_eth_dev *dev); @@ -112,6 +113,7 @@ static const struct eth_dev_ops vmxnet3_eth_dev_ops = { .dev_start = vmxnet3_dev_start, .dev_stop = vmxnet3_dev_stop, .dev_close = vmxnet3_dev_close, + .dev_reset = vmxnet3_dev_reset, .promiscuous_enable = vmxnet3_dev_promiscuous_enable, .promiscuous_disable = vmxnet3_dev_promiscuous_disable, .allmulticast_enable = vmxnet3_dev_allmulticast_enable, @@ -913,6 +915,18 @@ vmxnet3_dev_close(struct rte_eth_dev *dev) return ret; } +static int +vmxnet3_dev_reset(struct rte_eth_dev *dev) +{ + int ret; + + ret = eth_vmxnet3_dev_uninit(dev); + if (ret) + return ret; + ret = eth_vmxnet3_dev_init(dev); + return ret; +} + static void vmxnet3_hw_tx_stats_get(struct vmxnet3_hw *hw, unsigned int q, struct UPT1_TxStats *res) @@ -1477,5 +1491,5 @@ vmxnet3_interrupt_handler(void *param) RTE_PMD_REGISTER_PCI(net_vmxnet3, rte_vmxnet3_pmd); RTE_PMD_REGISTER_PCI_TABLE(net_vmxnet3, pci_id_vmxnet3_map); RTE_PMD_REGISTER_KMOD_DEP(net_vmxnet3, "* igb_uio | uio_pci_generic | vfio-pci"); -RTE_LOG_REGISTER(vmxnet3_logtype_init, pmd.net.vmxnet3.init, NOTICE); -RTE_LOG_REGISTER(vmxnet3_logtype_driver, pmd.net.vmxnet3.driver, NOTICE); +RTE_LOG_REGISTER_SUFFIX(vmxnet3_logtype_init, init, NOTICE); +RTE_LOG_REGISTER_SUFFIX(vmxnet3_logtype_driver, driver, NOTICE);