[dpdk-dev] [PATCH v7 09/17] examples/ethtool: properly reference PCI header

Gaetan Rivet gaetan.rivet at 6wind.com
Fri Jul 7 02:04:26 CEST 2017


From: Thomas Monjalon <thomas at monjalon.net>

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 at monjalon.net>
---
 examples/ethtool/lib/rte_ethtool.c | 2 ++
 1 file changed, 2 insertions(+)

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",
-- 
2.1.4



More information about the dev mailing list