From: Pascal Mazon Date: Thu, 6 Apr 2017 14:18:04 +0000 (+0200) Subject: net/tap: fix max queues redefinition X-Git-Tag: spdx-start~3757 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=947d949de7de5e554e51f5fd48a6e989d80b7675;p=dpdk.git 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 --- 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 */