From 6a4df6eb30de45a4e50f7a4700959c4c7c75b7ad Mon Sep 17 00:00:00 2001 From: Lukas Sismis Date: Wed, 4 Oct 2023 16:57:52 +0200 Subject: [PATCH] dpdk: support new 23.11 DPDK bonding API Ticket: #6381 --- src/util-dpdk-bonding.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/util-dpdk-bonding.c b/src/util-dpdk-bonding.c index 2dda0927a7..59b92ba829 100644 --- a/src/util-dpdk-bonding.c +++ b/src/util-dpdk-bonding.c @@ -54,7 +54,12 @@ uint16_t BondingMemberDevicesGet( uint16_t bond_pid, uint16_t bonded_devs[], uint16_t bonded_devs_length) { #ifdef HAVE_DPDK_BOND +#if RTE_VERSION >= RTE_VERSION_NUM(23, 11, 0, 0) + int32_t len = rte_eth_bond_members_get(bond_pid, bonded_devs, bonded_devs_length); +#else int32_t len = rte_eth_bond_slaves_get(bond_pid, bonded_devs, bonded_devs_length); +#endif /* RTE_VERSION >= RTE_VERSION_NUM(23, 11, 0, 0) */ + if (len == 0) FatalError("%s: no bonded devices found", DPDKGetPortNameByPortID(bond_pid)); else if (len < 0)