summaryrefslogtreecommitdiffstats
path: root/src/plugins/dpdk
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/dpdk')
-rw-r--r--src/plugins/dpdk/device/device.c4
-rw-r--r--src/plugins/dpdk/device/dpdk.h22
-rwxr-xr-xsrc/plugins/dpdk/device/init.c4
-rw-r--r--src/plugins/dpdk/hqos/hqos.c8
4 files changed, 16 insertions, 22 deletions
diff --git a/src/plugins/dpdk/device/device.c b/src/plugins/dpdk/device/device.c
index 465a5874cf2..51d6eacbeb4 100644
--- a/src/plugins/dpdk/device/device.c
+++ b/src/plugins/dpdk/device/device.c
@@ -254,7 +254,11 @@ static_always_inline
&tx_vector[tx_tail], tx_head - tx_tail);
rv = rte_ring_sp_enqueue_burst (hqos->swq,
(void **) &tx_vector[tx_tail],
+#if RTE_VERSION >= RTE_VERSION_NUM(17, 5, 0, 0)
+ (uint16_t) (tx_head - tx_tail), 0);
+#else
(uint16_t) (tx_head - tx_tail));
+#endif
}
else if (PREDICT_TRUE (xd->flags & DPDK_DEVICE_FLAG_PMD))
{
diff --git a/src/plugins/dpdk/device/dpdk.h b/src/plugins/dpdk/device/dpdk.h
index 7e2901bbb30..7e974491efe 100644
--- a/src/plugins/dpdk/device/dpdk.h
+++ b/src/plugins/dpdk/device/dpdk.h
@@ -55,7 +55,6 @@
extern vnet_device_class_t dpdk_device_class;
extern vlib_node_registration_t dpdk_input_node;
-#if RTE_VERSION >= RTE_VERSION_NUM(17, 2, 0, 0)
#define foreach_dpdk_pmd \
_ ("net_thunderx", THUNDERX) \
_ ("net_e1000_em", E1000EM) \
@@ -75,27 +74,6 @@ extern vlib_node_registration_t dpdk_input_node;
_ ("net_mlx4", MLX4) \
_ ("net_mlx5", MLX5) \
_ ("net_dpaa2", DPAA2)
-#else
-#define foreach_dpdk_pmd \
- _ ("net_thunderx", THUNDERX) \
- _ ("net_e1000_em", E1000EM) \
- _ ("net_e1000_igb", IGB) \
- _ ("net_e1000_igb_vf", IGBVF) \
- _ ("net_ixgbe", IXGBE) \
- _ ("net_ixgbe_vf", IXGBEVF) \
- _ ("net_i40e", I40E) \
- _ ("net_i40e_vf", I40EVF) \
- _ ("net_virtio", VIRTIO) \
- _ ("net_enic", ENIC) \
- _ ("net_vmxnet3", VMXNET3) \
- _ ("AF_PACKET PMD", AF_PACKET) \
- _ ("rte_bond_pmd", BOND) \
- _ ("net_fm10k", FM10K) \
- _ ("net_cxgbe", CXGBE) \
- _ ("net_mlx4", MLX4) \
- _ ("net_mlx5", MLX5) \
- _ ("net_dpaa2", DPAA2)
-#endif
typedef enum
{
diff --git a/src/plugins/dpdk/device/init.c b/src/plugins/dpdk/device/init.c
index 69959c05df2..0ee28db54a4 100755
--- a/src/plugins/dpdk/device/init.c
+++ b/src/plugins/dpdk/device/init.c
@@ -1174,7 +1174,11 @@ dpdk_config (vlib_main_t * vm, unformat_input_t * input)
log_level = (CLIB_DEBUG > 0) ? RTE_LOG_DEBUG : RTE_LOG_NOTICE;
+#if RTE_VERSION >= RTE_VERSION_NUM(17, 5, 0, 0)
+ rte_log_set_global_level (log_level);
+#else
rte_set_log_level (log_level);
+#endif
vm = vlib_get_main ();
diff --git a/src/plugins/dpdk/hqos/hqos.c b/src/plugins/dpdk/hqos/hqos.c
index ca1bdafaaa6..2f2504d6e1d 100644
--- a/src/plugins/dpdk/hqos/hqos.c
+++ b/src/plugins/dpdk/hqos/hqos.c
@@ -430,7 +430,11 @@ dpdk_hqos_thread_internal_hqos_dbg_bypass (vlib_main_t * vm)
pkts_enq_len += rte_ring_sc_dequeue_burst (swq,
(void **)
&pkts_enq[pkts_enq_len],
+#if RTE_VERSION >= RTE_VERSION_NUM(17, 5, 0, 0)
+ hqos->hqos_burst_enq, 0);
+#else
hqos->hqos_burst_enq);
+#endif
/* Get next SWQ for this device */
swq_pos++;
@@ -521,7 +525,11 @@ dpdk_hqos_thread_internal (vlib_main_t * vm)
pkts_enq_len += rte_ring_sc_dequeue_burst (swq,
(void **)
&pkts_enq[pkts_enq_len],
+#if RTE_VERSION >= RTE_VERSION_NUM(17, 5, 0, 0)
+ hqos->hqos_burst_enq, 0);
+#else
hqos->hqos_burst_enq);
+#endif
/* Get next SWQ for this device */
swq_pos++;