From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id CE89BA0096 for ; Wed, 5 Jun 2019 11:00:04 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 951371B9C5; Wed, 5 Jun 2019 11:00:04 +0200 (CEST) Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [148.163.129.52]) by dpdk.org (Postfix) with ESMTP id 007611B95A for ; Wed, 5 Jun 2019 11:00:02 +0200 (CEST) X-Virus-Scanned: Proofpoint Essentials engine Received: from webmail.solarflare.com (uk.solarflare.com [193.34.186.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mx1-us4.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id CE17580081; Wed, 5 Jun 2019 09:00:00 +0000 (UTC) Received: from [192.168.38.17] (91.220.146.112) by ukex01.SolarFlarecom.com (10.17.10.4) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Wed, 5 Jun 2019 09:59:55 +0100 To: Stephen Hemminger , References: <20190516180427.17270-1-stephen@networkplumber.org> <20190605010852.28395-1-stephen@networkplumber.org> <20190605010852.28395-4-stephen@networkplumber.org> From: Andrew Rybchenko Message-ID: Date: Wed, 5 Jun 2019 11:59:52 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <20190605010852.28395-4-stephen@networkplumber.org> Content-Language: en-GB X-Originating-IP: [91.220.146.112] X-ClientProxiedBy: ocex03.SolarFlarecom.com (10.20.40.36) To ukex01.SolarFlarecom.com (10.17.10.4) X-TM-AS-Product-Ver: SMEX-12.5.0.1300-8.5.1010-24658.003 X-TM-AS-Result: No-10.488000-8.000000-10 X-TMASE-MatchedRID: +f/wAVSGjujmLzc6AOD8DfHkpkyUphL9ZAGtCJE23YhiRnFj5nMx0Wb6 PphVtfZg+mTbVsoklFel+fxzcjwAMWf5hEb/BF5VB7TqRAYVohYQOcMSo0926jbpMgyAfh26f9Y O7YQzxxkRYyKiJ7BL17IHELCqqMCeQf9HervnKxyL6q5RsNhv5KLwP+jjbL9Ki7p9NckzZOtS4g OFgVd1nwlg5IbvFdxc4YS6FyG8vygVlVZBrluiayI9MxSOQ6CSgkMXwPojuxeKsTAa7Oe+YixZV 2XdhwOwnX21KobcTTfNSMGwluLZGPz/jVa2JSBDhrO2+pxhVk8cDDLReGt4PfmUDxpFogQXo8WM kQWv6iUD0yuKrQIMCAGLeSok4rrZec3QM3secWaKce8SPGgKm5upt3LMjYJskQvPihBoWl/sjFP m9pwJeeGfWOZaJdgTmRhiMH29jwi3e4CFzBzUCaaxK6CzPEQ5mASiKCXqwlt+3BndfXUhXQ== X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--10.488000-8.000000 X-TMASE-Version: SMEX-12.5.0.1300-8.5.1010-24658.003 X-MDID: 1559725201-FLfkBs3z8sjX Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH v3 3/6] ethdev: use rte_eth_unformat_addr 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 6/5/19 4:08 AM, Stephen Hemminger wrote: > Use rte_eth_unformat_addr, so that ethdev can be built and work > without the cmdline library. The dependency on cmdline was > an arrangement of convenience anyway. > > Signed-off-by: Stephen Hemminger [...] > diff --git a/lib/librte_ethdev/rte_class_eth.c b/lib/librte_ethdev/rte_class_eth.c > index 873a653532ad..6338355e2557 100644 > --- a/lib/librte_ethdev/rte_class_eth.c > +++ b/lib/librte_ethdev/rte_class_eth.c > @@ -4,7 +4,6 @@ > > #include > > -#include > #include > #include > #include > @@ -43,19 +42,13 @@ static int > eth_mac_cmp(const char *key __rte_unused, > const char *value, void *opaque) > { > - int ret; > struct rte_ether_addr mac; > const struct rte_eth_dev_data *data = opaque; > struct rte_eth_dev_info dev_info; > uint32_t index; > > /* Parse devargs MAC address. */ > - /* > - * cannot use ether_aton_r(value, &mac) > - * because of include conflict with rte_ether.h Why not ether_aton_r()? Isn't conflict resolved now after patch series from Olivier? I think it would be nice to explain it in the changeset description. > - */ > - ret = cmdline_parse_etheraddr(NULL, value, &mac, sizeof(mac)); > - if (ret < 0) > + if (rte_ether_unformat_addr(value, &mac) < 0) > return -1; /* invalid devargs value */ > > /* Return 0 if devargs MAC is matching one of the device MACs. */