From patchwork Fri Jul 14 08:15:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaoyong He X-Patchwork-Id: 129537 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1702242E70; Fri, 14 Jul 2023 10:15:51 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DD9F840A81; Fri, 14 Jul 2023 10:15:50 +0200 (CEST) Received: from NAM04-DM6-obe.outbound.protection.outlook.com (mail-dm6nam04on2130.outbound.protection.outlook.com [40.107.102.130]) by mails.dpdk.org (Postfix) with ESMTP id 01BD840685 for ; Fri, 14 Jul 2023 10:15:50 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SsuPRhHMiTpo/6ZN1FTIPtllnOyro7z3XH9X86tW0iL3bhSTi5TB3b7Vt/rMKUeui67InocI7OIqvjoDbgyp1a1ilDkTVMuxXRJcjq3Z5aiYgWuKKuwGRIJZZGQRf/iLRLBavj1IoXF12DSxz0bJVhT5W0Mqn9cS8jjxhy4KEHLfmtDqWaHnSj3yPki742lB3g2+ICUYP+kAAg3D/PeIowyg+xfcjFGeJCG8g4NVjmRV4F4iXYeoWC2Si+5JXtmnRZy7l7rcBUlmZW4ARazxponIkVKipiFMeuDHMNmngxBIJnwgRlb5ZNYKKqWExRLBlKCi7jG7qHoRwjDYEQExdw== 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=OJoToczH9AjFHfervemfKwcYtjQ+Ng0LOXVEXiTa6tI=; b=SC+iQJYeTvIvssSFXJNCb3+mc0lpDkW8XtMuudvCGm/zAxPb9zknMc28gKe7EZs15nwb1ehf0VG7A6MST8HCJvz35u2/C67geeLkJUFFV3Ilyow8sGFeJtc0r4YWqzY/8OdEWGYLDH8De0fpTV3i4dPi8lvxao27ozahLrqzMozk8YU+oWQDQrcHEgK/M4hXgds/aukFB4Y29p9S6s2T/f+lXf2bO9B6t0wJS4I5B8YGIrzMGi1e1ejUW4UUvf5gw0h2dyFglE+MSDhCsdwbf5l73nvnYqMgBE0d095mNt8xOUEwv5r+vAo5vPSNKNBQtPZQrapSYJMju4Y5cRaZSg== 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=OJoToczH9AjFHfervemfKwcYtjQ+Ng0LOXVEXiTa6tI=; b=gdSfShn90pjdE02Ew3nuvEQuvdOsbpfYCJli1gWVYmVsjzER4Rmmt2dyTKNzCaB2ZmKq8CnYHel65dfyBQR2JZB+jZBzb7ffb6dntZFDoEn4Z2HNeClnJSlHBhoxwM76QLwytXn0BuCmZFn4Ezdyp7jarLf4rkbYiEitY2u/HS0= 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:47 +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:47 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, niklas.soderlund@corigine.com, Long Wu , Chaoyong He Subject: [PATCH 1/3] doc: announce bonding macro change Date: Fri, 14 Jul 2023 16:15:24 +0800 Message-Id: <20230714081526.1277786-2-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> 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: 39d2146d-d583-472c-687d-08db844286f4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: axO7tqHqhEAKoZ9h8U+LTGCAJODLJp8anaSS+BUeqFpa3hTzVUH3kIjK6RBDbtq2JnrzGOkrLYaGpizGH2mT97mDa+HTN8FqLE4i/j9UKwGFA9NJR2WSfrryvwyfnHUNaOJeHwhetJoU0s/rHJFuAXhHN0C2yWh1Mv1pMoJopc7xiBQC5MwjmdIiTHMaI1WJI7r7enEnZZTgEBLkZl0APqmwVM7i7XEw3x2QJnWChU1vYahf040F9+w0LF6AWIZgbnGYf4HcBS2PivYyIYahgNxEMkkkLBLeSoE/zWBTjJVrph4ZE3ThGLx7ilP86NOp/nkMkmYyx2IvBgUWC0T2W+K0+qvPbsQy77W0W4swfhTtU/N+n4fEKWZNtLDrnzyiWMR2nEmTUkhvaPMnbRnKC63mPK7C/JYXixiDSxjGy3+SoJ147oT0FtF29RRCiKW/XDZXR1QlK0yIP2PupVPKiLUOMU6rxNx42KH85js50ClVK9z5/BbD5yMN5j2cLy7YEA4qSz1nBEeITpkwFQkjiOMyHjmyjwn04Rw+gu2rCK7fWGV8he2dg9WFYTIxmwbaeTcc9Otz3ksy9kXNLXoPbkYSNeVnLFDQcvCmFlv7SEwL78GuykcXdbVYgtXo43IH2AcOi8US4/rTZ9Pr2oEGsZokCtqK7DMYt66nmp2lFYY= 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)(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: 7pZ+EXDt/nxJvHCG51xG5KJoZHgDWpB7417KD3XxKes0u8Wnv+fWIRqs19mCHoJNJ7So0PWK9sY3qzjdK1j8Bd9cwl5Bp7TuJbyZuQWnSS7nJpUyHrWAdX+DEna1g5BRzP/vA5aprtFdIE/el8vjLbanKaWOxncqXysV2SxK+YiFtb723W+GEs7TuQfS6Ai4xoqiwYOWA5/fJX3G+I5gbJshSgsEPWnsaRFkCaf0kzoyl2yBO55Ln+fP/2SX2I1sTRsJmekkyP1P6m/Do1fywFQ2jKXoskYTV/YFl0Vdu2nga4NraEI2J+/kCvqKZD+jxx41NCKckrcird67K6hUdgfJ9RI3E8FsTumn1iTmYma6kygZdvtdTwzA2DV8hyZ648uepyJRosj9drIf1NtbdRYj0Xio2ktVkBZgeWNt7I+t5BjNj5hxylGxM58buiJgjxL3uTBIbp8eXR67is586m3ir+V+hre2Uh2VWl0ljIsXC/XpNNfUXBFU1xrzUNCzLPam82CpbLX7APkK4BquF/SpF2mF1Dp8ZEe7cLBLYkMIzOImX5MPl5lckNvA0RUrQDHvLQSfnu5guKbe0KC5jZnxlTtZDe55cGHgSOKbJHmD7+Er/2pjIE8L8qLpYAbu8JzFz2/eCd/ur0jE3gNcLsHm1mgwC5aY7qw9N0QoWSsfUCJfe+XbOtNVW/ag4dGdKfkDEB5sN+QcL96+9x14nLpfvh3O5wYiysfkkNJoO2I8te4htWo7vhGQEMXoLURconsnLQUoKghGizaKMJpOC6i0f+IT79YZqyh7A6oXRJUwS24CscIXfWPFUezXSX1awbfcb9aSmTaPso62MViFod++atPr2jxVG99NYSTjU8lTirgdU/G/56XVukLZ+/0PdxMNY4BNgDNh9J+jY+5BXUUz5BuRNzOEMYAmsOkPj9rUkQ4ntB/ghYOv4UMAm6faH5yp59eiq5H3DDR3C3tn40uyirQ7WCLh9XiYe5v4CmGzvi34RJRIo6u+3dnnGwfV06y2UZ6NaYVYwahMDrpbQ1xfyrUDnLyOFHM2dm4DdNjA3STkQNX5VH5OEIo4VFy/l629OQAZQ1CGcBkJ4FCTbeod15N1YeED44sMpP6dFga4Khr+So12NId23NovMgWh39UmvHzUYBlbxD/bZEegmqhghGMQRh0K1fMbr2LNrYBj3pIKhZTiM6Iej/oC1MX0Lh0X+SV3SdgBq2d5js6+dCqOpLS2+2HWEK0ramAaAY9eVJAy0cQbfH47n5FEVTVOD6UoCq5s2YK71WgZrxb0/xzOWWsbI5ojZT4SOboODL7ngzCoubFXJ/PsfnRRobJxyL9UoOCgU9yGloqtZCkyoo4ubimhsc7LYsG5DgBbi7rCigSY5wewlj4YhqaAylCIbsp9dggArLE15GPbUPv6gITtFA4sDsReEk2MDu/+TXmRG3LT1QQ2OQnrqZB/hN3ZQj5zYNRpbRi03Yel6wZxevhxRL73mlvhRiGJiP3jvbLBtbnUk51rrIfrsMNT9pYkc++jMKE2KiE4lnynAjlQCY15beuFC8E82dct1e9U9ky3XjkncCyr+Y7IO13nGw36YPDGLz4rl3NUILtcstZ2ww== X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 39d2146d-d583-472c-687d-08db844286f4 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:47.3489 (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: lgKel24q+RyPGFV6AoM8g/FegdF9Zw/3dszv5zpi4GkuO2QAoI9IhXRO3xj0FVgrrSwWZZvcCpUOu8ectx7BgOlTtDGOoVMd36ONM2dr6OI= 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 From: Long Wu In order to support inclusive naming, some of the macro in DPDK will need to be renamed. Do this through deprecation process now for 23.07. Signed-off-by: Long Wu Reviewed-by: Chaoyong He Acked-by: Ferruh Yigit --- app/test-pmd/testpmd.c | 2 +- doc/guides/rel_notes/deprecation.rst | 4 ++++ drivers/net/bonding/rte_eth_bond_api.c | 6 +++--- lib/ethdev/rte_ethdev.h | 5 +++-- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index c6ad9b18bf..938ca035d4 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -4248,7 +4248,7 @@ uint8_t port_is_bonding_slave(portid_t slave_pid) slave_pid); return 0; } - if ((*dev_info.dev_flags & RTE_ETH_DEV_BONDED_SLAVE) || (port->slave_flag == 1)) + if ((*dev_info.dev_flags & RTE_ETH_DEV_BONDING_MEMBER) || (port->slave_flag == 1)) return 1; return 0; } diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst index fb771a0305..c9477dd0da 100644 --- a/doc/guides/rel_notes/deprecation.rst +++ b/doc/guides/rel_notes/deprecation.rst @@ -161,3 +161,7 @@ Deprecation Notices The new port library API (functions rte_swx_port_*) will gradually transition from experimental to stable status starting with DPDK 23.07 release. + +* bonding: The macro ``RTE_ETH_DEV_BONDED_SLAVE`` will be deprecated in + DPDK 23.07, and removed in DPDK 23.11. The relevant code can be updated using + ``RTE_ETH_DEV_BONDING_MEMBER``. diff --git a/drivers/net/bonding/rte_eth_bond_api.c b/drivers/net/bonding/rte_eth_bond_api.c index 85d0528b7c..8b6cdce34a 100644 --- a/drivers/net/bonding/rte_eth_bond_api.c +++ b/drivers/net/bonding/rte_eth_bond_api.c @@ -472,7 +472,7 @@ __eth_bond_slave_add_lock_free(uint16_t bonded_port_id, uint16_t slave_port_id) return -1; slave_eth_dev = &rte_eth_devices[slave_port_id]; - if (slave_eth_dev->data->dev_flags & RTE_ETH_DEV_BONDED_SLAVE) { + if (slave_eth_dev->data->dev_flags & RTE_ETH_DEV_BONDING_MEMBER) { RTE_BOND_LOG(ERR, "Slave device is already a slave of a bonded device"); return -1; } @@ -615,7 +615,7 @@ __eth_bond_slave_add_lock_free(uint16_t bonded_port_id, uint16_t slave_port_id) } /* Add slave details to bonded device */ - slave_eth_dev->data->dev_flags |= RTE_ETH_DEV_BONDED_SLAVE; + slave_eth_dev->data->dev_flags |= RTE_ETH_DEV_BONDING_MEMBER; slave_vlan_filter_set(bonded_port_id, slave_port_id); @@ -724,7 +724,7 @@ __eth_bond_slave_remove_lock_free(uint16_t bonded_port_id, slave_eth_dev = &rte_eth_devices[slave_port_id]; slave_remove(internals, slave_eth_dev); - slave_eth_dev->data->dev_flags &= (~RTE_ETH_DEV_BONDED_SLAVE); + slave_eth_dev->data->dev_flags &= (~RTE_ETH_DEV_BONDING_MEMBER); /* first slave in the active list will be the primary by default, * otherwise use first device in list */ diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h index 3d44979b44..04a2564f22 100644 --- a/lib/ethdev/rte_ethdev.h +++ b/lib/ethdev/rte_ethdev.h @@ -2036,8 +2036,9 @@ struct rte_eth_dev_owner { #define RTE_ETH_DEV_FLOW_OPS_THREAD_SAFE RTE_BIT32(0) /** Device supports link state interrupt */ #define RTE_ETH_DEV_INTR_LSC RTE_BIT32(1) -/** Device is a bonded slave */ -#define RTE_ETH_DEV_BONDED_SLAVE RTE_BIT32(2) +/** Device is a bonding member */ +#define RTE_ETH_DEV_BONDING_MEMBER RTE_BIT32(2) +#define RTE_ETH_DEV_BONDED_SLAVE RTE_DEPRECATED(RTE_ETH_DEV_BONDED_SLAVE) RTE_ETH_DEV_BONDING_MEMBER /** Device supports device removal interrupt */ #define RTE_ETH_DEV_INTR_RMV RTE_BIT32(3) /** Device is port representor */ From patchwork Fri Jul 14 08:15:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaoyong He X-Patchwork-Id: 129539 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0388E42E70; Fri, 14 Jul 2023 10:16:03 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 26A5542BAC; Fri, 14 Jul 2023 10:15:53 +0200 (CEST) Received: from NAM04-DM6-obe.outbound.protection.outlook.com (mail-dm6nam04on2130.outbound.protection.outlook.com [40.107.102.130]) by mails.dpdk.org (Postfix) with ESMTP id 9011140685 for ; Fri, 14 Jul 2023 10:15:50 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AcjGdQ7Z9r8P30Vxmkb0bS3cyxztw/VrecEJO5/9SFWn0h43qW1PLzh27/uO6/R3JlrXFYZOcwC+aByiKTrbBsh1cl6j4iMXZporQm3YgextpNA3BqYzPLxnji9p405Ctexh/qFQbyYFyEumsaZlqGjmPe0TKwIdkirEfIkI6iNMt874mCsqvYL+wJxLK1prasMdt/ZYr0GKPsRBpzDONTHBhNu58qSV+cdp2fibyBrwxqd198Dv221N5+DmpiljzpebOZTrl5uVqsOFjr1p/XSWVWcRBrIl4gTZPVsG+Qlo1+OWCha704OmkUYpfrPbPqkaSsVmpyAXxVOoe6GwPQ== 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=lDJneSsTzIFQq/tcbVY+IV5W2eGYGbPTLEcOET9aYR0=; b=Ra6GZAJRRA9/J6D61gSR6u5u93Q2LLphC0Cjd3ROH3eckVPAvl9QTRjE04RjWntjA80U4PbNyXfRPSrgIlfvTXIUw4Tb5hton57cqCXFU6nv/hqmdRzVi72UU9TB0dFUfqrU4I+Jj1Yb/GbiA7sL6uM3shhWitUrtf1vgVXKfZRJhMIi9ixUE2GP4OgTE6qfpDX1U+7Ggj7ku7T8SpDwsnXRCxKtF4CfUWJ1EdMnylDmAvnYZAyWcTz8dQCKs68cd9hH3LWKboJYoUenZFUv9SNQKH7qmgUFwe729MidyeJblp5PSVDqon+UzknOB73XHht9KP6Mayd3klgOFn+uZg== 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=lDJneSsTzIFQq/tcbVY+IV5W2eGYGbPTLEcOET9aYR0=; b=sc5HQjYFW4WWLMalU3JMEy65vKpAOVngJByJzyQG7kaI5R/Yh4WgSa0NNnDeUNvbJEp7ir1PSgwLxNEQvN4RMAJo99L7W3z2Dhgjh3vQZ/nySfbZ5s9r0qVas9dCBbvkKGws2xB5kFWiIqqy9prA0yJJCEf+6D8sxYDSB0GJlns= 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:49 +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:49 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, niklas.soderlund@corigine.com, Chaoyong He Subject: [PATCH 2/3] doc: announce bonding data change Date: Fri, 14 Jul 2023 16:15:25 +0800 Message-Id: <20230714081526.1277786-3-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> 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: 5d79b43f-b235-48ff-004f-08db844287fd X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 5OvocYMI/AvdARuQCtq2vdOMvfaJP4mGuL21btjY3AM+Q9v7WA81re80uFKDW0uJ6FWzTs901YOJcF1dM+FtGFL4hmVvj8TAOP77yILw5RsNMv0kW0Ad8eOF7+5CO1AAuGtue8TwwhF7+ebil4xHJ3qllDJL1DsREdrEFPUgUQXbHNZkypot5f0gpwgn0+T3Q3KcG3IqW12+mLUBMWeXQm6fMX62DAY7BT3TvLcrrkDRNlMkbUgLhWoIMb7+pt4Xi49IMwxIKR6loUywMzrCP8wlP7JN9o0bVm/VZyB0ZEvsWZp9evvY+U2DQhLrp6HT1cEszI2CV+d6bLZTIrxrLfCok6R4b8UdYqGfb72HZGqWwb0XwJxAj0YvAesHwMGxwZg8RLh7lMA4KXlIgNtnRjv36vtRkHtJrQTP5M+6ku2r6r4TVgizG30pzkxs+7wJZbFqZgVl4DKlnDdfPcph+rh6DFvzCeOSmSNiTqfQci/t4Oy608FNTJ63VRaqZtzqBrXR/TD+lMTSONfM6BqwOuAWI7dR4LXAlG+gUjmuoLrcaiLTTHAf4GxVRU7QukXY/j3TBzFIekJ4goQaKpHjzG4ZVfL1Ctn+WitxOfhYMjckTEsr0fK2L2xI054Uz0oy73vykgRQZXNJBPGMaviG2vJytD6YX3fpF1spHUHygMI= 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)(44832011)(36756003)(478600001)(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: mVsywh0U+7Vo6qIqp3extSEHxhQKegjrra05U54ziF0vjkm+9yReamCBfAduRGLWlmkZ3DNGsbO5SrGHOLED2ipnjkUv6kJhxfJR+cLRmzOQAkyhXAGjgGARAXH1xAx7rwpuPj/qgRLr1obMAEKIzl1baEHqEXRGmwrBlYFErwO38uh2JyF/q2suj+uo5lIa/zEuEMjZmwlr4WyWqiNppRwyOae4Z1NiOOqj5pDONxTSEiGyh+kxpxgE151oi4WuIYAHaxQoNSb1A1Ar3ggDsIFJ9KILp7Cjs5YCjAhUXkQyU7/ejXqy2w+Sr2O3yNA+JknYemI7rA2gpkC9n/dCckXIH12NmIFFv39EhmeRF54mdhaxYKvW2lj7E/OtsvGPtign9pdh2My1FwvTuQerIilo55hZ1adeEN6vnM92H9hhBz9xbR9kKUWEH2BixL4zf/W0+tKNIB3x+dObCuhFj2KKDG0hs5MP8f6TyHaRKNLHe5BhyNK6IgR4GIr3CPgJbk605Rl8GqWPvlsascml70Vgkcvz40u2+XPY1E3/Ph/NsQ8ZNkmf4gfqMBy2L1AXZ89W/SdnMd1v4Awi0i0oLAzAgFan/k9KSX2cVpBR2xZ4dbtoFE14oP7W2v9OB1dDX7c8uAeFioMwJpDfwMpRqcNQhbMv6LdGiig8HSFDU8l3DMgZhGdjrPuSxpAUzPoQVXdoXFhmkMdbp4stKJylDkSvNsDdr1T1KRu7TZteFd5y+rq+DDnJABUS80cVEaAv9sqKX/BseNs5XVEZJj2NQSIDGOAQX4tF90o8CIcMUbkaraWJnul6AzJO8qf1Sul9siUvt0TixdBhDqABK18O1Lz/4lM9qDMY2/OQT4ufrotNRblexGXX2BaHOZQuRQ2wU8aTMItHlPse44ePYBkFHtNXgRujMwq6XDZI9w2En1y5F9I7nB71yBFe/dkHALZuqOzv9MmZL05KpRGsxF/0kQQXdP/UqINpfI4TwXJftgK38ytRARC2PKPlRXIUxhqKuEwkzJcRV4jxRH6i6wvqfCNkJnd7AOuijNvevny1pfAgQR3IZV2Ha/u1yWd4tMqOlv2Ddpv8qACm2vtJq8qE0SlZJy6Jyw+18wdfaf1N0SpJQeq28fqNFILGa4y5sUahN1MTnt+edX0RIHB6Ppu+V2DPAbOff2TzMCzxrRg/z36ZgX/1eDnCovfEbLI4t+M8+ArAKNL6E8TH3Pxzm1EXVBhRHtrwMR8SBYBoUBY/B1Tf0U+wMVtTIE71dRIdgjAJUIn105jv8SrMpf9FCdAeIKJCRuOy5lf/SQjW8obd6UmWFVlZ35mr6CBv+CSvBWNCV0Q2DSLTAb84ZhfaAfOxE1fhBG5KWIR4iEk7OkbLBKsu4gmpAH+2kvge8u1MXzgtEMQVpoPtWhS/TXbPK59yxL0dYlZbcl9X6OnkzUm0UozA5kmOEc3j4BwKRaPUTMDErAxNavZvtppAWnWxdPl7gXG8dgGX5PwKctkhp/NTcn4ogjj4/fk/DgvGeN46NxO41Uz4/Ob6JEswQxrnF4gJvLrMoCiZ8Tb5Id41lJpfR9esjsoYfFvdxiFmMurOp1gV/f6HInyz4pbL9aKJF7xn7g== X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5d79b43f-b235-48ff-004f-08db844287fd 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:49.0215 (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: 4kKyU44NivC7J5NfC133VKYFljmTlTDSX5RSHAgVsFGP1sd6KPvOZ/tGHBR79YKsq5vgQbh4+v+x6oCIFjEdU7/btCb3dOQzqtcqmXPq6PU= 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, the data structure of bonding 8023 info need to be renamed. Do this through deprecation process now for 23.07. Signed-off-by: Chaoyong He --- doc/guides/rel_notes/deprecation.rst | 3 +++ drivers/net/bonding/rte_eth_bond_8023ad.c | 2 +- drivers/net/bonding/rte_eth_bond_8023ad.h | 4 ++-- drivers/net/bonding/rte_eth_bond_pmd.c | 4 ++-- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst index c9477dd0da..5b16b66267 100644 --- a/doc/guides/rel_notes/deprecation.rst +++ b/doc/guides/rel_notes/deprecation.rst @@ -165,3 +165,6 @@ Deprecation Notices * bonding: The macro ``RTE_ETH_DEV_BONDED_SLAVE`` will be deprecated in DPDK 23.07, and removed in DPDK 23.11. The relevant code can be updated using ``RTE_ETH_DEV_BONDING_MEMBER``. + 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``. diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bonding/rte_eth_bond_8023ad.c index 4a266bb2ca..49f22ffab1 100644 --- a/drivers/net/bonding/rte_eth_bond_8023ad.c +++ b/drivers/net/bonding/rte_eth_bond_8023ad.c @@ -1518,7 +1518,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, - struct rte_eth_bond_8023ad_slave_info *info) + struct rte_eth_bond_8023ad_member_info *info) { struct rte_eth_dev *bond_dev; struct bond_dev_private *internals; diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.h b/drivers/net/bonding/rte_eth_bond_8023ad.h index 7ad8d6d00b..ab6d0182a9 100644 --- a/drivers/net/bonding/rte_eth_bond_8023ad.h +++ b/drivers/net/bonding/rte_eth_bond_8023ad.h @@ -141,7 +141,7 @@ struct rte_eth_bond_8023ad_conf { enum rte_bond_8023ad_agg_selection agg_selection; }; -struct rte_eth_bond_8023ad_slave_info { +struct rte_eth_bond_8023ad_member_info { enum rte_bond_8023ad_selection selected; uint8_t actor_state; struct port_params actor; @@ -195,7 +195,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, - struct rte_eth_bond_8023ad_slave_info *conf); + struct rte_eth_bond_8023ad_member_info *conf); #ifdef __cplusplus } diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index 73205f78f4..0a595d427c 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -3471,7 +3471,7 @@ dump_lacp_port_param(const struct port_params *params, FILE *f) } static void -dump_lacp_slave(const struct rte_eth_bond_8023ad_slave_info *info, FILE *f) +dump_lacp_slave(const struct rte_eth_bond_8023ad_member_info *info, FILE *f) { char a_state[256] = { 0 }; char p_state[256] = { 0 }; @@ -3520,7 +3520,7 @@ dump_lacp_slave(const struct rte_eth_bond_8023ad_slave_info *info, FILE *f) static void dump_lacp(uint16_t port_id, FILE *f) { - struct rte_eth_bond_8023ad_slave_info slave_info; + struct rte_eth_bond_8023ad_member_info slave_info; struct rte_eth_bond_8023ad_conf port_conf; uint16_t slaves[RTE_MAX_ETHPORTS]; int num_active_slaves; From patchwork Fri Jul 14 08:15:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaoyong He X-Patchwork-Id: 129540 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org 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> 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: m5PHeqFOi4I3gCW7CMtQb4x221ddwpEwy+fTTxoQCRcPxdBkkZqw0xB/2xQIPXJS4O2XjsaG+oYfCeoM8mC5oaHeIFumYtp2nSYGR2eLpivM9C0jO0CKecheO2/3Kl+3dakPj+kFKkgnEgh0tZLw+6GatBpzJb3hHDJvBs3ZFrXKjXCrTZD4MuJMnk7fjJSHjP2SSBUkN6Jc9WEH9BGPsvVYy7dj2C4z3A6rj+JLFhmpnyIzFiNVwMKrFmAADoKiFzo24rnqyZvsvMvgzh1o+san1CfWtuEetT6/YDCCSXeJToJMQUxxaE/bg5zqLDx60vfs5TcbCg9SDxnNQikyBDq1E6xv4WaV8XWs7rCHspZhkSZeDU4NW+ZqGEfSnM7+PNoIrsLBCogANkSlX0SWi//7HXk+xlg5o9TcCA/aObfHH94ELII0c7Ceyf/3uDH/weugMK05NjbBVMplDRxyAOhTO1ejjqb70NorhRehdDkrh1bGM9vbJoaISfn5ou0V9eGedV26NFqD8D/4GS0PX1AgLD2qFEXPMFHifg9jj1cKCCH+q7d4WJPMIw4jPZa0cHIYPDkB7qjaD6PKmL7Wel3BDV5wMTfhpIiKBzI824yw710r42g+HHySSEphZR20hvqYDFsY+84eS/83clCmlnszmYOzXFayZ3RgHE0Gq4+vJAz5R+9yU5hV7M3+4hkXgpN7TIJXn5jtatfcmT0Tvm1BcCv/kVITdJvKRHk4Y9Jv749w3jsywEO6DQXr0pcfKUuI7806cfmzK5OjDDItvsMTSbVdR/rj7vXpei6lpZBvZrpmV8iVIo/GhzusDmBIr0ZXDJyOSzgHf51tabLPSxEVsp/e9RNZ/bcdj/o6oRHVwHCT5HEvroDbGYrVL+0n/hDCkdVuG7tYg0sbWct0Z4ForVDKHcQ+s7SCUZJU7N+KkYXy3bbRhObyj9FelrKL9u/EWEvgDpWThrXrIoEGGM7hAjbjLy2eoBkah4cmw5De85QBmthgZN03fBJrW5TXVvaKfjQpZcq8UznxVu2XPpqA3teX3LwqBP/EIdTed/Odsgeje63jzCrQdEpAOm9PiVzkfBarDnbDDkOEF7gQIgL2QB4+cRqOqRFl149WoyMyJbjBKn4b3wyauJP60R9ho/miIhJL8enRgq1aYU5tLaGH5h5V6M3Akn+cnaQmr0mXG7WsoHtXnSs+YZgXYId20xhh+wVDyI+fHMxaztmoakMqXpucc72/F1vT2wFE9D3PzbFbDanOeiugZVfX8Uoq2Eu0j4GetX8hYLPD/sHTgY3DxWF7AWxqIRKc7ffQryR9Glh8PwUi6xF8kkmJ3nJvfRAvoI9MleeCZKCVJGwC+SKWKqiis7+KWTAGJX+Z5/8VSLZU3UuAL76fxmXS88MUj0E74ly/uZL1AKGXtYlzrLm0E6uSRfHgO2aeY3ri7x5U9v3EcxKV1QvAQ0yEt0RS3HbYAengpvIuGXyNsJU5FmngnKrdbdOKt/q/Tj0JGA9Kyn/Yvj0dwX/KfHq4WkLBmL3tzI0+GuyulKizpFewt7MLKBepfDpI+dqU/sMv0icy4hnheDiOsL7k+jdwiRojJwqPgl+O8kXmXjN5kMrvjQ== 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]);