From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7B7FB42E70; Fri, 14 Jul 2023 10:16:11 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9EF5442D16; Fri, 14 Jul 2023 10:15:54 +0200 (CEST) Received: from NAM04-DM6-obe.outbound.protection.outlook.com (mail-dm6nam04on2125.outbound.protection.outlook.com [40.107.102.125]) by mails.dpdk.org (Postfix) with ESMTP id 50EFA42BC9 for ; Fri, 14 Jul 2023 10:15:53 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DEaSRSDvfJ0eCzSsIkOW8CKmcBeTt3/6E38F9DcGP8sEzIu+uDJ3bPpQjdtaEHAo6cjVuUce9SWkw5hopF+b9RigP7Ru2YRV6jkwCSD6S8XPW+jb+ovKETwxU4F/lf7vo77MywSvLQe6Ubdh7jb0+pIjddCz8KvJHxhYm1t+HqA6Y6KHNwme0h/EvMH4BtZ4QOisGID/dJlJDdSP5ctkRd0OaqA3mAeonmg+XqDN5Glcgq8aAk93gV8Dvn9Ed1UsadOf3GDLhhAeSiBOh+UntGg9hrHUUCb5aFPNPKkF6Een1zh+KcmbXlQGJhNNj+pNsHMXnG2nt9CERteZWJlwCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=VplMpqpLjU530+jiVxdtuL6anqjQ5XOak5BlmlAj+2E=; b=Wjssqm5dAXi+VgCiE0RFILYhvs2M8bjie5YKTXT7uS6lMinO9po6mhNi3ouJU5KofkPNs/grl+IGPH10cC4ULCLi5fyfLK52ObXZLJp5wZ0WsUj23uG89AAP30gf2hGBhKDh7djYUyVJW5GLEcSecKPk3yTYtfcq5fOxnzWTBg/tPksKLgQMOmyNvf5c3kSgLPYhJIw1J7H12Ls5DoD1gGesKKdT9pBa2vV9V/uh0pflH73psO7zC9V/qpLdsqKZ40xEX1o/+ZrrtWeLwG2ztjYr1u9I731Ax0tgI54MKZ/1tI8VUCkFF3GslB8+vCpR2vrU8tmsuzX+hTLNEn/I4w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=corigine.com; dmarc=pass action=none header.from=corigine.com; dkim=pass header.d=corigine.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=corigine.onmicrosoft.com; s=selector2-corigine-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=VplMpqpLjU530+jiVxdtuL6anqjQ5XOak5BlmlAj+2E=; b=VetCxbtC1zRkA2XZRNNobA84VpS5LAnDA1NOuVKy0X+BKuBv+iiZe7Eep00Y7c6Xj5AZ/8p6/QR1Qm/im1F6VHoT2Ugg8R6Tf5c1qNoPgftw23jrIZajROnz3kHjaw0r2OjjIyIpSAPnICq2G1UHx8PuaLbNaDX34LrgxbXa+Rg= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=corigine.com; Received: from SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) by SA0PR13MB6001.namprd13.prod.outlook.com (2603:10b6:806:152::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.27; Fri, 14 Jul 2023 08:15:51 +0000 Received: from SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::d2cb:a650:e1ce:2174]) by SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::d2cb:a650:e1ce:2174%4]) with mapi id 15.20.6588.027; Fri, 14 Jul 2023 08:15:51 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, niklas.soderlund@corigine.com, Chaoyong He , Long Wu Subject: [PATCH 3/3] doc: announce bonding function change Date: Fri, 14 Jul 2023 16:15:26 +0800 Message-Id: <20230714081526.1277786-4-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230714081526.1277786-1-chaoyong.he@corigine.com> References: <20230714081526.1277786-1-chaoyong.he@corigine.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SJ0PR13CA0240.namprd13.prod.outlook.com (2603:10b6:a03:2c1::35) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|SA0PR13MB6001:EE_ X-MS-Office365-Filtering-Correlation-Id: d836d4cd-dffd-438e-a9d0-08db84428918 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: FqBe2bcS7uPiy6p7A3e0zx1u4OOeUbR3UDmYHeaXB2xMuO3JbmBrRe/dbfgePy+hacN/b/iIqGfo3iTpXB/1/LLC/n6jJad3qFdBb3VMb2rMt4Ckzx6zzgSa3u4sSugkBeYNr0MobYsmRVzxYT+5HGxUSa0dMwhNEZzYwgXq5f1jhRI6BuJzwm5JNXV5tXfVZaD/1VF9+1jP6O+70QqxLM5maUhQMei260zlGOk6zI10vVar93/35fpBmbIVWvajaaKkdASAKWdQmjIHpNETB+1/9p/w34vsN82NLb6m1XlcOM+4/At4t4y0TbRV4wWITEPRGg9w/YERrFaFLQEWs2aKsJXpE61IupWNycdgjUrTzqgANWw7852GHAcgy4op6ZTmfzLozI1kxCbM7Iw8+HClFmtLoZRXrYWr3qzR3SlJpzP4Fag5QquI/IbFMmIg4V/4rUMNngcP7fl7jIT25urOOs35KuPkmKmYVNehazkyfgY1mPosp7tXyzF5KsQs8/BHlVt5CPQvysKklIXMLPJKq1bg/HlSiLK/wbRibT/6fPY2AA/q0aBrt3GjzxrE3G+uV/HlcTTjO60ElSwxsm7ac4NqpPj6KVhHjqC6sejaO00D6CaiCaMDfLPlUAxEUpkioryflz4Bc7zEcJhHng7Rzan5AMkRpR9ziHTWHXA= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR13MB5545.namprd13.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(136003)(396003)(39840400004)(366004)(346002)(376002)(451199021)(2906002)(38100700002)(38350700002)(6512007)(83380400001)(2616005)(186003)(107886003)(26005)(1076003)(6506007)(5660300002)(86362001)(8676002)(8936002)(30864003)(44832011)(36756003)(478600001)(54906003)(41300700001)(6486002)(52116002)(6666004)(316002)(4326008)(6916009)(66476007)(66556008)(66946007); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?m5PHeqFOi4I3gCW7CMtQb4x221ddwpEwy+fTTxoQCRcPxdBkkZqw0xB/2xQI?= =?us-ascii?Q?PXJS4O2XjsaG+oYfCeoM8mC5oaHeIFumYtp2nSYGR2eLpivM9C0jO0CKeche?= =?us-ascii?Q?O2/3Kl+3dakPj+kFKkgnEgh0tZLw+6GatBpzJb3hHDJvBs3ZFrXKjXCrTZD4?= =?us-ascii?Q?MuJMnk7fjJSHjP2SSBUkN6Jc9WEH9BGPsvVYy7dj2C4z3A6rj+JLFhmpnyIz?= =?us-ascii?Q?FiNVwMKrFmAADoKiFzo24rnqyZvsvMvgzh1o+san1CfWtuEetT6/YDCCSXeJ?= =?us-ascii?Q?ToJMQUxxaE/bg5zqLDx60vfs5TcbCg9SDxnNQikyBDq1E6xv4WaV8XWs7rCH?= =?us-ascii?Q?spZhkSZeDU4NW+ZqGEfSnM7+PNoIrsLBCogANkSlX0SWi//7HXk+xlg5o9Tc?= =?us-ascii?Q?CA/aObfHH94ELII0c7Ceyf/3uDH/weugMK05NjbBVMplDRxyAOhTO1ejjqb7?= =?us-ascii?Q?0NorhRehdDkrh1bGM9vbJoaISfn5ou0V9eGedV26NFqD8D/4GS0PX1AgLD2q?= =?us-ascii?Q?FEXPMFHifg9jj1cKCCH+q7d4WJPMIw4jPZa0cHIYPDkB7qjaD6PKmL7Wel3B?= =?us-ascii?Q?DV5wMTfhpIiKBzI824yw710r42g+HHySSEphZR20hvqYDFsY+84eS/83clCm?= =?us-ascii?Q?lnszmYOzXFayZ3RgHE0Gq4+vJAz5R+9yU5hV7M3+4hkXgpN7TIJXn5jtatfc?= =?us-ascii?Q?mT0Tvm1BcCv/kVITdJvKRHk4Y9Jv749w3jsywEO6DQXr0pcfKUuI7806cfmz?= =?us-ascii?Q?K5OjDDItvsMTSbVdR/rj7vXpei6lpZBvZrpmV8iVIo/GhzusDmBIr0ZXDJyO?= =?us-ascii?Q?SzgHf51tabLPSxEVsp/e9RNZ/bcdj/o6oRHVwHCT5HEvroDbGYrVL+0n/hDC?= =?us-ascii?Q?kdVuG7tYg0sbWct0Z4ForVDKHcQ+s7SCUZJU7N+KkYXy3bbRhObyj9FelrKL?= =?us-ascii?Q?9u/EWEvgDpWThrXrIoEGGM7hAjbjLy2eoBkah4cmw5De85QBmthgZN03fBJr?= =?us-ascii?Q?W5TXVvaKfjQpZcq8UznxVu2XPpqA3teX3LwqBP/EIdTed/Odsgeje63jzCrQ?= =?us-ascii?Q?dEpAOm9PiVzkfBarDnbDDkOEF7gQIgL2QB4+cRqOqRFl149WoyMyJbjBKn4b?= =?us-ascii?Q?3wyauJP60R9ho/miIhJL8enRgq1aYU5tLaGH5h5V6M3Akn+cnaQmr0mXG7Ws?= =?us-ascii?Q?oHtXnSs+YZgXYId20xhh+wVDyI+fHMxaztmoakMqXpucc72/F1vT2wFE9D3P?= =?us-ascii?Q?zbFbDanOeiugZVfX8Uoq2Eu0j4GetX8hYLPD/sHTgY3DxWF7AWxqIRKc7ffQ?= =?us-ascii?Q?ryR9Glh8PwUi6xF8kkmJ3nJvfRAvoI9MleeCZKCVJGwC+SKWKqiis7+KWTAG?= =?us-ascii?Q?JX+Z5/8VSLZU3UuAL76fxmXS88MUj0E74ly/uZL1AKGXtYlzrLm0E6uSRfHg?= =?us-ascii?Q?O2aeY3ri7x5U9v3EcxKV1QvAQ0yEt0RS3HbYAengpvIuGXyNsJU5FmngnKrd?= =?us-ascii?Q?bdOKt/q/Tj0JGA9Kyn/Yvj0dwX/KfHq4WkLBmL3tzI0+GuyulKizpFewt7ML?= =?us-ascii?Q?KBepfDpI+dqU/sMv0icy4hnheDiOsL7k+jdwiRojJwqPgl+O8kXmXjN5kMrv?= =?us-ascii?Q?jQ=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: d836d4cd-dffd-438e-a9d0-08db84428918 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jul 2023 08:15:51.0816 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: fe128f2c-073b-4c20-818e-7246a585940c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Aopa23i0OI5AU0x2n9FkE2BykDGvc1cjTMwcmRfp8Zs711uVItsV9e18WbTnw1wDIu+/fJD6fuY6qPcTjEQRmxZToKcHV6SUlf86IO22720= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR13MB6001 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org In order to support inclusive naming, some of the function in DPDK will need to be renamed. Do this through deprecation process now for 23.07. Signed-off-by: Long Wu Signed-off-by: Chaoyong He --- app/test-pmd/testpmd.c | 4 +- app/test/test_link_bonding.c | 100 +++++++++++----------- app/test/test_link_bonding_mode4.c | 8 +- app/test/test_link_bonding_rssconf.c | 8 +- doc/guides/rel_notes/deprecation.rst | 12 +++ drivers/net/bonding/bonding_testpmd.c | 4 +- drivers/net/bonding/rte_eth_bond.h | 42 ++++++++- drivers/net/bonding/rte_eth_bond_8023ad.c | 2 +- drivers/net/bonding/rte_eth_bond_8023ad.h | 11 ++- drivers/net/bonding/rte_eth_bond_api.c | 8 +- drivers/net/bonding/rte_eth_bond_pmd.c | 8 +- drivers/net/bonding/version.map | 10 +++ examples/bond/main.c | 6 +- 13 files changed, 144 insertions(+), 79 deletions(-) diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index 938ca035d4..2dd4180bf9 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -612,7 +612,7 @@ change_bonding_slave_port_status(portid_t bond_pid, bool is_stop) portid_t slave_pid; int i; - num_slaves = rte_eth_bond_slaves_get(bond_pid, slave_pids, + num_slaves = rte_eth_bond_members_get(bond_pid, slave_pids, RTE_MAX_ETHPORTS); if (num_slaves < 0) { fprintf(stderr, "Failed to get slave list for port = %u\n", @@ -3519,7 +3519,7 @@ close_port(portid_t pid) flush_port_owned_resources(pi); #ifdef RTE_NET_BOND if (port->bond_flag == 1) - num_slaves = rte_eth_bond_slaves_get(pi, + num_slaves = rte_eth_bond_members_get(pi, slave_pids, RTE_MAX_ETHPORTS); #endif rte_eth_dev_close(pi); diff --git a/app/test/test_link_bonding.c b/app/test/test_link_bonding.c index 5c496352c2..a94644a831 100644 --- a/app/test/test_link_bonding.c +++ b/app/test/test_link_bonding.c @@ -281,14 +281,14 @@ test_create_bonded_device(void) test_params->bonding_mode), "Failed to set ethdev %d to mode %d", test_params->bonded_port_id, test_params->bonding_mode); - current_slave_count = rte_eth_bond_slaves_get(test_params->bonded_port_id, + current_slave_count = rte_eth_bond_members_get(test_params->bonded_port_id, slaves, RTE_MAX_ETHPORTS); TEST_ASSERT_EQUAL(current_slave_count, 0, "Number of slaves %d is great than expected %d.", current_slave_count, 0); - current_slave_count = rte_eth_bond_active_slaves_get( + current_slave_count = rte_eth_bond_active_members_get( test_params->bonded_port_id, slaves, RTE_MAX_ETHPORTS); TEST_ASSERT_EQUAL(current_slave_count, 0, @@ -335,19 +335,19 @@ test_add_slave_to_bonded_device(void) uint16_t slaves[RTE_MAX_ETHPORTS]; - TEST_ASSERT_SUCCESS(rte_eth_bond_slave_add(test_params->bonded_port_id, + TEST_ASSERT_SUCCESS(rte_eth_bond_member_add(test_params->bonded_port_id, test_params->slave_port_ids[test_params->bonded_slave_count]), "Failed to add slave (%d) to bonded port (%d).", test_params->slave_port_ids[test_params->bonded_slave_count], test_params->bonded_port_id); - current_slave_count = rte_eth_bond_slaves_get(test_params->bonded_port_id, + current_slave_count = rte_eth_bond_members_get(test_params->bonded_port_id, slaves, RTE_MAX_ETHPORTS); TEST_ASSERT_EQUAL(current_slave_count, test_params->bonded_slave_count + 1, "Number of slaves (%d) is greater than expected (%d).", current_slave_count, test_params->bonded_slave_count + 1); - current_slave_count = rte_eth_bond_active_slaves_get( + current_slave_count = rte_eth_bond_active_members_get( test_params->bonded_port_id, slaves, RTE_MAX_ETHPORTS); TEST_ASSERT_EQUAL(current_slave_count, 0, "Number of active slaves (%d) is not as expected (%d).\n", @@ -362,12 +362,12 @@ static int test_add_slave_to_invalid_bonded_device(void) { /* Invalid port ID */ - TEST_ASSERT_FAIL(rte_eth_bond_slave_add(test_params->bonded_port_id + 5, + TEST_ASSERT_FAIL(rte_eth_bond_member_add(test_params->bonded_port_id + 5, test_params->slave_port_ids[test_params->bonded_slave_count]), "Expected call to failed as invalid port specified."); /* Non bonded device */ - TEST_ASSERT_FAIL(rte_eth_bond_slave_add(test_params->slave_port_ids[0], + TEST_ASSERT_FAIL(rte_eth_bond_member_add(test_params->slave_port_ids[0], test_params->slave_port_ids[test_params->bonded_slave_count]), "Expected call to failed as invalid port specified."); @@ -382,14 +382,14 @@ test_remove_slave_from_bonded_device(void) struct rte_ether_addr read_mac_addr, *mac_addr; uint16_t slaves[RTE_MAX_ETHPORTS]; - TEST_ASSERT_SUCCESS(rte_eth_bond_slave_remove(test_params->bonded_port_id, + TEST_ASSERT_SUCCESS(rte_eth_bond_member_remove(test_params->bonded_port_id, test_params->slave_port_ids[test_params->bonded_slave_count-1]), "Failed to remove slave %d from bonded port (%d).", test_params->slave_port_ids[test_params->bonded_slave_count-1], test_params->bonded_port_id); - current_slave_count = rte_eth_bond_slaves_get(test_params->bonded_port_id, + current_slave_count = rte_eth_bond_members_get(test_params->bonded_port_id, slaves, RTE_MAX_ETHPORTS); TEST_ASSERT_EQUAL(current_slave_count, test_params->bonded_slave_count - 1, @@ -424,13 +424,13 @@ static int test_remove_slave_from_invalid_bonded_device(void) { /* Invalid port ID */ - TEST_ASSERT_FAIL(rte_eth_bond_slave_remove( + TEST_ASSERT_FAIL(rte_eth_bond_member_remove( test_params->bonded_port_id + 5, test_params->slave_port_ids[test_params->bonded_slave_count - 1]), "Expected call to failed as invalid port specified."); /* Non bonded device */ - TEST_ASSERT_FAIL(rte_eth_bond_slave_remove( + TEST_ASSERT_FAIL(rte_eth_bond_member_remove( test_params->slave_port_ids[0], test_params->slave_port_ids[test_params->bonded_slave_count - 1]), "Expected call to failed as invalid port specified."); @@ -449,7 +449,7 @@ test_add_already_bonded_slave_to_bonded_device(void) test_add_slave_to_bonded_device(); - current_slave_count = rte_eth_bond_slaves_get(test_params->bonded_port_id, + current_slave_count = rte_eth_bond_members_get(test_params->bonded_port_id, slaves, RTE_MAX_ETHPORTS); TEST_ASSERT_EQUAL(current_slave_count, 1, "Number of slaves (%d) is not that expected (%d).", @@ -461,7 +461,7 @@ test_add_already_bonded_slave_to_bonded_device(void) rte_socket_id()); TEST_ASSERT(port_id >= 0, "Failed to create bonded device."); - TEST_ASSERT(rte_eth_bond_slave_add(port_id, + TEST_ASSERT(rte_eth_bond_member_add(port_id, test_params->slave_port_ids[test_params->bonded_slave_count - 1]) < 0, "Added slave (%d) to bonded port (%d) unexpectedly.", @@ -482,34 +482,34 @@ test_get_slaves_from_bonded_device(void) "Failed to add slave to bonded device"); /* Invalid port id */ - current_slave_count = rte_eth_bond_slaves_get(INVALID_PORT_ID, slaves, + current_slave_count = rte_eth_bond_members_get(INVALID_PORT_ID, slaves, RTE_MAX_ETHPORTS); TEST_ASSERT(current_slave_count < 0, "Invalid port id unexpectedly succeeded"); - current_slave_count = rte_eth_bond_active_slaves_get(INVALID_PORT_ID, + current_slave_count = rte_eth_bond_active_members_get(INVALID_PORT_ID, slaves, RTE_MAX_ETHPORTS); TEST_ASSERT(current_slave_count < 0, "Invalid port id unexpectedly succeeded"); /* Invalid slaves pointer */ - current_slave_count = rte_eth_bond_slaves_get(test_params->bonded_port_id, + current_slave_count = rte_eth_bond_members_get(test_params->bonded_port_id, NULL, RTE_MAX_ETHPORTS); TEST_ASSERT(current_slave_count < 0, "Invalid slave array unexpectedly succeeded"); - current_slave_count = rte_eth_bond_active_slaves_get( + current_slave_count = rte_eth_bond_active_members_get( test_params->bonded_port_id, NULL, RTE_MAX_ETHPORTS); TEST_ASSERT(current_slave_count < 0, "Invalid slave array unexpectedly succeeded"); /* non bonded device*/ - current_slave_count = rte_eth_bond_slaves_get( + current_slave_count = rte_eth_bond_members_get( test_params->slave_port_ids[0], NULL, RTE_MAX_ETHPORTS); TEST_ASSERT(current_slave_count < 0, "Invalid port id unexpectedly succeeded"); - current_slave_count = rte_eth_bond_active_slaves_get( + current_slave_count = rte_eth_bond_active_members_get( test_params->slave_port_ids[0], NULL, RTE_MAX_ETHPORTS); TEST_ASSERT(current_slave_count < 0, "Invalid port id unexpectedly succeeded"); @@ -573,13 +573,13 @@ test_start_bonded_device(void) virtual_ethdev_simulate_link_status_interrupt( test_params->slave_port_ids[test_params->bonded_slave_count-1], 1); - current_slave_count = rte_eth_bond_slaves_get(test_params->bonded_port_id, + current_slave_count = rte_eth_bond_members_get(test_params->bonded_port_id, slaves, RTE_MAX_ETHPORTS); TEST_ASSERT_EQUAL(current_slave_count, test_params->bonded_slave_count, "Number of slaves (%d) is not expected value (%d).", current_slave_count, test_params->bonded_slave_count); - current_slave_count = rte_eth_bond_active_slaves_get( + current_slave_count = rte_eth_bond_active_members_get( test_params->bonded_port_id, slaves, RTE_MAX_ETHPORTS); TEST_ASSERT_EQUAL(current_slave_count, test_params->bonded_slave_count, "Number of active slaves (%d) is not expected value (%d).", @@ -627,13 +627,13 @@ test_stop_bonded_device(void) "Bonded port (%d) status (%d) is not expected value (%d).", test_params->bonded_port_id, link_status.link_status, 0); - current_slave_count = rte_eth_bond_slaves_get(test_params->bonded_port_id, + current_slave_count = rte_eth_bond_members_get(test_params->bonded_port_id, slaves, RTE_MAX_ETHPORTS); TEST_ASSERT_EQUAL(current_slave_count, test_params->bonded_slave_count, "Number of slaves (%d) is not expected value (%d).", current_slave_count, test_params->bonded_slave_count); - current_slave_count = rte_eth_bond_active_slaves_get( + current_slave_count = rte_eth_bond_active_members_get( test_params->bonded_port_id, slaves, RTE_MAX_ETHPORTS); TEST_ASSERT_EQUAL(current_slave_count, 0, "Number of active slaves (%d) is not expected value (%d).", @@ -956,13 +956,13 @@ test_set_bonded_port_initialization_mac_assignment(void) * 2. Add slave ethdevs to bonded device */ for (i = 0; i < BONDED_INIT_MAC_ASSIGNMENT_SLAVE_COUNT; i++) { - TEST_ASSERT_SUCCESS(rte_eth_bond_slave_add(bonded_port_id, + TEST_ASSERT_SUCCESS(rte_eth_bond_member_add(bonded_port_id, slave_port_ids[i]), "Failed to add slave (%d) to bonded port (%d).", slave_port_ids[i], bonded_port_id); } - slave_count = rte_eth_bond_slaves_get(bonded_port_id, slaves, + slave_count = rte_eth_bond_members_get(bonded_port_id, slaves, RTE_MAX_ETHPORTS); TEST_ASSERT_EQUAL(BONDED_INIT_MAC_ASSIGNMENT_SLAVE_COUNT, slave_count, "Number of slaves (%d) is not as expected (%d)", @@ -1080,13 +1080,13 @@ test_set_bonded_port_initialization_mac_assignment(void) bonded_port_id); for (i = 0; i < BONDED_INIT_MAC_ASSIGNMENT_SLAVE_COUNT; i++) { - TEST_ASSERT_SUCCESS(rte_eth_bond_slave_remove(bonded_port_id, + TEST_ASSERT_SUCCESS(rte_eth_bond_member_remove(bonded_port_id, slave_port_ids[i]), "Failed to remove slave %d from bonded port (%d).", slave_port_ids[i], bonded_port_id); } - slave_count = rte_eth_bond_slaves_get(bonded_port_id, slaves, + slave_count = rte_eth_bond_members_get(bonded_port_id, slaves, RTE_MAX_ETHPORTS); TEST_ASSERT_EQUAL(slave_count, 0, @@ -1169,7 +1169,7 @@ test_adding_slave_after_bonded_device_started(void) test_params->slave_port_ids[i], 1); } - TEST_ASSERT_SUCCESS(rte_eth_bond_slave_add(test_params->bonded_port_id, + TEST_ASSERT_SUCCESS(rte_eth_bond_member_add(test_params->bonded_port_id, test_params->slave_port_ids[test_params->bonded_slave_count]), "Failed to add slave to bonded port.\n"); @@ -1253,7 +1253,7 @@ test_status_interrupt(void) RTE_ETH_EVENT_INTR_LSC, test_bonding_lsc_event_callback, &test_params->bonded_port_id); - slave_count = rte_eth_bond_active_slaves_get(test_params->bonded_port_id, + slave_count = rte_eth_bond_active_members_get(test_params->bonded_port_id, slaves, RTE_MAX_ETHPORTS); TEST_ASSERT_EQUAL(slave_count, TEST_STATUS_INTERRUPT_SLAVE_COUNT, @@ -1281,7 +1281,7 @@ test_status_interrupt(void) TEST_ASSERT(test_lsc_interrupt_count > 0, "Did not receive link status change interrupt"); - slave_count = rte_eth_bond_active_slaves_get(test_params->bonded_port_id, + slave_count = rte_eth_bond_active_members_get(test_params->bonded_port_id, slaves, RTE_MAX_ETHPORTS); TEST_ASSERT_EQUAL(slave_count, 0, @@ -1909,13 +1909,13 @@ test_roundrobin_verify_slave_link_status_change_behaviour(void) "Failed to initialize bonded device with slaves"); /* Verify Current Slaves Count /Active Slave Count is */ - slave_count = rte_eth_bond_slaves_get(test_params->bonded_port_id, slaves, + slave_count = rte_eth_bond_members_get(test_params->bonded_port_id, slaves, RTE_MAX_ETHPORTS); TEST_ASSERT_EQUAL(slave_count, TEST_RR_LINK_STATUS_SLAVE_COUNT, "Number of slaves (%d) is not as expected (%d).", slave_count, TEST_RR_LINK_STATUS_SLAVE_COUNT); - slave_count = rte_eth_bond_active_slaves_get(test_params->bonded_port_id, + slave_count = rte_eth_bond_active_members_get(test_params->bonded_port_id, slaves, RTE_MAX_ETHPORTS); TEST_ASSERT_EQUAL(slave_count, TEST_RR_LINK_STATUS_SLAVE_COUNT, "Number of active slaves (%d) is not as expected (%d).", @@ -1927,7 +1927,7 @@ test_roundrobin_verify_slave_link_status_change_behaviour(void) virtual_ethdev_simulate_link_status_interrupt( test_params->slave_port_ids[3], 0); - slave_count = rte_eth_bond_active_slaves_get(test_params->bonded_port_id, + slave_count = rte_eth_bond_active_members_get(test_params->bonded_port_id, slaves, RTE_MAX_ETHPORTS); TEST_ASSERT_EQUAL(slave_count, TEST_RR_LINK_STATUS_EXPECTED_ACTIVE_SLAVE_COUNT, @@ -2053,7 +2053,7 @@ test_roundrobin_verfiy_polling_slave_link_status_change(void) } /* Add slave to bonded device */ - TEST_ASSERT_SUCCESS(rte_eth_bond_slave_add(test_params->bonded_port_id, + TEST_ASSERT_SUCCESS(rte_eth_bond_member_add(test_params->bonded_port_id, polling_test_slaves[i]), "Failed to add slave %s(%d) to bonded device %d", slave_name, polling_test_slaves[i], @@ -2104,7 +2104,7 @@ test_roundrobin_verfiy_polling_slave_link_status_change(void) for (i = 0; i < TEST_RR_POLLING_LINK_STATUS_SLAVE_COUNT; i++) { TEST_ASSERT_SUCCESS( - rte_eth_bond_slave_remove(test_params->bonded_port_id, + rte_eth_bond_member_remove(test_params->bonded_port_id, polling_test_slaves[i]), "Failed to remove slave %d from bonded port (%d)", polling_test_slaves[i], test_params->bonded_port_id); @@ -2509,13 +2509,13 @@ test_activebackup_verify_slave_link_status_change_failover(void) "Failed to initialize bonded device with slaves"); /* Verify Current Slaves Count /Active Slave Count is */ - slave_count = rte_eth_bond_slaves_get(test_params->bonded_port_id, slaves, + slave_count = rte_eth_bond_members_get(test_params->bonded_port_id, slaves, RTE_MAX_ETHPORTS); TEST_ASSERT_EQUAL(slave_count, 4, "Number of slaves (%d) is not as expected (%d).", slave_count, 4); - slave_count = rte_eth_bond_active_slaves_get(test_params->bonded_port_id, + slave_count = rte_eth_bond_active_members_get(test_params->bonded_port_id, slaves, RTE_MAX_ETHPORTS); TEST_ASSERT_EQUAL(slave_count, 4, "Number of active slaves (%d) is not as expected (%d).", @@ -2531,7 +2531,7 @@ test_activebackup_verify_slave_link_status_change_failover(void) virtual_ethdev_simulate_link_status_interrupt( test_params->slave_port_ids[3], 0); - TEST_ASSERT_EQUAL(rte_eth_bond_active_slaves_get( + TEST_ASSERT_EQUAL(rte_eth_bond_active_members_get( test_params->bonded_port_id, slaves, RTE_MAX_ETHPORTS), 2, "Number of active slaves (%d) is not as expected (%d).", slave_count, 2); @@ -2547,7 +2547,7 @@ test_activebackup_verify_slave_link_status_change_failover(void) virtual_ethdev_simulate_link_status_interrupt( test_params->slave_port_ids[0], 0); - TEST_ASSERT_EQUAL(rte_eth_bond_active_slaves_get( + TEST_ASSERT_EQUAL(rte_eth_bond_active_members_get( test_params->bonded_port_id, slaves, RTE_MAX_ETHPORTS), 3, "Number of active slaves (%d) is not as expected (%d).", @@ -3441,13 +3441,13 @@ test_balance_verify_slave_link_status_change_behaviour(void) /* Verify Current Slaves Count /Active Slave Count is */ - slave_count = rte_eth_bond_slaves_get(test_params->bonded_port_id, slaves, + slave_count = rte_eth_bond_members_get(test_params->bonded_port_id, slaves, RTE_MAX_ETHPORTS); TEST_ASSERT_EQUAL(slave_count, TEST_BALANCE_LINK_STATUS_SLAVE_COUNT, "Number of slaves (%d) is not as expected (%d).", slave_count, TEST_BALANCE_LINK_STATUS_SLAVE_COUNT); - slave_count = rte_eth_bond_active_slaves_get(test_params->bonded_port_id, + slave_count = rte_eth_bond_active_members_get(test_params->bonded_port_id, slaves, RTE_MAX_ETHPORTS); TEST_ASSERT_EQUAL(slave_count, TEST_BALANCE_LINK_STATUS_SLAVE_COUNT, "Number of active slaves (%d) is not as expected (%d).", @@ -3459,7 +3459,7 @@ test_balance_verify_slave_link_status_change_behaviour(void) virtual_ethdev_simulate_link_status_interrupt( test_params->slave_port_ids[3], 0); - TEST_ASSERT_EQUAL(rte_eth_bond_active_slaves_get( + TEST_ASSERT_EQUAL(rte_eth_bond_active_members_get( test_params->bonded_port_id, slaves, RTE_MAX_ETHPORTS), 2, "Number of active slaves (%d) is not as expected (%d).", slave_count, 2); @@ -3508,7 +3508,7 @@ test_balance_verify_slave_link_status_change_behaviour(void) virtual_ethdev_simulate_link_status_interrupt( test_params->slave_port_ids[2], 0); - TEST_ASSERT_EQUAL(rte_eth_bond_active_slaves_get( + TEST_ASSERT_EQUAL(rte_eth_bond_active_members_get( test_params->bonded_port_id, slaves, RTE_MAX_ETHPORTS), 1, "Number of active slaves (%d) is not as expected (%d).", slave_count, 1); @@ -4023,13 +4023,13 @@ test_broadcast_verify_slave_link_status_change_behaviour(void) 1), "Failed to initialise bonded device"); /* Verify Current Slaves Count /Active Slave Count is */ - slave_count = rte_eth_bond_slaves_get(test_params->bonded_port_id, slaves, + slave_count = rte_eth_bond_members_get(test_params->bonded_port_id, slaves, RTE_MAX_ETHPORTS); TEST_ASSERT_EQUAL(slave_count, 4, "Number of slaves (%d) is not as expected (%d).", slave_count, 4); - slave_count = rte_eth_bond_active_slaves_get(test_params->bonded_port_id, + slave_count = rte_eth_bond_active_members_get(test_params->bonded_port_id, slaves, RTE_MAX_ETHPORTS); TEST_ASSERT_EQUAL(slave_count, 4, "Number of active slaves (%d) is not as expected (%d).", @@ -4041,7 +4041,7 @@ test_broadcast_verify_slave_link_status_change_behaviour(void) virtual_ethdev_simulate_link_status_interrupt( test_params->slave_port_ids[3], 0); - slave_count = rte_eth_bond_active_slaves_get(test_params->bonded_port_id, + slave_count = rte_eth_bond_active_members_get(test_params->bonded_port_id, slaves, RTE_MAX_ETHPORTS); TEST_ASSERT_EQUAL(slave_count, 2, "Number of active slaves (%d) is not as expected (%d).", @@ -4581,13 +4581,13 @@ test_tlb_verify_slave_link_status_change_failover(void) "Failed to initialize bonded device with slaves"); /* Verify Current Slaves Count /Active Slave Count is */ - slave_count = rte_eth_bond_slaves_get(test_params->bonded_port_id, slaves, + slave_count = rte_eth_bond_members_get(test_params->bonded_port_id, slaves, RTE_MAX_ETHPORTS); TEST_ASSERT_EQUAL(slave_count, 4, "Number of slaves (%d) is not as expected (%d).\n", slave_count, 4); - slave_count = rte_eth_bond_active_slaves_get(test_params->bonded_port_id, + slave_count = rte_eth_bond_active_members_get(test_params->bonded_port_id, slaves, RTE_MAX_ETHPORTS); TEST_ASSERT_EQUAL(slave_count, (int)4, "Number of slaves (%d) is not as expected (%d).\n", @@ -4603,7 +4603,7 @@ test_tlb_verify_slave_link_status_change_failover(void) virtual_ethdev_simulate_link_status_interrupt( test_params->slave_port_ids[3], 0); - TEST_ASSERT_EQUAL(rte_eth_bond_active_slaves_get( + TEST_ASSERT_EQUAL(rte_eth_bond_active_members_get( test_params->bonded_port_id, slaves, RTE_MAX_ETHPORTS), 2, "Number of active slaves (%d) is not as expected (%d).", slave_count, 2); @@ -4619,7 +4619,7 @@ test_tlb_verify_slave_link_status_change_failover(void) virtual_ethdev_simulate_link_status_interrupt( test_params->slave_port_ids[0], 0); - TEST_ASSERT_EQUAL(rte_eth_bond_active_slaves_get( + TEST_ASSERT_EQUAL(rte_eth_bond_active_members_get( test_params->bonded_port_id, slaves, RTE_MAX_ETHPORTS), 3, "Number of active slaves (%d) is not as expected (%d).", slave_count, 3); diff --git a/app/test/test_link_bonding_mode4.c b/app/test/test_link_bonding_mode4.c index 21c512c94b..98d7cf9f54 100644 --- a/app/test/test_link_bonding_mode4.c +++ b/app/test/test_link_bonding_mode4.c @@ -238,7 +238,7 @@ add_slave(struct slave_conf *slave, uint8_t start) TEST_ASSERT_SUCCESS(rte_eth_dev_mac_addr_add(slave->port_id, &addr, 0), "Failed to set slave MAC address"); - TEST_ASSERT_SUCCESS(rte_eth_bond_slave_add(test_params.bonded_port_id, + TEST_ASSERT_SUCCESS(rte_eth_bond_member_add(test_params.bonded_port_id, slave->port_id), "Failed to add slave (idx=%u, id=%u) to bonding (id=%u)", (uint8_t)(slave - test_params.slave_ports), slave->port_id, @@ -279,7 +279,7 @@ remove_slave(struct slave_conf *slave) "Slave %u tx queue not empty while removing from bonding.", slave->port_id); - TEST_ASSERT_EQUAL(rte_eth_bond_slave_remove(test_params.bonded_port_id, + TEST_ASSERT_EQUAL(rte_eth_bond_member_remove(test_params.bonded_port_id, slave->port_id), 0, "Failed to remove slave (idx=%u, id=%u) from bonding (id=%u)", (uint8_t)slave_idx, slave->port_id, @@ -359,7 +359,7 @@ remove_slaves_and_stop_bonded_device(void) FOR_EACH_SLAVE(i, slave) remove_slave(slave); - retval = rte_eth_bond_slaves_get(test_params.bonded_port_id, slaves, + retval = rte_eth_bond_members_get(test_params.bonded_port_id, slaves, RTE_DIM(slaves)); TEST_ASSERT_EQUAL(retval, 0, @@ -1540,7 +1540,7 @@ check_environment(void) break; } - slaves_count = rte_eth_bond_slaves_get(test_params.bonded_port_id, + slaves_count = rte_eth_bond_members_get(test_params.bonded_port_id, slaves, RTE_DIM(slaves)); if (slaves_count != 0) diff --git a/app/test/test_link_bonding_rssconf.c b/app/test/test_link_bonding_rssconf.c index 464fb2dbd0..5d1b73f719 100644 --- a/app/test/test_link_bonding_rssconf.c +++ b/app/test/test_link_bonding_rssconf.c @@ -162,7 +162,7 @@ remove_slaves(void) FOR_EACH_PORT(n, port) { port = &test_params.slave_ports[n]; if (port->is_slave) { - TEST_ASSERT_SUCCESS(rte_eth_bond_slave_remove( + TEST_ASSERT_SUCCESS(rte_eth_bond_member_remove( test_params.bond_port_id, port->port_id), "Cannot remove slave %d from bonding", port->port_id); port->is_slave = 0; @@ -193,7 +193,7 @@ bond_slaves(void) FOR_EACH_PORT(n, port) { port = &test_params.slave_ports[n]; if (!port->is_slave) { - TEST_ASSERT_SUCCESS(rte_eth_bond_slave_add(test_params.bond_port_id, + TEST_ASSERT_SUCCESS(rte_eth_bond_member_add(test_params.bond_port_id, port->port_id), "Cannot attach slave %d to the bonding", port->port_id); port->is_slave = 1; @@ -289,7 +289,7 @@ slave_remove_and_add(void) struct slave_conf *port = &(test_params.slave_ports[0]); /* 1. Remove first slave from bonding */ - TEST_ASSERT_SUCCESS(rte_eth_bond_slave_remove(test_params.bond_port_id, + TEST_ASSERT_SUCCESS(rte_eth_bond_member_remove(test_params.bond_port_id, port->port_id), "Cannot remove slave #d from bonding"); /* 2. Change removed (ex-)slave and bonding configuration to different @@ -305,7 +305,7 @@ slave_remove_and_add(void) "Removed slave didn't should be synchronized with bonding port"); /* 3. Add (ex-)slave and check if configuration changed*/ - TEST_ASSERT_SUCCESS(rte_eth_bond_slave_add(test_params.bond_port_id, + TEST_ASSERT_SUCCESS(rte_eth_bond_member_add(test_params.bond_port_id, port->port_id), "Cannot add slave"); bond_reta_fetch(); diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst index 5b16b66267..2f504e4c78 100644 --- a/doc/guides/rel_notes/deprecation.rst +++ b/doc/guides/rel_notes/deprecation.rst @@ -168,3 +168,15 @@ Deprecation Notices The data structure ``struct rte_eth_bond_8023ad_slave_info`` will be deprecated in DPDK 23.07, and removed in DPDK 23.11. The relevant code can be updated using ``struct rte_eth_bond_8023ad_member_info``. + The following functions will be deprecated in DPDK 23.07, and removed in + DPDK 23.11. The old functions: + ``rte_eth_bond_8023ad_slave_info``, + ``rte_eth_bond_active_slaves_get``, + ``rte_eth_bond_slave_add``, + ``rte_eth_bond_slave_remove``, and + ``rte_eth_bond_slaves_get`` will be replaced by: + ``rte_eth_bond_8023ad_member_info``, + ``rte_eth_bond_active_members_get``, + ``rte_eth_bond_member_add``, + ``rte_eth_bond_member_remove``, + and ``rte_eth_bond_members_get``. diff --git a/drivers/net/bonding/bonding_testpmd.c b/drivers/net/bonding/bonding_testpmd.c index b3c12cada0..6049d5c865 100644 --- a/drivers/net/bonding/bonding_testpmd.c +++ b/drivers/net/bonding/bonding_testpmd.c @@ -347,7 +347,7 @@ static void cmd_add_bonding_slave_parsed(void *parsed_result, portid_t slave_port_id = res->slave_id; /* add the slave for a bonded device. */ - if (rte_eth_bond_slave_add(master_port_id, slave_port_id) != 0) { + if (rte_eth_bond_member_add(master_port_id, slave_port_id) != 0) { fprintf(stderr, "\t Failed to add slave %d to master port = %d.\n", slave_port_id, master_port_id); @@ -406,7 +406,7 @@ static void cmd_remove_bonding_slave_parsed(void *parsed_result, portid_t slave_port_id = res->slave_id; /* remove the slave from a bonded device. */ - if (rte_eth_bond_slave_remove(master_port_id, slave_port_id) != 0) { + if (rte_eth_bond_member_remove(master_port_id, slave_port_id) != 0) { fprintf(stderr, "\t Failed to remove slave %d from master port = %d.\n", slave_port_id, master_port_id); diff --git a/drivers/net/bonding/rte_eth_bond.h b/drivers/net/bonding/rte_eth_bond.h index 874aa91a5f..6783c5b342 100644 --- a/drivers/net/bonding/rte_eth_bond.h +++ b/drivers/net/bonding/rte_eth_bond.h @@ -121,8 +121,16 @@ rte_eth_bond_free(const char *name); * @return * 0 on success, negative value otherwise */ +__rte_experimental int -rte_eth_bond_slave_add(uint16_t bonded_port_id, uint16_t slave_port_id); +rte_eth_bond_member_add(uint16_t bonded_port_id, uint16_t member_port_id); + +__rte_deprecated +static inline int +rte_eth_bond_slave_add(uint16_t bonded_port_id, uint16_t slave_port_id) +{ + return rte_eth_bond_member_add(bonded_port_id, slave_port_id); +} /** * Remove a slave rte_eth_dev device from the bonded device @@ -133,8 +141,16 @@ rte_eth_bond_slave_add(uint16_t bonded_port_id, uint16_t slave_port_id); * @return * 0 on success, negative value otherwise */ +__rte_experimental int -rte_eth_bond_slave_remove(uint16_t bonded_port_id, uint16_t slave_port_id); +rte_eth_bond_member_remove(uint16_t bonded_port_id, uint16_t member_port_id); + +__rte_deprecated +static inline int +rte_eth_bond_slave_remove(uint16_t bonded_port_id, uint16_t slave_port_id) +{ + return rte_eth_bond_member_remove(bonded_port_id, slave_port_id); +} /** * Set link bonding mode of bonded device @@ -193,9 +209,18 @@ rte_eth_bond_primary_get(uint16_t bonded_port_id); * Number of slaves associated with bonded device on success, * negative value otherwise */ +__rte_experimental int +rte_eth_bond_members_get(uint16_t bonded_port_id, uint16_t members[], + uint16_t len); + +__rte_deprecated +static inline int rte_eth_bond_slaves_get(uint16_t bonded_port_id, uint16_t slaves[], - uint16_t len); + uint16_t len) +{ + return rte_eth_bond_members_get(bonded_port_id, slaves, len); +} /** * Populate an array with list of the active slaves port id's of the bonded @@ -209,9 +234,18 @@ rte_eth_bond_slaves_get(uint16_t bonded_port_id, uint16_t slaves[], * Number of active slaves associated with bonded device on success, * negative value otherwise */ +__rte_experimental int +rte_eth_bond_active_members_get(uint16_t bonded_port_id, uint16_t members[], + uint16_t len); + +__rte_deprecated +static inline int rte_eth_bond_active_slaves_get(uint16_t bonded_port_id, uint16_t slaves[], - uint16_t len); + uint16_t len) +{ + return rte_eth_bond_active_members_get(bonded_port_id, slaves, len); +} /** * Set explicit MAC address to use on bonded device and it's slaves. diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bonding/rte_eth_bond_8023ad.c index 49f22ffab1..50618d9a9a 100644 --- a/drivers/net/bonding/rte_eth_bond_8023ad.c +++ b/drivers/net/bonding/rte_eth_bond_8023ad.c @@ -1517,7 +1517,7 @@ rte_eth_bond_8023ad_setup(uint16_t port_id, int -rte_eth_bond_8023ad_slave_info(uint16_t port_id, uint16_t slave_id, +rte_eth_bond_8023ad_member_info(uint16_t port_id, uint16_t slave_id, struct rte_eth_bond_8023ad_member_info *info) { struct rte_eth_dev *bond_dev; diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.h b/drivers/net/bonding/rte_eth_bond_8023ad.h index ab6d0182a9..54ef2db6c0 100644 --- a/drivers/net/bonding/rte_eth_bond_8023ad.h +++ b/drivers/net/bonding/rte_eth_bond_8023ad.h @@ -193,10 +193,19 @@ rte_eth_bond_8023ad_setup(uint16_t port_id, * -EINVAL if conf is NULL or slave id is invalid (not a slave of given * bonded device or is not inactive). */ +__rte_experimental int -rte_eth_bond_8023ad_slave_info(uint16_t port_id, uint16_t slave_id, +rte_eth_bond_8023ad_member_info(uint16_t port_id, uint16_t member_id, struct rte_eth_bond_8023ad_member_info *conf); +__rte_deprecated +static inline int +rte_eth_bond_8023ad_slave_info(uint16_t port_id, uint16_t slave_id, + struct rte_eth_bond_8023ad_member_info *conf) +{ + return rte_eth_bond_8023ad_member_info(port_id, slave_id, conf); +} + #ifdef __cplusplus } #endif diff --git a/drivers/net/bonding/rte_eth_bond_api.c b/drivers/net/bonding/rte_eth_bond_api.c index 8b6cdce34a..998059cb29 100644 --- a/drivers/net/bonding/rte_eth_bond_api.c +++ b/drivers/net/bonding/rte_eth_bond_api.c @@ -624,7 +624,7 @@ __eth_bond_slave_add_lock_free(uint16_t bonded_port_id, uint16_t slave_port_id) } int -rte_eth_bond_slave_add(uint16_t bonded_port_id, uint16_t slave_port_id) +rte_eth_bond_member_add(uint16_t bonded_port_id, uint16_t slave_port_id) { struct rte_eth_dev *bonded_eth_dev; struct bond_dev_private *internals; @@ -760,7 +760,7 @@ __eth_bond_slave_remove_lock_free(uint16_t bonded_port_id, } int -rte_eth_bond_slave_remove(uint16_t bonded_port_id, uint16_t slave_port_id) +rte_eth_bond_member_remove(uint16_t bonded_port_id, uint16_t slave_port_id) { struct rte_eth_dev *bonded_eth_dev; struct bond_dev_private *internals; @@ -849,7 +849,7 @@ rte_eth_bond_primary_get(uint16_t bonded_port_id) } int -rte_eth_bond_slaves_get(uint16_t bonded_port_id, uint16_t slaves[], +rte_eth_bond_members_get(uint16_t bonded_port_id, uint16_t slaves[], uint16_t len) { struct bond_dev_private *internals; @@ -873,7 +873,7 @@ rte_eth_bond_slaves_get(uint16_t bonded_port_id, uint16_t slaves[], } int -rte_eth_bond_active_slaves_get(uint16_t bonded_port_id, uint16_t slaves[], +rte_eth_bond_active_members_get(uint16_t bonded_port_id, uint16_t slaves[], uint16_t len) { struct bond_dev_private *internals; diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index 0a595d427c..92fba4e6c2 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -2203,7 +2203,7 @@ bond_ethdev_cfg_cleanup(struct rte_eth_dev *dev, bool remove) continue; } - if (rte_eth_bond_slave_remove(bond_port_id, port_id) != 0) { + if (rte_eth_bond_member_remove(bond_port_id, port_id) != 0) { RTE_BOND_LOG(ERR, "Failed to remove port %d from bonded device %s", port_id, dev->device->name); @@ -3528,7 +3528,7 @@ dump_lacp(uint16_t port_id, FILE *f) fprintf(f, " - Lacp info:\n"); - num_active_slaves = rte_eth_bond_active_slaves_get(port_id, slaves, + num_active_slaves = rte_eth_bond_active_members_get(port_id, slaves, RTE_MAX_ETHPORTS); if (num_active_slaves < 0) { fprintf(f, "\tFailed to get active slave list for port %u\n", @@ -3546,7 +3546,7 @@ dump_lacp(uint16_t port_id, FILE *f) dump_lacp_conf(&port_conf, f); for (i = 0; i < num_active_slaves; i++) { - ret = rte_eth_bond_8023ad_slave_info(port_id, slaves[i], + ret = rte_eth_bond_8023ad_member_info(port_id, slaves[i], &slave_info); if (ret) { fprintf(f, "\tGet slave device %u 8023ad info failed\n", @@ -4075,7 +4075,7 @@ bond_ethdev_configure(struct rte_eth_dev *dev) } for (i = 0; i < slave_ports.slave_count; i++) { - if (rte_eth_bond_slave_add(port_id, slave_ports.slaves[i]) != 0) { + if (rte_eth_bond_member_add(port_id, slave_ports.slaves[i]) != 0) { RTE_BOND_LOG(ERR, "Failed to add port %d as slave to bonded device %s", slave_ports.slaves[i], name); diff --git a/drivers/net/bonding/version.map b/drivers/net/bonding/version.map index 9333923b4e..f3f0a776ff 100644 --- a/drivers/net/bonding/version.map +++ b/drivers/net/bonding/version.map @@ -31,3 +31,13 @@ DPDK_23 { local: *; }; + +EXPERIMENTAL { + # added in 23.07 + global: + rte_eth_bond_8023ad_member_info; + rte_eth_bond_active_members_get; + rte_eth_bond_member_add; + rte_eth_bond_member_remove; + rte_eth_bond_members_get; +}; diff --git a/examples/bond/main.c b/examples/bond/main.c index 9b076bb39f..f5514e5361 100644 --- a/examples/bond/main.c +++ b/examples/bond/main.c @@ -253,7 +253,7 @@ bond_port_init(struct rte_mempool *mbuf_pool) "failed (res=%d)\n", BOND_PORT, retval); for (i = 0; i < slaves_count; i++) { - if (rte_eth_bond_slave_add(BOND_PORT, slaves[i]) == -1) + if (rte_eth_bond_member_add(BOND_PORT, slaves[i]) == -1) rte_exit(-1, "Oooops! adding slave (%u) to bond (%u) failed!\n", slaves[i], BOND_PORT); @@ -286,7 +286,7 @@ bond_port_init(struct rte_mempool *mbuf_pool) printf("Waiting for slaves to become active..."); while (wait_counter) { uint16_t act_slaves[16] = {0}; - if (rte_eth_bond_active_slaves_get(BOND_PORT, act_slaves, 16) == + if (rte_eth_bond_active_members_get(BOND_PORT, act_slaves, 16) == slaves_count) { printf("\n"); break; @@ -765,7 +765,7 @@ static void cmd_show_parsed(__rte_unused void *parsed_result, cmdline_printf(cl, "Active_slaves:%d " "packets received:Tot:%d Arp:%d IPv4:%d\n", - rte_eth_bond_active_slaves_get(BOND_PORT, slaves, len), + rte_eth_bond_active_members_get(BOND_PORT, slaves, len), global_flag_stru_p->port_packets[0], global_flag_stru_p->port_packets[1], global_flag_stru_p->port_packets[2]); -- 2.39.1