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 64215A2EDB for ; Fri, 6 Sep 2019 09:32:10 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6A6D61F180; Fri, 6 Sep 2019 09:32:01 +0200 (CEST) Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [67.231.154.164]) by dpdk.org (Postfix) with ESMTP id 67BEC1F168 for ; Fri, 6 Sep 2019 09:31:54 +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-us2.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id 30C16340058; Fri, 6 Sep 2019 07:31:53 +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; Fri, 6 Sep 2019 00:31:49 -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; Fri, 6 Sep 2019 00:31:49 -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 x867VmYK027649; Fri, 6 Sep 2019 08:31:48 +0100 Received: from ukv-loginhost.uk.solarflarecom.com (localhost [127.0.0.1]) by ukv-loginhost.uk.solarflarecom.com (Postfix) with ESMTP id 35B8C1613D3; Fri, 6 Sep 2019 08:31:48 +0100 (BST) From: Andrew Rybchenko To: Jerin Jacob CC: , Ivan Ilchenko Date: Fri, 6 Sep 2019 08:30:16 +0100 Message-ID: <1567755066-31389-5-git-send-email-arybchenko@solarflare.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1567755066-31389-1-git-send-email-arybchenko@solarflare.com> References: <1566915962-5472-1-git-send-email-arybchenko@solarflare.com> <1567755066-31389-1-git-send-email-arybchenko@solarflare.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-Product-Ver: SMEX-12.5.0.1300-8.5.1010-24892.005 X-TM-AS-Result: No-1.281700-4.000000-10 X-TMASE-MatchedRID: m3UrM73BECPDOgXZFRFV8+b3p4cnIXGNAPiR4btCEeaBzO52zKOpBclQ VvH1JO6Tl+Cdj6w7FMhw5T4Iaj538mJZXQNDzktSrSAIWhdbeu80VTU7yL3Dk9EsTITobgNEemc aIOJLLINmksgUBsZ9ba8G8vFj9gyyN68Ooe9V0NueAiCmPx4NwBnUJ0Ek6yhjxEHRux+uk8ifEz J5hPndGY3Ci9x61RZTMGyI782V+agDBaiARi5JGbtW7PExaLr0hXfRGiCwtmtpC9ZFybJXrhQq1 VVwPLDs2lg9E13nI+wR8TRbsc9tsZN1JFeUKeMEiOOUXfTkScBZSbxIRLLN37zfneGoTKOTVlxr 1FJij9s= X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--1.281700-4.000000 X-TMASE-Version: SMEX-12.5.0.1300-8.5.1010-24892.005 X-MDID: 1567755114-cPLzech6OIYo Subject: [dpdk-dev] [PATCH v3 04/54] app/eventdev: check status of getting ethdev info 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: Ivan Ilchenko rte_eth_dev_info_get() return value was changed from void to int, so this patch modify rte_eth_dev_info_get() usage across app/test-eventdev according to its new return type. Signed-off-by: Ivan Ilchenko Signed-off-by: Andrew Rybchenko --- app/test-eventdev/test_perf_common.c | 8 +++++++- app/test-eventdev/test_pipeline_common.c | 9 ++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/app/test-eventdev/test_perf_common.c b/app/test-eventdev/test_perf_common.c index aa925a7ef7..e75582b1a2 100644 --- a/app/test-eventdev/test_perf_common.c +++ b/app/test-eventdev/test_perf_common.c @@ -660,6 +660,7 @@ int perf_ethdev_setup(struct evt_test *test, struct evt_options *opt) { uint16_t i; + int ret; struct test_perf *t = evt_test_priv(test); struct rte_eth_conf port_conf = { .rxmode = { @@ -688,7 +689,12 @@ perf_ethdev_setup(struct evt_test *test, struct evt_options *opt) struct rte_eth_dev_info dev_info; struct rte_eth_conf local_port_conf = port_conf; - rte_eth_dev_info_get(i, &dev_info); + ret = rte_eth_dev_info_get(i, &dev_info); + if (ret != 0) { + evt_err("Error during getting device (port %u) info: %s\n", + i, strerror(-ret)); + return ret; + } local_port_conf.rx_adv_conf.rss_conf.rss_hf &= dev_info.flow_type_rss_offloads; diff --git a/app/test-eventdev/test_pipeline_common.c b/app/test-eventdev/test_pipeline_common.c index 16c49b8608..ef8ae28c93 100644 --- a/app/test-eventdev/test_pipeline_common.c +++ b/app/test-eventdev/test_pipeline_common.c @@ -159,6 +159,7 @@ int pipeline_ethdev_setup(struct evt_test *test, struct evt_options *opt) { uint16_t i; + int ret; uint8_t nb_queues = 1; struct test_pipeline *t = evt_test_priv(test); struct rte_eth_rxconf rx_conf; @@ -191,7 +192,13 @@ pipeline_ethdev_setup(struct evt_test *test, struct evt_options *opt) if (!(caps & RTE_EVENT_ETH_TX_ADAPTER_CAP_INTERNAL_PORT)) t->internal_port = 0; - rte_eth_dev_info_get(i, &dev_info); + ret = rte_eth_dev_info_get(i, &dev_info); + if (ret != 0) { + evt_err("Error during getting device (port %u) info: %s\n", + i, strerror(-ret)); + return ret; + } + rx_conf = dev_info.default_rxconf; rx_conf.offloads = port_conf.rxmode.offloads; -- 2.17.1