Skip to content

Commit 2db0203

Browse files
Lukas Sismisvictorjulien
authored andcommitted
dpdk: supress a warning of the bond function
DPDK Bonding API has been changed in DPDK version 23.11 where the old *slave* API was marked as deprecated and the new *member* API was marked as experimental. This was unfortunately executed by marking both API variants at the same time. The deprecated version is removed from the follow up versions while the experimental version will become stable in the next DPDK releases. This is based on a policy in DPDK where an API change needs to merged in main for 1 stable release before removing the experimental flag. In DPDK 24.11 this has been fixed and warning supression is not added. Ticket: 8013 (cherry picked from commit 27383f8)
1 parent e965320 commit 2db0203

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

src/util-dpdk-bonding.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,18 @@ uint16_t BondingMemberDevicesGet(
5555
{
5656
#ifdef HAVE_DPDK_BOND
5757
#if RTE_VERSION >= RTE_VERSION_NUM(23, 11, 0, 0)
58+
59+
#if RTE_VERSION < RTE_VERSION_NUM(24, 11, 0, 0) // DPDK 23.11 - 24.07
60+
#pragma GCC diagnostic push
61+
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
62+
#endif /* RTE_VERSION < RTE_VERSION_NUM(24, 11, 0, 0) */
63+
5864
int32_t len = rte_eth_bond_members_get(bond_pid, bonded_devs, bonded_devs_length);
65+
66+
#if RTE_VERSION < RTE_VERSION_NUM(24, 11, 0, 0)
67+
#pragma GCC diagnostic pop
68+
#endif /* RTE_VERSION < RTE_VERSION_NUM(24, 11, 0, 0) */
69+
5970
#else
6071
int32_t len = rte_eth_bond_slaves_get(bond_pid, bonded_devs, bonded_devs_length);
6172
#endif /* RTE_VERSION >= RTE_VERSION_NUM(23, 11, 0, 0) */

0 commit comments

Comments
 (0)