From patchwork Thu Apr 6 14:18:04 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pascal Mazon X-Patchwork-Id: 23299 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 7BABE37B1; Thu, 6 Apr 2017 16:18:17 +0200 (CEST) Received: from proxy.6wind.com (host.76.145.23.62.rev.coltfrance.com [62.23.145.76]) by dpdk.org (Postfix) with ESMTP id 03A2E374C for ; Thu, 6 Apr 2017 16:18:16 +0200 (CEST) Received: from 6wind.com (unknown [10.16.0.184]) by proxy.6wind.com (Postfix) with SMTP id BF9F92A514; Thu, 6 Apr 2017 16:18:09 +0200 (CEST) Received: by 6wind.com (sSMTP sendmail emulation); Thu, 06 Apr 2017 16:18:08 +0200 From: Pascal Mazon To: thomas.monjalon@6wind.com Cc: dev@dpdk.org, Pascal Mazon Date: Thu, 6 Apr 2017 16:18:04 +0200 Message-Id: X-Mailer: git-send-email 2.12.0.306.g4a9b9b3 In-Reply-To: <435e323dd3883c32d62590b633f6d1095599f270.1491469372.git.pascal.mazon@6wind.com> References: <435e323dd3883c32d62590b633f6d1095599f270.1491469372.git.pascal.mazon@6wind.com> Subject: [dpdk-dev] [PATCH v2] net/tap: fix RTE_PMD_TAP_MAX_QUEUES redefinition X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" This macro 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 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 #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 */