From 947d949de7de5e554e51f5fd48a6e989d80b7675 Mon Sep 17 00:00:00 2001 From: Pascal Mazon Date: Thu, 6 Apr 2017 16:18:04 +0200 Subject: [PATCH] net/tap: fix max queues redefinition The macro RTE_PMD_TAP_MAX_QUEUES was defined twice. On machines with kernel < 3.8, IFF_MULTI_QUEUE didn't exist, and thus both definitions used different values. Fixes: cf5643661161 ("net/tap: move private elements to external header") Signed-off-by: Pascal Mazon --- drivers/net/tap/rte_eth_tap.c | 6 ------ drivers/net/tap/rte_eth_tap.h | 6 +++++- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c index 8321863440..70cf9eb8d3 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 f1496dcfdb..ad497b3d10 100644 --- a/drivers/net/tap/rte_eth_tap.h +++ b/drivers/net/tap/rte_eth_tap.h @@ -43,7 +43,11 @@ #include #include -#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 */ -- 2.20.1