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 441E2A2EEB for ; Thu, 12 Sep 2019 18:46:06 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3DD331EFCC; Thu, 12 Sep 2019 18:44:12 +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 0D4D11EDC2 for ; Thu, 12 Sep 2019 18:43:31 +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-us5.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id DA88F4C006D; Thu, 12 Sep 2019 16:43:26 +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; Thu, 12 Sep 2019 09:43:20 -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; Thu, 12 Sep 2019 09:43:19 -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 x8CGhIuF023665; Thu, 12 Sep 2019 17:43:18 +0100 Received: from ukv-loginhost.uk.solarflarecom.com (localhost [127.0.0.1]) by ukv-loginhost.uk.solarflarecom.com (Postfix) with ESMTP id A7D4C1613D2; Thu, 12 Sep 2019 17:43:18 +0100 (BST) From: Andrew Rybchenko To: Jerin Jacob CC: , Ivan Ilchenko Date: Thu, 12 Sep 2019 17:42:15 +0100 Message-ID: <1568306586-27831-5-git-send-email-arybchenko@solarflare.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1568306586-27831-1-git-send-email-arybchenko@solarflare.com> References: <1566915962-5472-1-git-send-email-arybchenko@solarflare.com> <1568306586-27831-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-24906.005 X-TM-AS-Result: No-1.281700-4.000000-10 X-TMASE-MatchedRID: m3UrM73BECPDOgXZFRFV8+b3p4cnIXGNAPiR4btCEeaBzO52zKOpBclQ VvH1JO6Tl+Cdj6w7FMhw5T4Iaj538mJZXQNDzktSrSAIWhdbeu80VTU7yL3Dk9EsTITobgNEemc aIOJLLINmksgUBsZ9ba8G8vFj9gyyN68Ooe9V0NueAiCmPx4NwBnUJ0Ek6yhjxEHRux+uk8ifEz J5hPndGY3Ci9x61RZTMGyI782V+agDBaiARi5JGbtW7PExaLr0o0r5wzB7oDbqsLU9MYyYH7Q34 /2cj4euIDdIi1oNF0XSJOzaFclL8ZN1JFeUKeMEiOOUXfTkScBZSbxIRLLN37zfneGoTKOTVlxr 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-24906.005 X-MDID: 1568306607-xOrJuAyb93Es Subject: [dpdk-dev] [PATCH v4 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 aa925a7ef..e75582b1a 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 16c49b860..ef8ae28c9 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