X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fnull%2Frte_eth_null.c;h=508bafc12a1462b40e9d419b9432a95440dc2243;hb=83680d371592fcf1b66cbbfecb0fb8b3aa4ccc8d;hp=7c3c76a89725a0360975cc10ae114d7591b65526;hpb=fbd1913561484b58e155fbefea4e15491ed60c9f;p=dpdk.git diff --git a/drivers/net/null/rte_eth_null.c b/drivers/net/null/rte_eth_null.c index 7c3c76a897..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,6 +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_AUTOFILL_QUEUE_XSTATS; eth_dev->dev_ops = &ops;