From patchwork Tue Sep 10 08:52:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Rybchenko X-Patchwork-Id: 59085 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 83D921EE27; Tue, 10 Sep 2019 10:53:18 +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 57FDB1EBC2 for ; Tue, 10 Sep 2019 10:53:08 +0200 (CEST) X-Virus-Scanned: Proofpoint Essentials engine Received: from webmail.solarflare.com (webmail.solarflare.com [12.187.104.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mx1-us3.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id 34A0B48005F; Tue, 10 Sep 2019 08:53:07 +0000 (UTC) Received: from ocex03.SolarFlarecom.com (10.20.40.36) by ocex03.SolarFlarecom.com (10.20.40.36) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 10 Sep 2019 01:53:04 -0700 Received: from opal.uk.solarflarecom.com (10.17.10.1) by ocex03.SolarFlarecom.com (10.20.40.36) with Microsoft SMTP Server (TLS) id 15.0.1395.4 via Frontend Transport; Tue, 10 Sep 2019 01:53:04 -0700 Received: from ukv-loginhost.uk.solarflarecom.com (ukv-loginhost.uk.solarflarecom.com [10.17.10.39]) by opal.uk.solarflarecom.com (8.13.8/8.13.8) with ESMTP id x8A8r3vb024729; Tue, 10 Sep 2019 09:53:03 +0100 Received: from ukv-loginhost.uk.solarflarecom.com (localhost [127.0.0.1]) by ukv-loginhost.uk.solarflarecom.com (Postfix) with ESMTP id 65AA71613D1; Tue, 10 Sep 2019 09:53:03 +0100 (BST) From: Andrew Rybchenko To: Nikhil Rao CC: , Igor Romanov Date: Tue, 10 Sep 2019 09:52:18 +0100 Message-ID: <1568105541-7399-5-git-send-email-arybchenko@solarflare.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1568105541-7399-1-git-send-email-arybchenko@solarflare.com> References: <1568105541-7399-1-git-send-email-arybchenko@solarflare.com> MIME-Version: 1.0 X-TM-AS-Product-Ver: SMEX-12.5.0.1300-8.5.1010-24898.005 X-TM-AS-Result: No-1.013400-4.000000-10 X-TMASE-MatchedRID: 3VvmmxedNeLNQetBFGxSlJzEHTUOuMX3Y/L2/AZJAWSYkF7ZtFfCU3a+ ugDVDnv+eTDIGcrB15AJwgMHF6GFiSHhSBQfglfsA9lly13c/gE4QBHfUycCCGtEzrC9eANpDYo fQuAXb7jqo5wffCoKgIAy6p60ZV62fJ5/bZ6npdiujVRFkkVsmzmKJhoOaMS7kvqYQfxjtRkf2s 6oDK0i0F6VPd7JuLQ87buK+9JzMU8pYsSMjENFM5zbGkm6Gx55EM3insA3blc4xn/BsBDa/fDsn HBTQS9kyoRE4tv/7I7j/Qm+fSvAAma0vgPD7M1vmFd/HOChTo8= X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--1.013400-4.000000 X-TMASE-Version: SMEX-12.5.0.1300-8.5.1010-24898.005 X-MDID: 1568105587-m4VuPUX1kieA Subject: [dpdk-dev] [PATCH 4/7] app/test: check status of getting MAC address 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" From: Igor Romanov The return value of rte_eth_macaddr_get() was changed from void to int. Update the usage of the functions according to the new return type. Signed-off-by: Igor Romanov Signed-off-by: Andrew Rybchenko --- app/test/test_event_eth_rx_adapter.c | 4 +++- app/test/test_event_eth_tx_adapter.c | 4 +++- app/test/test_pmd_perf.c | 7 ++++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/app/test/test_event_eth_rx_adapter.c b/app/test/test_event_eth_rx_adapter.c index 6254fcd33..dd3bce71b 100644 --- a/app/test/test_event_eth_rx_adapter.c +++ b/app/test/test_event_eth_rx_adapter.c @@ -81,7 +81,9 @@ port_init_common(uint16_t port, const struct rte_eth_conf *port_conf, /* Display the port MAC address. */ struct rte_ether_addr addr; - rte_eth_macaddr_get(port, &addr); + retval = rte_eth_macaddr_get(port, &addr); + if (retval < 0) + return retval; printf("Port %u MAC: %02" PRIx8 " %02" PRIx8 " %02" PRIx8 " %02" PRIx8 " %02" PRIx8 " %02" PRIx8 "\n", (unsigned int)port, diff --git a/app/test/test_event_eth_tx_adapter.c b/app/test/test_event_eth_tx_adapter.c index 73f6afea2..3af749280 100644 --- a/app/test/test_event_eth_tx_adapter.c +++ b/app/test/test_event_eth_tx_adapter.c @@ -85,7 +85,9 @@ port_init_common(uint8_t port, const struct rte_eth_conf *port_conf, /* Display the port MAC address. */ struct rte_ether_addr addr; - rte_eth_macaddr_get(port, &addr); + retval = rte_eth_macaddr_get(port, &addr); + if (retval < 0) + return retval; printf("Port %u MAC: %02" PRIx8 " %02" PRIx8 " %02" PRIx8 " %02" PRIx8 " %02" PRIx8 " %02" PRIx8 "\n", (unsigned int)port, diff --git a/app/test/test_pmd_perf.c b/app/test/test_pmd_perf.c index 36b06ce5d..d61be58bb 100644 --- a/app/test/test_pmd_perf.c +++ b/app/test/test_pmd_perf.c @@ -724,7 +724,12 @@ test_pmd_perf(void) "Cannot configure device: err=%d, port=%d\n", ret, portid); - rte_eth_macaddr_get(portid, &ports_eth_addr[portid]); + ret = rte_eth_macaddr_get(portid, &ports_eth_addr[portid]); + if (ret < 0) + rte_exit(EXIT_FAILURE, + "Cannot get mac address: err=%d, port=%d\n", + ret, portid); + printf("Port %u ", portid); print_ethaddr("Address:", &ports_eth_addr[portid]); printf("\n");