From patchwork Tue Sep 10 08:25:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Rybchenko X-Patchwork-Id: 59060 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E001E1ED42; Tue, 10 Sep 2019 10:26:27 +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 C25041EB02 for ; Tue, 10 Sep 2019 10:26:20 +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-us2.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id 67C2F1C0068; Tue, 10 Sep 2019 08:26:19 +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, 10 Sep 2019 01:26:15 -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, 10 Sep 2019 01:26:15 -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 x8A8QEIU002188; Tue, 10 Sep 2019 09:26:14 +0100 Received: from ukv-loginhost.uk.solarflarecom.com (localhost [127.0.0.1]) by ukv-loginhost.uk.solarflarecom.com (Postfix) with ESMTP id 342671613D1; Tue, 10 Sep 2019 09:26:14 +0100 (BST) From: Andrew Rybchenko To: Thomas Monjalon , Ferruh Yigit CC: , Igor Romanov Date: Tue, 10 Sep 2019 09:25:40 +0100 Message-ID: <1568103959-25572-1-git-send-email-arybchenko@solarflare.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 X-TM-AS-Product-Ver: SMEX-12.5.0.1300-8.5.1010-24898.005 X-TM-AS-Result: No-0.931900-4.000000-10 X-TMASE-MatchedRID: KBpjYDzav4MwpyA3tQmxTWw9UEl1EJDKAPiR4btCEebM3LZfC40TVCjQ SoDXfNBztRPNboRYOBHfrd9voQGByVTNH/IEdCNm5venhychcY2pSpNJXHTi8YJMlS+kMGbc224 ueXqtKLto/DPiFm6gO0v+98FceHosEvCxWZsL02urSt6KHcT2sePWyqHbi6tBEd+K6O5Nt52lCR LgcTbZhYXEGmV8v8xdkrX857naxDjAqUbyMkQ9dwGdJZ3Knh6hN590TuHQb1RXiLrvhpKLfGxbg RPguoUXmASPBg63wn1p/Y+duN1g9/FiITrxW0ATw9GVhGa/57acqlCdrhyhQLN77xRQZRa7Cg6c uqIlJ8f4VUBuw3GsK9mw0DiUBt776jHbEaTIvGGeAiCmPx4NwBnUJ0Ek6yhjxEHRux+uk8ifEzJ 5hPndGQ2Lz4cc+g/jn2kYeo60cCeCFjrPMbn2YaVQ2uL7INBOtqjeNudYRsfr/tUmE6WAqAmcBK AHju/hIseYmjBKiGw82cNl7T1MD5N1JFeUKeMEiOOUXfTkScBZSbxIRLLN37zfneGoTKOTVlxr1 FJij9s= X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--0.931900-4.000000 X-TMASE-Version: SMEX-12.5.0.1300-8.5.1010-24898.005 X-MDID: 1568103980-VfBxxleC6S3Z Subject: [dpdk-dev] [PATCH 00/18] ethdev: change link status get functions return value to int 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" It is the fifth 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], [4] and [5]. Functions which return void are bad since they do not provide explicit information to the caller if everything is OK or not. In the case of link info get it is important to know if link info is filled in or not. Unlike previous patch series for other functions, this one does not touch link_update driver callback since it already has return value with different semantics (which is not used in fact). May be negative return values should be kept for errors and positive 1 should report no link status changes. That's why only negative values are treated as errors in the patch series. [1] https://patches.dpdk.org/patch/56969/ [2] https://patches.dpdk.org/project/dpdk/list/?series=6279 [3] https://patches.dpdk.org/project/dpdk/list/?series=6334 [4] https://patches.dpdk.org/project/dpdk/list/?series=6335 [5] https://patches.dpdk.org/project/dpdk/list/?series=6308 Andrew Rybchenko (2): net/memif: check status of getting link info app/pipeline: check status of getting link info Igor Romanov (16): net/bonding: fix link speed update in broadcast mode ethdev: change link status get functions return value to int app/testpmd: check status of getting link info net/bonding: check status of getting link info net/ixgbe: check status of getting link info app/proc-info: check status of getting link info app/test: check status of getting link info examples: check status of getting link info examples/bbdev_app: check status of getting link info examples/ip_pipeline: check status of getting link info examples/ethtool: check status of getting link info examples/flow_filtering: check status of getting link info examples/link_status_interrupt: check status of getting link examples/distributor: check status of getting link info examples/qos_sched: check status of getting link info examples/kni: check status of getting link info app/proc-info/main.c | 19 +++--- app/test-pipeline/init.c | 11 +++- app/test-pmd/config.c | 13 +++- app/test-pmd/softnicfwd.c | 16 ++++- app/test-pmd/testpmd.c | 10 +++- app/test-pmd/testpmd.h | 1 + app/test-pmd/util.c | 14 +++++ app/test/test_link_bonding.c | 12 +++- app/test/test_pmd_perf.c | 11 +++- app/test/test_pmd_ring.c | 8 ++- doc/guides/rel_notes/deprecation.rst | 1 - doc/guides/rel_notes/release_19_11.rst | 4 ++ doc/guides/sample_app_ug/link_status_intr.rst | 9 ++- drivers/net/bonding/rte_eth_bond_8023ad.c | 24 ++++++-- drivers/net/bonding/rte_eth_bond_api.c | 19 ++++-- drivers/net/bonding/rte_eth_bond_pmd.c | 59 ++++++++++++++++--- drivers/net/ixgbe/ixgbe_ethdev.c | 5 +- drivers/net/memif/rte_eth_memif.c | 12 +++- examples/bbdev_app/main.c | 12 +++- examples/distributor/main.c | 14 +++-- examples/ethtool/lib/rte_ethtool.c | 6 +- examples/exception_path/main.c | 10 +++- examples/flow_filtering/main.c | 8 ++- examples/ip_fragmentation/main.c | 10 +++- examples/ip_pipeline/cli.c | 9 ++- examples/ip_pipeline/link.c | 3 +- examples/ip_reassembly/main.c | 10 +++- examples/ipsec-secgw/ipsec-secgw.c | 10 +++- examples/ipv4_multicast/main.c | 10 +++- examples/kni/main.c | 19 +++++- examples/l2fwd-crypto/main.c | 10 +++- examples/l2fwd-jobstats/main.c | 10 +++- examples/l2fwd-keepalive/main.c | 10 +++- examples/l2fwd/main.c | 10 +++- examples/l3fwd-acl/main.c | 10 +++- examples/l3fwd-power/main.c | 10 +++- examples/l3fwd/main.c | 10 +++- examples/link_status_interrupt/main.c | 26 ++++++-- examples/load_balancer/init.c | 10 +++- .../client_server_mp/mp_server/init.c | 10 +++- examples/multi_process/symmetric_mp/main.c | 10 +++- .../performance-thread/l3fwd-thread/main.c | 10 +++- examples/qos_sched/init.c | 13 +++- examples/server_node_efd/server/init.c | 10 +++- examples/vm_power_manager/main.c | 10 +++- lib/librte_ethdev/rte_ethdev.c | 16 +++-- lib/librte_ethdev/rte_ethdev.h | 12 +++- 47 files changed, 477 insertions(+), 89 deletions(-)