From patchwork Wed Aug 31 16:51:11 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ferruh Yigit X-Patchwork-Id: 15574 X-Patchwork-Delegate: bruce.richardson@intel.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 8DE2419F5; Wed, 31 Aug 2016 18:51:16 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 54E881518 for ; Wed, 31 Aug 2016 18:51:15 +0200 (CEST) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga104.fm.intel.com with ESMTP; 31 Aug 2016 09:51:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,262,1470726000"; d="scan'208";a="3137631" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by fmsmga005.fm.intel.com with ESMTP; 31 Aug 2016 09:51:13 -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 u7VGpCGi024243; Wed, 31 Aug 2016 17:51:12 +0100 Received: from sivswdev02.ir.intel.com (localhost [127.0.0.1]) by sivswdev02.ir.intel.com with ESMTP id u7VGpCw0021914; Wed, 31 Aug 2016 17:51:12 +0100 Received: (from fyigit@localhost) by sivswdev02.ir.intel.com with id u7VGpCYR021910; Wed, 31 Aug 2016 17:51:12 +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 Cc: Bruce Richardson , Neil Horman Date: Wed, 31 Aug 2016 17:51:11 +0100 Message-Id: <1472662271-21880-1-git-send-email-ferruh.yigit@intel.com> X-Mailer: git-send-email 1.7.4.1 Subject: [dpdk-dev] [PATCH] net/ring: fix ring eth dev creation via devargs 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Using nodeaction devarg lets creating multiple ring eth devices: "eth_ring0,nodeaction=R0:0:CREATE,nodeaction=R1:0:CREATE" Trying to create all devices with same name fails. Since first part of the nodeaction devarg is name (in above sample R0,R1), this name field can be used as eth dev name. Fixes: 61934c0956d4 ("ring: convert to use of PMD_REGISTER_DRIVER and fix linking") Signed-off-by: Ferruh Yigit Acked-by: Bruce Richardson --- drivers/net/ring/rte_eth_ring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ring/rte_eth_ring.c b/drivers/net/ring/rte_eth_ring.c index a7048c7..5551e18 100644 --- a/drivers/net/ring/rte_eth_ring.c +++ b/drivers/net/ring/rte_eth_ring.c @@ -557,7 +557,7 @@ rte_pmd_ring_devinit(const char *name, const char *params) goto out_free; for (info->count = 0; info->count < info->total; info->count++) { - ret = eth_dev_ring_create(name, + ret = eth_dev_ring_create(info->list[info->count].name, info->list[info->count].node, info->list[info->count].action); if ((ret == -1) &&