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 132E9A0565; Tue, 10 Mar 2020 10:44:30 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 64C831C02A; Tue, 10 Mar 2020 10:44:29 +0100 (CET) Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [67.231.154.164]) by dpdk.org (Postfix) with ESMTP id D6B0C1C028; Tue, 10 Mar 2020 10:44:27 +0100 (CET) X-Virus-Scanned: Proofpoint Essentials engine Received: from webmail.solarflare.com (uk.solarflare.com [193.34.186.16]) (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 B2C6840006C; Tue, 10 Mar 2020 09:44:26 +0000 (UTC) Received: from ukex01.SolarFlarecom.com (10.17.10.4) by ukex01.SolarFlarecom.com (10.17.10.4) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 10 Mar 2020 09:44:23 +0000 Received: from opal.uk.solarflarecom.com (10.17.10.1) by ukex01.SolarFlarecom.com (10.17.10.4) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Tue, 10 Mar 2020 09:44:23 +0000 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 02A9iNqZ006806; Tue, 10 Mar 2020 09:44:23 GMT Received: from ukv-loginhost.uk.solarflarecom.com (localhost [127.0.0.1]) by ukv-loginhost.uk.solarflarecom.com (Postfix) with ESMTP id 778691611DB; Tue, 10 Mar 2020 09:44:23 +0000 (GMT) From: Andrew Rybchenko To: CC: Igor Romanov , Date: Tue, 10 Mar 2020 09:42:09 +0000 Message-ID: <1583833329-32697-1-git-send-email-arybchenko@solarflare.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-Product-Ver: SMEX-12.5.0.1300-8.5.1020-25280.003 X-TM-AS-Result: No-0.949300-8.000000-10 X-TMASE-MatchedRID: hjb4Tak6tidqHQR5EQ034houoVvF2i0Zy0Q+dW8+UWRjLp8Cm8vwFz6P hj6DfZCErdoLblq9S5pm6VCW8TBfOAf0yhhEMR9FIAjxomarSPDxuhkRWK22GOyFwD+tyjRLo8W MkQWv6iUoTQl7wNH8Po2j49Ftap9ExlblqLlYqXJjChOvHpSJbIOThPWg32Utsvxkuq4GV6q+qz +7aauuBl7jO/s5yEW4PZlg7+PrHe+PhFUlImlBQ4bkLTDb2gPcIyhJ/w2m6JHw7JxwU0EvZMqER OLb/+yO4/0Jvn0rwAJmtL4Dw+zNb9T2H03zzU1J X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--0.949300-8.000000 X-TMASE-Version: SMEX-12.5.0.1300-8.5.1020-25280.003 X-MDID: 1583833467-XN7Tx4C2ZTGX Subject: [dpdk-dev] [PATCH] net/sfc: fix promiscuous and allmulticast toggles errors 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 Returned errors of ethdev callbacks are negative. Internal sfc funtions return positive errors, so convert them to negative value. Fixes: 9039c8125730 ("ethdev: change promiscuous callbacks to return status") Cc: stable@dpdk.org Signed-off-by: Igor Romanov Signed-off-by: Andrew Rybchenko --- drivers/net/sfc/sfc_ethdev.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c index 098038fbc..f8867b0ec 100644 --- a/drivers/net/sfc/sfc_ethdev.c +++ b/drivers/net/sfc/sfc_ethdev.c @@ -405,25 +405,37 @@ sfc_dev_filter_set(struct rte_eth_dev *dev, enum sfc_dev_filter_mode mode, static int sfc_dev_promisc_enable(struct rte_eth_dev *dev) { - return sfc_dev_filter_set(dev, SFC_DEV_FILTER_MODE_PROMISC, B_TRUE); + int rc = sfc_dev_filter_set(dev, SFC_DEV_FILTER_MODE_PROMISC, B_TRUE); + + SFC_ASSERT(rc >= 0); + return -rc; } static int sfc_dev_promisc_disable(struct rte_eth_dev *dev) { - return sfc_dev_filter_set(dev, SFC_DEV_FILTER_MODE_PROMISC, B_FALSE); + int rc = sfc_dev_filter_set(dev, SFC_DEV_FILTER_MODE_PROMISC, B_FALSE); + + SFC_ASSERT(rc >= 0); + return -rc; } static int sfc_dev_allmulti_enable(struct rte_eth_dev *dev) { - return sfc_dev_filter_set(dev, SFC_DEV_FILTER_MODE_ALLMULTI, B_TRUE); + int rc = sfc_dev_filter_set(dev, SFC_DEV_FILTER_MODE_ALLMULTI, B_TRUE); + + SFC_ASSERT(rc >= 0); + return -rc; } static int sfc_dev_allmulti_disable(struct rte_eth_dev *dev) { - return sfc_dev_filter_set(dev, SFC_DEV_FILTER_MODE_ALLMULTI, B_FALSE); + int rc = sfc_dev_filter_set(dev, SFC_DEV_FILTER_MODE_ALLMULTI, B_FALSE); + + SFC_ASSERT(rc >= 0); + return -rc; } static int -- 2.17.1