From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 62848C06510 for ; Tue, 2 Jul 2019 16:51:01 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id EA9CD206A3 for ; Tue, 2 Jul 2019 16:51:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=networkplumber-org.20150623.gappssmtp.com header.i=@networkplumber-org.20150623.gappssmtp.com header.b="gJl60F/G" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EA9CD206A3 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=networkplumber.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3F8BB1B9CB; Tue, 2 Jul 2019 18:50:36 +0200 (CEST) Received: from mail-pf1-f196.google.com (mail-pf1-f196.google.com [209.85.210.196]) by dpdk.org (Postfix) with ESMTP id 027B41B9B1 for ; Tue, 2 Jul 2019 18:50:30 +0200 (CEST) Received: by mail-pf1-f196.google.com with SMTP id d126so8540803pfd.2 for ; Tue, 02 Jul 2019 09:50:29 -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=LJP5NUGKYyva7BnvgS/UxCqLM/1j8w47JpFJi1u1tNU=; b=gJl60F/Gzdf1IoQv8bqvJY9Gp/XMygrVCXSzyPujRbIzjKrUG7+4iNvjH+1HoS+oCz E9jj2h8UO9u0SaCUG1Fw1/wbGs5/YS98a8sT1VlV4wS5j/2/LWz41GtQ2QbCjzzIWB4I LGM+w+FG7jX/eK6pydG6MUES+sGDhQFG5HSJ5mYdmFsm+vc6hPrfZ4mDWpSGv6sIFoxk xDWDJ/BAVWfxUS0qm0C23qQKbW2LP5UjQZaXXk/tGOcdWjCgSITjiYbuc7nOmH7RIhFj aQmDH+If4ZvhAlbOyqior45sQe2PKjGH8LVzYdG/40YC5u8Un4anX3OpCf9TDdOub2Bi 9QCw== 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=LJP5NUGKYyva7BnvgS/UxCqLM/1j8w47JpFJi1u1tNU=; b=h6jLnlPDJZnQNm+DexTxajRH3Na6drkXg5UUuW3FczNhzUtCxSWLx8AS4kDK69Llb1 EngRar8yuYfu41TipWuQGuiWDg0eEpydH7bRELQmLWm73gqGCZhcQtRm3zEy9aQQY8F5 BrN+09l/KrOQd/OENfFEKqEP+uMKnw5ksK8YA89QyqDsnDZR8Qw/UHEv7ZpDQ2P94Zsv sDhEnzSdpb6dPX03twONxdRyQjZkbCKe7TOE1OHt7cLRQt3aj02ywzJnjb0zG+rqUTTt 0SXOkxT67BPlz6INCktCk/Yi1u2itxWSFe9VW9WbCXoucP3uA2m1U7bZODCgJ9sBD8jU jAew== X-Gm-Message-State: APjAAAV1s0CocudK3Bll7xi0foxRW6a+29SS+WqJRw6IAfQ1OV/EzFs+ xDPjVsmN5CppDspsY15PypayPNv8aeQ= X-Google-Smtp-Source: APXvYqyhTefAwyjHNt0iX7E++cgiqp1MhNjqMYiTsri11KKRXCkIMNmjx2QRgk1AC2K9FLu/6vEsdw== X-Received: by 2002:a17:90a:1b4a:: with SMTP id q68mr6652084pjq.61.1562086228978; Tue, 02 Jul 2019 09:50:28 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id h62sm14340230pgc.54.2019.07.02.09.50.27 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 02 Jul 2019 09:50:28 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Tue, 2 Jul 2019 09:50:12 -0700 Message-Id: <20190702165017.3802-4-stephen@networkplumber.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190702165017.3802-1-stephen@networkplumber.org> References: <20190516180427.17270-1-stephen@networkplumber.org> <20190702165017.3802-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v6 3/8] 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 791e0d9911d6..82b2c4bfa8ea 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