X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fnull%2Frte_eth_null.c;h=508bafc12a1462b40e9d419b9432a95440dc2243;hb=9d422a38be596d571270efc7e2d7b25a877e8beb;hp=84c1d0c951ee1e3d1bb581148745c5a3729d35ee;hpb=d2fb71645834c31b67340c615ed42e8a45d63ed2;p=dpdk.git diff --git a/drivers/net/null/rte_eth_null.c b/drivers/net/null/rte_eth_null.c index 84c1d0c951..508bafc12a 100644 --- a/drivers/net/null/rte_eth_null.c +++ b/drivers/net/null/rte_eth_null.c @@ -4,8 +4,8 @@ */ #include -#include -#include +#include +#include #include #include #include @@ -73,7 +73,7 @@ static struct rte_eth_link pmd_link = { .link_autoneg = ETH_LINK_FIXED, }; -RTE_LOG_REGISTER(eth_null_logtype, pmd.net.null, NOTICE); +RTE_LOG_REGISTER_DEFAULT(eth_null_logtype, NOTICE); #define PMD_LOG(level, fmt, args...) \ rte_log(RTE_LOG_ ## level, eth_null_logtype, \ @@ -193,13 +193,15 @@ eth_dev_start(struct rte_eth_dev *dev) return 0; } -static void +static int eth_dev_stop(struct rte_eth_dev *dev) { if (dev == NULL) - return; + return 0; dev->data->dev_link.link_status = ETH_LINK_DOWN; + + return 0; } static int @@ -548,7 +550,7 @@ eth_dev_null_create(struct rte_vdev_device *dev, struct pmd_options *args) data->mac_addrs = &internals->eth_addr; data->promiscuous = 1; data->all_multicast = 1; - data->dev_flags |= RTE_ETH_DEV_CLOSE_REMOVE; + data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS; eth_dev->dev_ops = &ops;