From: Pablo de Lara Date: Wed, 9 Jul 2014 14:35:35 +0000 (+0100) Subject: ring: remove extra devices creation with --vdev option X-Git-Tag: spdx-start~10492 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=546afbc6827f9f0f7ed501d2af1fc51755e40224;p=dpdk.git ring: remove extra devices creation with --vdev option 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 Acked-by: Neil Horman --- diff --git a/lib/librte_pmd_ring/rte_eth_ring.c b/lib/librte_pmd_ring/rte_eth_ring.c index 73c649ecff..4f1b6ed898 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); } }