From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id AB4265938 for ; Fri, 26 Aug 2016 13:21:55 +0200 (CEST) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga101.jf.intel.com with ESMTP; 26 Aug 2016 04:21:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,580,1464678000"; d="scan'208";a="1481078" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by orsmga004.jf.intel.com with ESMTP; 26 Aug 2016 04:21:54 -0700 Received: from sivswdev02.ir.intel.com (sivswdev02.ir.intel.com [10.237.217.46]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id u7QBLroI030749 for ; Fri, 26 Aug 2016 12:21:53 +0100 Received: from sivswdev02.ir.intel.com (localhost [127.0.0.1]) by sivswdev02.ir.intel.com with ESMTP id u7QBLreE008881 for ; Fri, 26 Aug 2016 12:21:53 +0100 Received: (from fyigit@localhost) by sivswdev02.ir.intel.com with id u7QBLrW5008877 for dev@dpdk.org; Fri, 26 Aug 2016 12:21:53 +0100 X-Authentication-Warning: sivswdev02.ir.intel.com: fyigit set sender to ferruh.yigit@intel.com using -f From: Ferruh Yigit To: dev@dpdk.org Date: Fri, 26 Aug 2016 12:17:47 +0100 Message-Id: <1472210279-8286-11-git-send-email-ferruh.yigit@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1472210279-8286-1-git-send-email-ferruh.yigit@intel.com> References: <1472210279-8286-1-git-send-email-ferruh.yigit@intel.com> Subject: [dpdk-dev] [PATCH 10/22] net/pcap: use single_iface variable instead of hardcoded X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Aug 2016 11:21:56 -0000 Signed-off-by: Ferruh Yigit --- drivers/net/pcap/rte_eth_pcap.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c index 276d6e0..b749af0 100644 --- a/drivers/net/pcap/rte_eth_pcap.c +++ b/drivers/net/pcap/rte_eth_pcap.c @@ -945,6 +945,7 @@ rte_pmd_pcap_devinit(const char *name, const char *params) struct rte_kvargs *kvlist; struct pmd_devargs pcaps = {0}; struct pmd_devargs dumpers = {0}; + int single_iface = 0; int ret; RTE_LOG(INFO, PMD, "Initializing pmd_pcap for %s\n", name); @@ -965,13 +966,18 @@ rte_pmd_pcap_devinit(const char *name, const char *params) ret = rte_kvargs_process(kvlist, ETH_PCAP_IFACE_ARG, &open_rx_tx_iface, &pcaps); + if (ret < 0) goto free_kvlist; dumpers.queue[0].pcap = pcaps.queue[0].pcap; dumpers.queue[0].name = pcaps.queue[0].name; dumpers.queue[0].type = pcaps.queue[0].type; + + single_iface = 1; + ret = rte_eth_from_pcaps(name, &pcaps, 1, &dumpers, 1, - kvlist, 1, is_tx_pcap); + kvlist, single_iface, is_tx_pcap); + goto free_kvlist; } @@ -1024,7 +1030,7 @@ rte_pmd_pcap_devinit(const char *name, const char *params) goto free_kvlist; ret = rte_eth_from_pcaps(name, &pcaps, pcaps.num_of_queue, &dumpers, - dumpers.num_of_queue, kvlist, 0, is_tx_pcap); + dumpers.num_of_queue, kvlist, single_iface, is_tx_pcap); free_kvlist: rte_kvargs_free(kvlist); -- 2.7.4