From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f52.google.com (mail-wm0-f52.google.com [74.125.82.52]) by dpdk.org (Postfix) with ESMTP id 7A0FC1B1EE for ; Thu, 12 Oct 2017 10:21:59 +0200 (CEST) Received: by mail-wm0-f52.google.com with SMTP id u138so11057863wmu.4 for ; Thu, 12 Oct 2017 01:21:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=9gMNoTOljFb/7xHdhSb1wqsH+fDWBC/FhBcTs7CbDt4=; b=uo19r39LdG0mA/TFBYzmqOsz4SrpOaUDGqWhVWMUC+J52gdnbB70TQo54MsTMVyTHv ogDnJWUWm3eHX3ntWWU1NPCeqFf4zsqmtiyM4TgvWTzif2y/3e4Tk4eiZb2EmXcpYoBA EBEkQmmIhgm94WCFgaNRPmPQsJOM6kiN/krRH0k5SH4Z7E/2RQlbnXaLi5cJBauQZFwv 1cuLB4xqbVozqr9+fZWLvuvnUJttE0GyD3MTlL3LDojDQq8mKYPSoY1WXJg9DDQEj6Fx WQPt+43AOldZMaFB6UQmZ6eu3Rcqhaqgrgoz0FjW/V6qwWHzocc/1aBj54FvMyeVzU6c Q5Xg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=9gMNoTOljFb/7xHdhSb1wqsH+fDWBC/FhBcTs7CbDt4=; b=bKwTsmcVpN/s4wdBqFmPM+mcvO6OgqZ7x1t6fYv/kO0G9hsQTHZaMvWWiFXn7V/wXk iR7+YvHj7EfdTbeuZOzmnhWG/ZXFvziBxwPPZfizqeZMVz1Vc1NcmMuPa1MPahSRgJXK L6qrm4Dzqf4QQfyYG4MqNjkslgF6z+yvw2Zr0Eli5sxFuCVOjDaTJH/abAa4I5yPt96R gd8IsDrl4ZKG3mo3fxohRCv/GiT4690jHy35P6XzxVF1tbqetZZJtPkzueVMMBZXmHtj 6ir4cRC9fDZkeEtun78QThJZJGdFGhs4MH9pzRbmgsoe8ZsibpJNCUsXhGBvMd2Ad3Gi QQxw== X-Gm-Message-State: AMCzsaX3341vyjKKvjKc4LPIjmmALeb4liUcMu2e0VJXfYsPb40A6LGN j7UoGKyiuNHOmO5ucA/MW5QSLV0B X-Google-Smtp-Source: AOwi7QDIHkzNFySgUKcOW41MUrhztGjYprQx5q7ElD0v+z8YvqPQEALfPrUcrPq89i3HsyBn7l12Zw== X-Received: by 10.223.128.4 with SMTP id 4mr1515278wrk.9.1507796518764; Thu, 12 Oct 2017 01:21:58 -0700 (PDT) Received: from bidouze.dev.6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id 200sm19424728wmu.44.2017.10.12.01.21.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 12 Oct 2017 01:21:57 -0700 (PDT) From: Gaetan Rivet To: dev@dpdk.org Cc: Gaetan Rivet Date: Thu, 12 Oct 2017 10:21:22 +0200 Message-Id: <4d9c051e8150888c8166e477cb16860a4adbee2a.1507796100.git.gaetan.rivet@6wind.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: References: In-Reply-To: References: Subject: [dpdk-dev] [PATCH v2 15/18] ether: use new devargs parsing function X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Oct 2017 08:21:59 -0000 The previous one is being deprecated. Signed-off-by: Gaetan Rivet --- lib/librte_ether/rte_ethdev.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c index bb08204..618f576 100644 --- a/lib/librte_ether/rte_ethdev.c +++ b/lib/librte_ether/rte_ethdev.c @@ -372,21 +372,24 @@ rte_eth_dev_is_detachable(uint16_t port_id) /* attach the new device, then store port_id of the device */ int -rte_eth_dev_attach(const char *devargs, uint16_t *port_id) +rte_eth_dev_attach(const char *devstr, uint16_t *port_id) { int ret = -1; int current = rte_eth_dev_count(); + struct rte_devargs devargs; char *name = NULL; char *args = NULL; - if ((devargs == NULL) || (port_id == NULL)) { + if ((devstr == NULL) || (port_id == NULL)) { ret = -EINVAL; goto err; } - /* parse devargs, then retrieve device name and args */ - if (rte_eal_parse_devargs_str(devargs, &name, &args)) + /* parse device, then retrieve device name and args */ + if (rte_eal_devargs_parse(&devargs, "%s", devstr)) goto err; + name = devargs.name; + args = devargs.args; ret = rte_eal_dev_attach(name, args); if (ret < 0) -- 2.1.4