From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 99A35A00E6 for ; Mon, 8 Jul 2019 20:26:55 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5E3951B9E9; Mon, 8 Jul 2019 20:26:31 +0200 (CEST) Received: from mail-pg1-f196.google.com (mail-pg1-f196.google.com [209.85.215.196]) by dpdk.org (Postfix) with ESMTP id 2FD51160 for ; Mon, 8 Jul 2019 20:26:26 +0200 (CEST) Received: by mail-pg1-f196.google.com with SMTP id o13so8089121pgp.12 for ; Mon, 08 Jul 2019 11:26:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=tF1BYpkGO4EzJ7Sl/MOdogw+SrohF63ea20yBJ8c2jM=; b=VVLKyVbJoDax09kRlsMCzW+P5J83SGz7XTE8Qb938Un0tD9M5eLDkdtatnd6TADZm3 +6MpAVoYXd1pd6q3Gk7oKoMa5inFSOmTgfUTK0nsHXLkdYioJoWKgK/u/ryaMyFzxWGE c92WjZ5lrZIQV5cXz+NVXuBMRRIs2njixktwpKJTohsuo4I9wtMfjgTGoJESxzOPq+5W mqiTvOa77TxnPd6a4FTUBfGlp/ktbJCTPd+OvJ06rSwokDt730bcfyjiPP1APJywAR1I TvS1cbIgZanmiQdfDQmnv1/njhTXd9q31TfR8l9G7HF4F/2bBYfwhPzlYz6LdpkHGp4R JV7g== 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:mime-version:content-transfer-encoding; bh=tF1BYpkGO4EzJ7Sl/MOdogw+SrohF63ea20yBJ8c2jM=; b=VO42ZQsvW8aPTw1LHcLMos8mLyd++hygB7x/cJhY79LBqn/lLU9Nx06/CAA9mFreel sFWvKYxUS6LXX83eRCN1hIrXlWa9QBnA9vpYKP7jUf+oOa22WxMQyw3LODtrOhNYcLCD z8dQwWK9Go5pJxZJ6iJpar/8vQ6u4AK8DvVlqJaHiWBEeWzljwCMGshleqOOxPy1EO9K szgw/jLgg1CdKe5ULB5YBKr8RbVPhtFLX6FmLZvwfLiiiKu+r6YiBFWGFIqQsXWZflV8 RFJIDmkcxD0fRtIH/jaDYvbBJ8IX2VmMuHVJ9+8+wa1dze+FgZP5DVdPYAbrKeEdL/ky WJBA== X-Gm-Message-State: APjAAAWxmODG6Cfiz6HT65vGT+HbNJsPfZ/rIVOpO8SvDyNIg2L/+irP DxgrR6aM1GhWtv2M3nI+n5p82HeU5sY= X-Google-Smtp-Source: APXvYqx5BLP3V6SOCluk1Pj7ZWe4VSaY7hoIb5CvV2kZ2uIq56v5NVV9YXfqcuqIvYPSRpKWZTShBg== X-Received: by 2002:a63:2b0c:: with SMTP id r12mr25644638pgr.206.1562610385136; Mon, 08 Jul 2019 11:26:25 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id o15sm18769295pgj.18.2019.07.08.11.26.24 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 08 Jul 2019 11:26:24 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Mon, 8 Jul 2019 11:26:06 -0700 Message-Id: <20190708182614.1677-4-stephen@networkplumber.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190708182614.1677-1-stephen@networkplumber.org> References: <20190516180427.17270-1-stephen@networkplumber.org> <20190708182614.1677-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v9 03/11] ethdev: use new ethernet 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- lib/Makefile | 1 - lib/librte_ethdev/Makefile | 2 +- lib/librte_ethdev/meson.build | 2 +- lib/librte_ethdev/rte_class_eth.c | 9 +-------- 4 files changed, 3 insertions(+), 11 deletions(-) diff --git a/lib/Makefile b/lib/Makefile index 3ad579f68254..493aeab7572e 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -25,7 +25,6 @@ DIRS-$(CONFIG_RTE_LIBRTE_ETHER) += librte_ethdev DEPDIRS-librte_ethdev := librte_net librte_eal librte_mempool librte_ring DEPDIRS-librte_ethdev += librte_mbuf DEPDIRS-librte_ethdev += librte_kvargs -DEPDIRS-librte_ethdev += librte_cmdline DEPDIRS-librte_ethdev += librte_meter DIRS-$(CONFIG_RTE_LIBRTE_BBDEV) += librte_bbdev DEPDIRS-librte_bbdev := librte_eal librte_mempool librte_mbuf diff --git a/lib/librte_ethdev/Makefile b/lib/librte_ethdev/Makefile index 8d4a02630c4f..60bcc2227878 100644 --- a/lib/librte_ethdev/Makefile +++ b/lib/librte_ethdev/Makefile @@ -12,7 +12,7 @@ CFLAGS += -DALLOW_EXPERIMENTAL_API CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) LDLIBS += -lrte_net -lrte_eal -lrte_mempool -lrte_ring -LDLIBS += -lrte_mbuf -lrte_kvargs -lrte_cmdline -lrte_meter +LDLIBS += -lrte_mbuf -lrte_kvargs -lrte_meter EXPORT_MAP := rte_ethdev_version.map diff --git a/lib/librte_ethdev/meson.build b/lib/librte_ethdev/meson.build index 8d6165b2a7dd..f75d428c96d0 100644 --- a/lib/librte_ethdev/meson.build +++ b/lib/librte_ethdev/meson.build @@ -26,4 +26,4 @@ headers = files('rte_ethdev.h', 'rte_tm.h', 'rte_tm_driver.h') -deps += ['net', 'kvargs', 'cmdline', 'meter'] +deps += ['net', 'kvargs', 'meter'] 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 - */ - 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. */ -- 2.20.1