summaryrefslogtreecommitdiff
path: root/examples/ethtool
diff options
context:
space:
mode:
authorThomas Monjalon <thomas@monjalon.net>2017-07-07 02:04:26 +0200
committerThomas Monjalon <thomas@monjalon.net>2017-07-09 00:05:42 +0200
commit17fd714e803e7bdb40b2b5012cf1987a22d183e5 (patch)
treec0afdd79f8fdb13a4c1b4adc6e2b1a46251dd86d /examples/ethtool
parent9eda3a7c4e83cb61887d2ea17257c7c4e12682e7 (diff)
downloaddpdk-17fd714e803e7bdb40b2b5012cf1987a22d183e5.zip
dpdk-17fd714e803e7bdb40b2b5012cf1987a22d183e5.tar.gz
dpdk-17fd714e803e7bdb40b2b5012cf1987a22d183e5.tar.xz
examples/ethtool: include PCI header directly
In devargs rework, rte_pci.h won't be included by rte_ethdev.h (via rte_devargs.h) anymore. rte_ethtool_get_drvinfo() could use rte_devargs.name instead of creating equivalent bus specific name. For now, it is workarounded by just including rte_pci.h. Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Diffstat (limited to 'examples/ethtool')
-rw-r--r--examples/ethtool/lib/rte_ethtool.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/examples/ethtool/lib/rte_ethtool.c b/examples/ethtool/lib/rte_ethtool.c
index fabfcb2..252382c 100644
--- a/examples/ethtool/lib/rte_ethtool.c
+++ b/examples/ethtool/lib/rte_ethtool.c
@@ -36,6 +36,7 @@
#include <rte_version.h>
#include <rte_ethdev.h>
#include <rte_ether.h>
+#include <rte_pci.h>
#ifdef RTE_LIBRTE_IXGBE_PMD
#include <rte_pmd_ixgbe.h>
#endif
@@ -73,6 +74,7 @@ rte_ethtool_get_drvinfo(uint8_t port_id, struct ethtool_drvinfo *drvinfo)
dev_info.driver_name);
snprintf(drvinfo->version, sizeof(drvinfo->version), "%s",
rte_version());
+ /* TODO: replace bus_info by rte_devargs.name */
if (dev_info.pci_dev)
snprintf(drvinfo->bus_info, sizeof(drvinfo->bus_info),
"%04x:%02x:%02x.%x",