]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
dpdk: support new 23.11 DPDK bonding API
authorLukas Sismis <lsismis@oisf.net>
Wed, 4 Oct 2023 14:57:52 +0000 (16:57 +0200)
committerVictor Julien <victor@inliniac.net>
Mon, 16 Oct 2023 19:16:37 +0000 (21:16 +0200)
Ticket: #6381

src/util-dpdk-bonding.c

index 2dda0927a7355716fd40702d272158e04fe1e8a2..59b92ba8294acb103323e82ae0d27ae2ac8bec96 100644 (file)
@@ -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)