aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2022-01-12 10:52:14 +0100
committerOle Tr�an <otroan@employees.org>2022-01-12 10:47:03 +0000
commit4429d5e3e161edb99c8db4b2b308dd9b3cb3b939 (patch)
treeba5b5e360f2ba5f3862c19c9184891887e636854
parentde3648db09b2102224eba50fe7019ee388fa26e5 (diff)
dpdk: always display burst function name
Also change the way how we dig function pointer so it works with dpdk 21.11+ Type: improvement Change-Id: I38d5909eea9c2893651710bd45057b1635aa7b37 Signed-off-by: Damjan Marion <damarion@cisco.com>
-rw-r--r--src/plugins/dpdk/device/format.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/src/plugins/dpdk/device/format.c b/src/plugins/dpdk/device/format.c
index 46a1f371312..9b33e9bd733 100644
--- a/src/plugins/dpdk/device/format.c
+++ b/src/plugins/dpdk/device/format.c
@@ -602,12 +602,13 @@ format_dpdk_device (u8 * s, va_list * args)
mode.flags & RTE_ETH_BURST_FLAG_PER_QUEUE ? " (per queue)" :
"");
}
- else
- {
- s =
- format (s, "%Utx burst function: %s\n", format_white_space, indent + 2,
- ptr2sname (rte_eth_devices[xd->port_id].tx_pkt_burst));
- }
+
+#if RTE_VERSION < RTE_VERSION_NUM(21, 11, 0, 0)
+#define rte_eth_fp_ops rte_eth_devices
+#endif
+
+ s = format (s, "%Utx burst function: %s\n", format_white_space, indent + 2,
+ ptr2sname (rte_eth_fp_ops[xd->port_id].tx_pkt_burst));
if (rte_eth_rx_burst_mode_get (xd->port_id, 0, &mode) == 0)
{
@@ -616,12 +617,9 @@ format_dpdk_device (u8 * s, va_list * args)
mode.flags & RTE_ETH_BURST_FLAG_PER_QUEUE ? " (per queue)" :
"");
}
- else
- {
- s =
- format (s, "%Urx burst function: %s\n", format_white_space, indent + 2,
- ptr2sname (rte_eth_devices[xd->port_id].rx_pkt_burst));
- }
+
+ s = format (s, "%Urx burst function: %s\n", format_white_space, indent + 2,
+ ptr2sname (rte_eth_devices[xd->port_id].rx_pkt_burst));
/* $$$ MIB counters */
{