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 74D58A0471 for ; Mon, 9 Sep 2019 14:00:32 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8D6101ED21; Mon, 9 Sep 2019 13:59:32 +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 E2CC41EC89 for ; Mon, 9 Sep 2019 13:59:10 +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 B2E1CB40069; Mon, 9 Sep 2019 11:59:09 +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; Mon, 9 Sep 2019 04:59: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; Mon, 9 Sep 2019 04:59:03 -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 x89Bx3Pk027770; Mon, 9 Sep 2019 12:59:03 +0100 Received: from ukv-loginhost.uk.solarflarecom.com (localhost [127.0.0.1]) by ukv-loginhost.uk.solarflarecom.com (Postfix) with ESMTP id ED0231613D1; Mon, 9 Sep 2019 12:59:02 +0100 (BST) From: Andrew Rybchenko To: Nikhil Rao CC: , Ivan Ilchenko Date: Mon, 9 Sep 2019 12:58:47 +0100 Message-ID: <1568030331-16526-11-git-send-email-arybchenko@solarflare.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1568030331-16526-1-git-send-email-arybchenko@solarflare.com> References: <1567699852-31693-1-git-send-email-arybchenko@solarflare.com> <1568030331-16526-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-24898.005 X-TM-AS-Result: No-0.804700-4.000000-10 X-TMASE-MatchedRID: UkY5AdpCN6jbS0m47m6fSn84FZpy/6JVAPiR4btCEeaBzO52zKOpBfBv 7Bu/nOgyA9H5R5f2ce16tR7fuIFyfkPIUO20h2j8nFVnNmvv47tLXPA26IG0hN9RlPzeVuQQKKq yc9Qq8Xr0lKD+/w5gTyA6R/kVmVMpfcSal8l6P7B1e7Xbb6Im2n0tCKdnhB589yM15V5aWpj6C0 ePs7A07fVTw0XgOy3ajBFo2w410mxZ5KsrExyqx3dKt/Ac2CW0TRZZmfhi8lTeOg+5lbRm/AKd1 O9ZHA59IuJ99AsJhh4ahdq7wy/38HbkIQ/waVsn2kC7SwvGlKhDwb7Jglhh1lFkOwaJdCKgviPE qcclEtxVyvbTg/runA== X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10-0.804700-4.000000 X-TMASE-Version: SMEX-12.5.0.1300-8.5.1010-24898.005 X-MDID: 1568030350-G2XPWEPVLZ6g Subject: [dpdk-dev] [PATCH v2 10/13] app/test: check code of promiscuous mode switch 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_promiscuous_enable()/rte_eth_promiscuous_disable() return value was changed from void to int, so this patch modify usage of these functions across app/test/test_event_eth_rx_adapter.c and app/test/test_event_eth_tx_adapter.c according to new return type. Signed-off-by: Ivan Ilchenko 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 | 6 +++++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/app/test/test_event_eth_rx_adapter.c b/app/test/test_event_eth_rx_adapter.c index 950bc67c2f..6254fcd33a 100644 --- a/app/test/test_event_eth_rx_adapter.c +++ b/app/test/test_event_eth_rx_adapter.c @@ -90,7 +90,9 @@ port_init_common(uint16_t port, const struct rte_eth_conf *port_conf, addr.addr_bytes[4], addr.addr_bytes[5]); /* Enable RX in promiscuous mode for the Ethernet device. */ - rte_eth_promiscuous_enable(port); + retval = rte_eth_promiscuous_enable(port); + if (retval != 0) + return retval; return 0; } diff --git a/app/test/test_event_eth_tx_adapter.c b/app/test/test_event_eth_tx_adapter.c index 208d20c538..73f6afea20 100644 --- a/app/test/test_event_eth_tx_adapter.c +++ b/app/test/test_event_eth_tx_adapter.c @@ -94,7 +94,9 @@ port_init_common(uint8_t port, const struct rte_eth_conf *port_conf, addr.addr_bytes[4], addr.addr_bytes[5]); /* Enable RX in promiscuous mode for the Ethernet device. */ - rte_eth_promiscuous_enable(port); + retval = rte_eth_promiscuous_enable(port); + if (retval != 0) + return retval; return 0; } diff --git a/app/test/test_pmd_perf.c b/app/test/test_pmd_perf.c index 4f9fc0d876..85ef11899b 100644 --- a/app/test/test_pmd_perf.c +++ b/app/test/test_pmd_perf.c @@ -745,7 +745,11 @@ test_pmd_perf(void) ret, portid); /* always eanble promiscuous */ - rte_eth_promiscuous_enable(portid); + ret = rte_eth_promiscuous_enable(portid); + if (ret != 0) + rte_exit(EXIT_FAILURE, + "rte_eth_promiscuous_enable: err=%s, port=%d\n", + rte_strerror(-ret), portid); lcore_conf[slave_id].portlist[num++] = portid; lcore_conf[slave_id].nb_ports++; -- 2.17.1