[dpdk-dev] net/tap: fix RTE_PMD_TAP_MAX_QUEUES redefinition

Message ID 435e323dd3883c32d62590b633f6d1095599f270.1491469372.git.pascal.mazon@6wind.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Pascal Mazon April 6, 2017, 10 a.m. UTC
  Fixes: cf5643661161 ("net/tap: move private elements to external header")

Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
---
 drivers/net/tap/rte_eth_tap.c | 6 ------
 drivers/net/tap/rte_eth_tap.h | 6 +++++-
 2 files changed, 5 insertions(+), 7 deletions(-)
  

Comments

Thomas Monjalon April 6, 2017, 2:07 p.m. UTC | #1
2017-04-06 12:00, Pascal Mazon:
> Fixes: cf5643661161 ("net/tap: move private elements to external header")
> 
> Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>

Please, could you describe the bug briefly?
I know it is a build error. In this case, a log is appreciated.
Why have I not seen the build issue? Is it specific to a compiler?
  

Patch

diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index 832186344047..70cf9eb8d35f 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -72,12 +72,6 @@ 
 #define ETH_TAP_SPEED_ARG       "speed"
 #define ETH_TAP_REMOTE_ARG      "remote"
 
-#ifdef IFF_MULTI_QUEUE
-#define RTE_PMD_TAP_MAX_QUEUES	16
-#else
-#define RTE_PMD_TAP_MAX_QUEUES	1
-#endif
-
 #define FLOWER_KERNEL_VERSION KERNEL_VERSION(4, 2, 0)
 #define FLOWER_VLAN_KERNEL_VERSION KERNEL_VERSION(4, 9, 0)
 
diff --git a/drivers/net/tap/rte_eth_tap.h b/drivers/net/tap/rte_eth_tap.h
index f1496dcfdb1a..ad497b3d1015 100644
--- a/drivers/net/tap/rte_eth_tap.h
+++ b/drivers/net/tap/rte_eth_tap.h
@@ -43,7 +43,11 @@ 
 #include <rte_ethdev.h>
 #include <rte_ether.h>
 
-#define RTE_PMD_TAP_MAX_QUEUES 16
+#ifdef IFF_MULTI_QUEUE
+#define RTE_PMD_TAP_MAX_QUEUES	16
+#else
+#define RTE_PMD_TAP_MAX_QUEUES	1
+#endif
 
 struct pkt_stats {
 	uint64_t opackets;              /* Number of output packets */