From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 20797C4CEC7 for ; Sat, 14 Sep 2019 11:39:07 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id AD47B20830 for ; Sat, 14 Sep 2019 11:39:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AD47B20830 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=solarflare.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id EEF351EB49; Sat, 14 Sep 2019 13:38:15 +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 EDB571D161 for ; Sat, 14 Sep 2019 13:37:55 +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-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id 02FA9400056; Sat, 14 Sep 2019 11:37:55 +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; Sat, 14 Sep 2019 04:37: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; Sat, 14 Sep 2019 04:37:48 -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 x8EBbmcB015453; Sat, 14 Sep 2019 12:37:48 +0100 Received: from ukv-loginhost.uk.solarflarecom.com (localhost [127.0.0.1]) by ukv-loginhost.uk.solarflarecom.com (Postfix) with ESMTP id 1B4711613D1; Sat, 14 Sep 2019 12:37:48 +0100 (BST) From: Andrew Rybchenko To: Nikhil Rao CC: , Ivan Ilchenko Date: Sat, 14 Sep 2019 12:37:30 +0100 Message-ID: <1568461055-16472-11-git-send-email-arybchenko@solarflare.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1568461055-16472-1-git-send-email-arybchenko@solarflare.com> References: <1567699852-31693-1-git-send-email-arybchenko@solarflare.com> <1568461055-16472-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-24910.005 X-TM-AS-Result: No-0.804700-4.000000-10 X-TMASE-MatchedRID: UkY5AdpCN6jbS0m47m6fSn84FZpy/6JVAPiR4btCEeaBzO52zKOpBfBv 7Bu/nOgyA9H5R5f2ce16tR7fuIFyfkPIUO20h2j8nFVnNmvv47tLXPA26IG0hN9RlPzeVuQQKKq yc9Qq8Xr0lKD+/w5gTyA6R/kVmVMpfcSal8l6P7B1e7Xbb6Im2n0tCKdnhB589yM15V5aWpj6C0 ePs7A07fVTw0XgOy3ajBFo2w410mxZ5KsrExyqx3dKt/Ac2CW0TRZZmfhi8lSI7IGgaSorJzKTb X7warOQKRcOLN5anLzhxh3t7W+NE5j1FA69/5XH2kC7SwvGlKhDwb7Jglhh1lFkOwaJdCKgviPE 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-24910.005 X-MDID: 1568461075-VVl9YU5uxnNS Subject: [dpdk-dev] [PATCH v3 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 950bc67c2..6254fcd33 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 208d20c53..73f6afea2 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 4f9fc0d87..85ef11899 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