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 875F5A00E6 for ; Thu, 16 May 2019 20:05:29 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A0E4F1B101; Thu, 16 May 2019 20:04:48 +0200 (CEST) Received: from mail-pl1-f195.google.com (mail-pl1-f195.google.com [209.85.214.195]) by dpdk.org (Postfix) with ESMTP id C92AFD1A3 for ; Thu, 16 May 2019 20:04:42 +0200 (CEST) Received: by mail-pl1-f195.google.com with SMTP id p15so2009725pll.4 for ; Thu, 16 May 2019 11:04:42 -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=yEaUpni5y7fsJISN4fFRnplwP0jzhBCZ/6W1TUBjg94=; b=MCFRyyyRC8n69pkn93mKpo81IyF66f4iBJB7gf+n/yD2r+EWs6lv8g27P6uhaSOl/B sATdP1vOLPAHL9sUaXngYG8XmMCByOkbGW9HYAR+QtzWyIe0ld5ed8lcPjEaX/Q93ElW X8XSrwTSv5Q4lNDSwB+fplDGQ2KNIFLa5X0p2N6/1IvyKqWwVRfAp9WKpJ4nlyaBjnsH SCalJTUTVCCetAydIkD6F1seSXZ4YzBJH+yfG+ZpFdw3XcL8Z6TIw8zN8D6d0j4nXtTZ q7D4Z5PtEGeWXZSfCYJLT2RHmBKCO4nLnYHd6pqPz9xWXx53C5xLsTsIcSL8ZgsZc2P3 mGFg== 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=yEaUpni5y7fsJISN4fFRnplwP0jzhBCZ/6W1TUBjg94=; b=EbYjf3uSRy+pFGHs5nMQD9K0dgCUNLFqrpQP2Dxz3AaRUbVpCRozduK6JPKwhtZKtW 7bRmovYgODq4ExxhcxP6PJzPEatDR0eETubg+gIIWtZiErxoDTnah17vGAJszsywDjQi +NrAYzYze3i640n6LCb3b6uEk4ikFQtxeBOGpkXIJihuyz2Ma1QZgV/wZnsj8Dxhfb5q S9JOjhKPm6X/PTOQ+/PvR1hw3YCGDQcfH/ceMiTCDOSFvAhAcJY94gAJGBP5HagTcXko K0hshbMyUYIY0qBCoD7PJsQN+p9oCVazQof1HM7aOWWQzoXiiXxLgVZUAGt19hHmnJPg GTLA== X-Gm-Message-State: APjAAAUs5phuCjSHOh27xwENbuhrPzSYBNlxvtlYOjrF1ok+QSUssNBy laKgPp4G9p/WNBEWF0pwVFK6xL+I5n8= X-Google-Smtp-Source: APXvYqyMGWP9dp85sCz1FSHq+1MfZ9NgW5y82tJkZ/mE7hI26ckWI8uyXsOot6FQErKTHJroZ+Wesw== X-Received: by 2002:a17:902:b18c:: with SMTP id s12mr33231259plr.181.1558029881695; Thu, 16 May 2019 11:04:41 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id d67sm9376657pfa.35.2019.05.16.11.04.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 May 2019 11:04:40 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Thu, 16 May 2019 11:04:25 -0700 Message-Id: <20190516180427.17270-6-stephen@networkplumber.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190516180427.17270-1-stephen@networkplumber.org> References: <20190516180427.17270-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2 5/7] ethdev: use 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" Use 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 cb99c92ece93..40ca936230c6 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 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 (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