From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id E7ABC5A72 for ; Fri, 26 Aug 2016 13:23:29 +0200 (CEST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga105.jf.intel.com with ESMTP; 26 Aug 2016 04:23:29 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,580,1464678000"; d="scan'208";a="161250337" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by fmsmga004.fm.intel.com with ESMTP; 26 Aug 2016 04:23:29 -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 u7QBNR3b031014 for ; Fri, 26 Aug 2016 12:23:27 +0100 Received: from sivswdev02.ir.intel.com (localhost [127.0.0.1]) by sivswdev02.ir.intel.com with ESMTP id u7QBNRpT008941 for ; Fri, 26 Aug 2016 12:23:27 +0100 Received: (from fyigit@localhost) by sivswdev02.ir.intel.com with id u7QBNRvr008936 for dev@dpdk.org; Fri, 26 Aug 2016 12:23:27 +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:52 +0100 Message-Id: <1472210279-8286-16-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 15/22] net/pcap: update how single iface handled 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:23:30 -0000 Remove hardcoded single interface values, make it more obvious. Signed-off-by: Ferruh Yigit --- drivers/net/pcap/rte_eth_pcap.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c index 5416947..8b312a9 100644 --- a/drivers/net/pcap/rte_eth_pcap.c +++ b/drivers/net/pcap/rte_eth_pcap.c @@ -969,16 +969,14 @@ rte_pmd_pcap_devinit(const char *name, const char *params) 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; + dumpers.queue[0] = pcaps.queue[0]; - ret = rte_eth_from_pcaps(name, &pcaps, 1, &dumpers, 1, - kvlist, single_iface, is_tx_pcap); + single_iface = 1; + pcaps.num_of_queue = 1; + dumpers.num_of_queue = 1; - goto free_kvlist; + goto create_eth; } /* @@ -1029,6 +1027,7 @@ rte_pmd_pcap_devinit(const char *name, const char *params) if (ret < 0) goto free_kvlist; +create_eth: ret = rte_eth_from_pcaps(name, &pcaps, pcaps.num_of_queue, &dumpers, dumpers.num_of_queue, kvlist, single_iface, is_tx_pcap); -- 2.7.4