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 98731A0613 for ; Tue, 24 Sep 2019 14:56:29 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9E91A2BF7; Tue, 24 Sep 2019 14:56:28 +0200 (CEST) Received: from dispatchb-us1.ppe-hosted.com (dispatchb-us1.ppe-hosted.com [148.163.129.53]) by dpdk.org (Postfix) with ESMTP id 7A4222BF5 for ; Tue, 24 Sep 2019 14:56:27 +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 CA45A800078; Tue, 24 Sep 2019 12:56:25 +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; Tue, 24 Sep 2019 05:56:22 -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; Tue, 24 Sep 2019 05:56:22 -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 x8OCuLxJ029745; Tue, 24 Sep 2019 13:56:21 +0100 Received: from ukv-loginhost.uk.solarflarecom.com (localhost [127.0.0.1]) by ukv-loginhost.uk.solarflarecom.com (Postfix) with ESMTP id 07E071613D1; Tue, 24 Sep 2019 13:56:21 +0100 (BST) From: Andrew Rybchenko To: Thomas Monjalon , Ferruh Yigit , Rasesh Mody , Shahed Shaikh , Wenzhuo Lu CC: , Ivan Ilchenko Date: Tue, 24 Sep 2019 13:56:06 +0100 Message-ID: <1569329773-10185-1-git-send-email-arybchenko@solarflare.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1568031190-16510-1-git-send-email-arybchenko@solarflare.co MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-Product-Ver: SMEX-12.5.0.1300-8.5.1010-24930.005 X-TM-AS-Result: No-6.014900-4.000000-10 X-TMASE-MatchedRID: 9We7UIOnzV4Cxmut/49wMqmukiZOfPi2uVdktDfc9l35+tteD5RzhfDM YDo1FKKM2i0E1lPDhiqiHK4/d1hf8vxcXzlUQt0oZdorcofH/GkpWss5kPUFdAQsw9A3PIlL4qA BsUMuHjW6ihXkOgGrrCKGuLL8x4+zzcIa1WsukSz9xyC38S1f/deuBHE8MeJDp0b7LIq4ACtjud AsWJd7a0qna2uFlro81PDlfPQqktD1fjWzduyGVjhiciQR/+DQBTfNTtahp1oR34ro7k23nd2+O GytmSNwlbWusee2uNt/smbFyZT8fMFBoCgEV4LySHCU59h5KrGi8D/o42y/SjGJJjSDu/oWzbdO KDY0HzOC3XU+ZmqWfIifTpB/CmpmVkqoT5RgfN9bUzvsaHW6BlrdKD8oHqzdgczudsyjqQVbJf2 jYnISc5onfyyFf9INe65NA8+icwtVyim4K7cofC9cBNSlgvYqTXo3QMP219+bKItl61J/yUGDDk bg1gJkOAawE8JvIaJYF3qW3Je6+7Gdgr1gfthjqGG3oEgO4P6XAS5pD51IQ6ZJPzQrQxK78WFct GWvuFzCU85hFHGHhAhOe2C8v44jEuRaILCZRyZz8YTcJOfObL1NuKS30BZnQIFIZLtsgG0DUH+n VLNyiCsqIP9TxvtJhyLR7CBmZbR+3BndfXUhXQ== X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--6.014900-4.000000 X-TMASE-Version: SMEX-12.5.0.1300-8.5.1010-24930.005 X-MDID: 1569329786-nT-Z-uj-bbaT Subject: [dpdk-dev] [PATCH v2 0/7] ethdev: change allmulticast controls to return status 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" m> References: <1568031190-16510-1-git-send-email-arybchenko@solarflare.co m> It is the fourth patch series to get rid of void returning functions in ethdev in accordance with deprecation notice [1]. It should be applied on top of [2], [3] and [4] which are already accepted in dpdk-next-net. Functions which return void are bad since they do not provide explicit information to the caller if everything is OK or not. It is especially painful in the case of all-multicast mode since it is not always supported, there are real cases when it fails to apply and it affects traffic which is received by the port. Driver maintainrs are encouraged to review the patch which changes driver callbacks prototype. Changes are not always trivial when I tried to provide real status of the operation. I used -EAGAIN when I failed to choose better error code. The following two drivers ignore status of internal functions and definitely could be improved: net/bnx2x: bnx2x_set_rx_mode() can report failure, but it is used in other places and should be updated carefully. net/igbvf: e1000_promisc_set_vf() provides return status, but it is unclear how handle it properly. [1] https://patches.dpdk.org/patch/56969/ [2] https://patches.dpdk.org/project/dpdk/list/?series=6391 [3] https://patches.dpdk.org/project/dpdk/list/?series=6407 [4] https://patches.dpdk.org/project/dpdk/list/?series=6308 v2: - add documentation for enable/disable callbacks - apply eth_err() to callback return status in rte_eth_dev_config_restore() - do not check callback vs NULL if settings match - reword logs in net/failsafe in accordance with review notes - use -E_RTE_SECONDARY in net/enic as requested in review notes - add acks - rebase Andrew Rybchenko (1): ethdev: do nothing if all-multicast mode is applied again Ivan Ilchenko (6): ethdev: change allmulticast mode API to return errors net/failsafe: check code of allmulticast mode switch net/bonding: check code of allmulticast mode switch ethdev: change allmulticast callbacks to return status app/testpmd: check code of allmulticast mode switch examples/ipv4_multicast: check allmulticast enable status app/test-pmd/cmdline.c | 10 +--- app/test-pmd/testpmd.h | 1 + app/test-pmd/util.c | 16 ++++++ doc/guides/rel_notes/deprecation.rst | 1 - doc/guides/rel_notes/release_19_11.rst | 4 ++ drivers/net/atlantic/atl_ethdev.c | 14 +++-- drivers/net/axgbe/axgbe_ethdev.c | 16 ++++-- drivers/net/bnx2x/bnx2x_ethdev.c | 8 ++- drivers/net/bnxt/bnxt_ethdev.c | 26 +++++++-- drivers/net/bonding/rte_eth_bond_8023ad.c | 13 ++++- drivers/net/bonding/rte_eth_bond_pmd.c | 67 ++++++++++++++++++++--- drivers/net/cxgbe/cxgbe_ethdev.c | 12 ++-- drivers/net/cxgbe/cxgbe_pfvf.h | 4 +- drivers/net/dpaa/dpaa_ethdev.c | 8 ++- drivers/net/dpaa2/dpaa2_ethdev.c | 14 +++-- drivers/net/e1000/em_ethdev.c | 14 +++-- drivers/net/e1000/igb_ethdev.c | 26 ++++++--- drivers/net/enetc/enetc_ethdev.c | 10 +++- drivers/net/enic/enic_ethdev.c | 22 ++++++-- drivers/net/failsafe/failsafe_ether.c | 8 ++- drivers/net/failsafe/failsafe_ops.c | 52 ++++++++++++++++-- drivers/net/fm10k/fm10k_ethdev.c | 28 ++++++---- drivers/net/i40e/i40e_ethdev.c | 22 +++++--- drivers/net/i40e/i40e_ethdev_vf.c | 20 +++++-- drivers/net/i40e/i40e_vf_representor.c | 8 +-- drivers/net/iavf/iavf_ethdev.c | 20 +++++-- drivers/net/ice/ice_ethdev.c | 30 +++++++--- drivers/net/ipn3ke/ipn3ke_ethdev.h | 4 +- drivers/net/ipn3ke/ipn3ke_representor.c | 8 ++- drivers/net/ixgbe/ixgbe_ethdev.c | 53 ++++++++++++++---- drivers/net/liquidio/lio_ethdev.c | 12 ++-- drivers/net/mlx4/mlx4.h | 4 +- drivers/net/mlx4/mlx4_ethdev.c | 14 +++-- drivers/net/mlx5/mlx5.h | 4 +- drivers/net/mlx5/mlx5_rxmode.c | 38 ++++++++++--- drivers/net/mvpp2/mrvl_ethdev.c | 28 +++++++--- drivers/net/netvsc/hn_ethdev.c | 8 +-- drivers/net/netvsc/hn_var.h | 4 +- drivers/net/netvsc/hn_vf.c | 8 +-- drivers/net/nfb/nfb_rxmode.c | 10 +++- drivers/net/nfb/nfb_rxmode.h | 8 ++- drivers/net/octeontx2/otx2_ethdev.h | 4 +- drivers/net/octeontx2/otx2_ethdev_ops.c | 8 ++- drivers/net/qede/qede_ethdev.c | 17 ++++-- drivers/net/sfc/sfc_ethdev.c | 8 +-- drivers/net/szedata2/rte_eth_szedata2.c | 6 +- drivers/net/tap/rte_eth_tap.c | 52 ++++++++++++++---- drivers/net/virtio/virtio_ethdev.c | 24 +++++--- drivers/net/vmxnet3/vmxnet3_ethdev.c | 12 ++-- examples/ipv4_multicast/main.c | 6 +- lib/librte_ethdev/rte_ethdev.c | 61 ++++++++++++++++----- lib/librte_ethdev/rte_ethdev.h | 14 ++++- lib/librte_ethdev/rte_ethdev_core.h | 52 ++++++++++++++++-- 53 files changed, 701 insertions(+), 240 deletions(-) -- 2.17.1