From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id A646F2E8B for ; Fri, 20 Jan 2017 15:30:31 +0100 (CET) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga103.jf.intel.com with ESMTP; 20 Jan 2017 06:30:29 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,258,1477983600"; d="scan'208";a="56268819" Received: from yolailax-mobl1.amr.corp.intel.com ([10.254.97.226]) by fmsmga006.fm.intel.com with ESMTP; 20 Jan 2017 06:30:29 -0800 From: Keith Wiles To: dev@dpdk.org Cc: ferruh.yigit@intel.com Date: Fri, 20 Jan 2017 08:30:25 -0600 Message-Id: <20170120143025.23710-1-keith.wiles@intel.com> X-Mailer: git-send-email 2.10.1 In-Reply-To: <2f632e65-90de-c2b7-ed67-34e3432cefae@intel.com> References: <2f632e65-90de-c2b7-ed67-34e3432cefae@intel.com> Subject: [dpdk-dev] [PATCH] net/tap: fix IFF_MULTI_QUEUE in older kernels not found 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: , X-List-Received-Date: Fri, 20 Jan 2017 14:30:32 -0000 Signed-off-by: Keith Wiles --- drivers/net/tap/rte_eth_tap.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c index d5e2fc3..cb96e99 100644 --- a/drivers/net/tap/rte_eth_tap.c +++ b/drivers/net/tap/rte_eth_tap.c @@ -139,6 +139,7 @@ tun_alloc(char *name) } RTE_LOG(DEBUG, PMD, "TUN/TAP Features %08x\n", features); +#ifdef IFF_MULTI_QUEUE if (!(features & IFF_MULTI_QUEUE) && (RTE_PMD_TAP_MAX_QUEUES > 1)) { RTE_LOG(DEBUG, PMD, "TUN/TAP device only one queue\n"); goto error; @@ -151,6 +152,15 @@ tun_alloc(char *name) RTE_LOG(DEBUG, PMD, "Multi-queue support for %d queues\n", RTE_PMD_TAP_MAX_QUEUES); } +#else + if (RTE_PMD_TAP_MAX_QUEUES > 1) { + RTE_LOG(DEBUG, PMD, "TUN/TAP device only one queue\n"); + goto error; + } else { + ifr.ifr_flags |= IFF_ONE_QUEUE; + RTE_LOG(DEBUG, PMD, "Single queue only support\n"); + } +#endif /* Set the TUN/TAP configuration and get the name if needed */ if (ioctl(fd, TUNSETIFF, (void *)&ifr) < 0) { -- 2.8.0.GIT