From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 3890868C2 for ; Wed, 9 Jul 2014 16:37:44 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 09 Jul 2014 07:32:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.01,631,1400050800"; d="scan'208";a="570619358" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by orsmga002.jf.intel.com with ESMTP; 09 Jul 2014 07:36:12 -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 s69EaB4c011016; Wed, 9 Jul 2014 15:36:11 +0100 Received: from sivswdev02.ir.intel.com (localhost [127.0.0.1]) by sivswdev02.ir.intel.com with ESMTP id s69EaBie001425; Wed, 9 Jul 2014 15:36:11 +0100 Received: (from pdelarax@localhost) by sivswdev02.ir.intel.com with id s69EaBtQ001421; Wed, 9 Jul 2014 15:36:11 +0100 From: Pablo de Lara To: dev@dpdk.org Date: Wed, 9 Jul 2014 15:35:35 +0100 Message-Id: <1404916536-1364-2-git-send-email-pablo.de.lara.guarch@intel.com> X-Mailer: git-send-email 1.7.0.7 In-Reply-To: <1404916536-1364-1-git-send-email-pablo.de.lara.guarch@intel.com> References: <1404916536-1364-1-git-send-email-pablo.de.lara.guarch@intel.com> Subject: [dpdk-dev] [PATCH 1/2] ring_pmd: Removed extra devices creation when passing vdev parameter 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: Wed, 09 Jul 2014 14:37:45 -0000 When passing extra arguments in EAL option --vdev, to create ring ethdevs, API was creating three ethdevs, even if there was just one argument, such as CREATE. Signed-off-by: Pablo de Lara --- lib/librte_pmd_ring/rte_eth_ring.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/lib/librte_pmd_ring/rte_eth_ring.c b/lib/librte_pmd_ring/rte_eth_ring.c index 73c649e..4f1b6ed 100644 --- a/lib/librte_pmd_ring/rte_eth_ring.c +++ b/lib/librte_pmd_ring/rte_eth_ring.c @@ -493,7 +493,6 @@ rte_pmd_ring_devinit(const char *name, const char *params) eth_dev_ring_create(name, rte_socket_id(), DEV_CREATE); return 0; } else { - eth_dev_ring_create(name, rte_socket_id(), DEV_CREATE); ret = rte_kvargs_count(kvlist, ETH_RING_NUMA_NODE_ACTION_ARG); info = rte_zmalloc("struct node_action_list", sizeof(struct node_action_list) + (sizeof(struct node_action_pair) * ret), 0); @@ -510,7 +509,7 @@ rte_pmd_ring_devinit(const char *name, const char *params) goto out_free; for (info->count = 0; info->count < info->total; info->count++) { - eth_dev_ring_pair_create(name, info->list[info->count].node, + eth_dev_ring_create(name, info->list[info->count].node, info->list[info->count].action); } } -- 1.7.0.7