summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/plugins/dpdk/CMakeLists.txt16
-rw-r--r--src/plugins/dpdk/device/cli.c4
-rw-r--r--src/plugins/dpdk/device/device.c5
-rw-r--r--src/plugins/dpdk/device/init.c13
-rw-r--r--src/plugins/dpdk/ipsec/ipsec.c17
5 files changed, 33 insertions, 22 deletions
diff --git a/src/plugins/dpdk/CMakeLists.txt b/src/plugins/dpdk/CMakeLists.txt
index a5cfea566a1..badf9af8349 100644
--- a/src/plugins/dpdk/CMakeLists.txt
+++ b/src/plugins/dpdk/CMakeLists.txt
@@ -134,8 +134,8 @@ add_vpp_plugin(dpdk
buffer.c
main.c
thread.c
- api/dpdk_api.c
- api/dpdk_test.c
+# api/dpdk_api.c
+# api/dpdk_test.c
device/cli.c
device/common.c
device/device.c
@@ -143,7 +143,7 @@ add_vpp_plugin(dpdk
device/format.c
device/init.c
device/node.c
- hqos/hqos.c
+# hqos/hqos.c
ipsec/cli.c
ipsec/crypto_node.c
ipsec/esp_decrypt.c
@@ -158,15 +158,15 @@ add_vpp_plugin(dpdk
ipsec/esp_decrypt.c
ipsec/esp_encrypt.c
- API_FILES
- api/dpdk.api
+# API_FILES
+# api/dpdk.api
- API_TEST_SOURCES
- api/dpdk_test.c
+# API_TEST_SOURCES
+# api/dpdk_test.c
INSTALL_HEADERS
device/dpdk.h
- api/dpdk_all_api_h.h
+# api/dpdk_all_api_h.h
ipsec/ipsec.h
LINK_FLAGS
diff --git a/src/plugins/dpdk/device/cli.c b/src/plugins/dpdk/device/cli.c
index 209f4ed51ed..41f3fdef838 100644
--- a/src/plugins/dpdk/device/cli.c
+++ b/src/plugins/dpdk/device/cli.c
@@ -40,6 +40,7 @@
*/
+#if 0
static clib_error_t *
get_hqos (u32 hw_if_index, u32 subport_id, dpdk_device_t ** xd,
dpdk_device_config_t ** devconf)
@@ -92,6 +93,7 @@ get_hqos (u32 hw_if_index, u32 subport_id, dpdk_device_t ** xd,
done:
return error;
}
+#endif
static inline clib_error_t *
pcap_trace_command_internal (vlib_main_t * vm,
@@ -691,6 +693,7 @@ VLIB_CLI_COMMAND (cmd_set_dpdk_if_desc,static) = {
};
/* *INDENT-ON* */
+#if 0
static int
dpdk_device_queue_sort (void *a1, void *a2)
{
@@ -1986,6 +1989,7 @@ VLIB_CLI_COMMAND (cmd_show_dpdk_hqos_queue_stats, static) = {
.function = show_dpdk_hqos_queue_stats,
};
/* *INDENT-ON* */
+#endif
static clib_error_t *
show_dpdk_version_command_fn (vlib_main_t * vm,
diff --git a/src/plugins/dpdk/device/device.c b/src/plugins/dpdk/device/device.c
index e3520fc720e..466abc37e68 100644
--- a/src/plugins/dpdk/device/device.c
+++ b/src/plugins/dpdk/device/device.c
@@ -166,6 +166,7 @@ static_always_inline
queue_id = (queue_id + 1) % xd->tx_q_used;
}
+#if 0
if (PREDICT_FALSE (xd->flags & DPDK_DEVICE_FLAG_HQOS)) /* HQoS ON */
{
/* no wrap, transmit in one burst */
@@ -178,7 +179,9 @@ static_always_inline
n_sent = rte_ring_sp_enqueue_burst (hqos->swq, (void **) mb,
n_left, 0);
}
- else if (PREDICT_TRUE (xd->flags & DPDK_DEVICE_FLAG_PMD))
+ else
+#endif
+ if (PREDICT_TRUE (xd->flags & DPDK_DEVICE_FLAG_PMD))
{
/* no wrap, transmit in one burst */
n_sent = rte_eth_tx_burst (xd->port_id, queue_id, mb, n_left);
diff --git a/src/plugins/dpdk/device/init.c b/src/plugins/dpdk/device/init.c
index fa3b691fca4..a5af97c44d4 100644
--- a/src/plugins/dpdk/device/init.c
+++ b/src/plugins/dpdk/device/init.c
@@ -154,11 +154,7 @@ dpdk_device_lock_init (dpdk_device_t * xd)
static int
dpdk_port_crc_strip_enabled (dpdk_device_t * xd)
{
-#if RTE_VERSION < RTE_VERSION_NUM(18, 11, 0, 0)
- return ! !(xd->port_conf.rxmode.offloads & DEV_RX_OFFLOAD_CRC_STRIP);
-#else
return !(xd->port_conf.rxmode.offloads & DEV_RX_OFFLOAD_KEEP_CRC);
-#endif
}
static clib_error_t *
@@ -421,16 +417,10 @@ dpdk_lib_init (dpdk_main_t * dm)
case VNET_DPDK_PMD_IXGBEVF:
case VNET_DPDK_PMD_I40EVF:
xd->port_type = VNET_DPDK_PORT_TYPE_ETH_VF;
-#if RTE_VERSION < RTE_VERSION_NUM(18, 11, 0, 0)
- xd->port_conf.rxmode.offloads |= DEV_RX_OFFLOAD_CRC_STRIP;
-#endif
break;
case VNET_DPDK_PMD_THUNDERX:
xd->port_type = VNET_DPDK_PORT_TYPE_ETH_VF;
-#if RTE_VERSION < RTE_VERSION_NUM(18, 11, 0, 0)
- xd->port_conf.rxmode.offloads |= DEV_RX_OFFLOAD_CRC_STRIP;
-#endif
if (dm->conf->no_tx_checksum_offload == 0)
{
@@ -460,9 +450,6 @@ dpdk_lib_init (dpdk_main_t * dm)
/* Intel Red Rock Canyon */
case VNET_DPDK_PMD_FM10K:
xd->port_type = VNET_DPDK_PORT_TYPE_ETH_SWITCH;
-#if RTE_VERSION < RTE_VERSION_NUM(18, 11, 0, 0)
- xd->port_conf.rxmode.offloads |= DEV_RX_OFFLOAD_CRC_STRIP;
-#endif
break;
/* virtio */
diff --git a/src/plugins/dpdk/ipsec/ipsec.c b/src/plugins/dpdk/ipsec/ipsec.c
index 520708476a8..698f3b51637 100644
--- a/src/plugins/dpdk/ipsec/ipsec.c
+++ b/src/plugins/dpdk/ipsec/ipsec.c
@@ -419,7 +419,14 @@ static inline void *
get_session_private_data (const struct rte_cryptodev_sym_session *sess,
uint8_t driver_id)
{
+#if RTE_VERSION < RTE_VERSION_NUM(19, 2, 0, 0)
return sess->sess_private_data[driver_id];
+#else
+ if (unlikely (sess->nb_drivers <= driver_id))
+ return 0;
+
+ return sess->sess_data[driver_id].data;
+#endif
}
/* This is from rte_cryptodev_pmd.h */
@@ -427,7 +434,13 @@ static inline void
set_session_private_data (struct rte_cryptodev_sym_session *sess,
uint8_t driver_id, void *private_data)
{
+#if RTE_VERSION < RTE_VERSION_NUM(19, 2, 0, 0)
sess->sess_private_data[driver_id] = private_data;
+#else
+ if (unlikely (sess->nb_drivers <= driver_id))
+ return;
+ sess->sess_data[driver_id].data = private_data;
+#endif
}
static clib_error_t *
@@ -649,7 +662,11 @@ crypto_dev_conf (u8 dev, u16 n_qp, u8 numa)
qp_conf.nb_descriptors = DPDK_CRYPTO_N_QUEUE_DESC;
for (qp = 0; qp < n_qp; qp++)
{
+#if RTE_VERSION < RTE_VERSION_NUM(19, 2, 0, 0)
ret = rte_cryptodev_queue_pair_setup (dev, qp, &qp_conf, numa, NULL);
+#else
+ ret = rte_cryptodev_queue_pair_setup (dev, qp, &qp_conf, numa);
+#endif
if (ret < 0)
return clib_error_return (0, error_str, dev, qp);
}