diff options
author | Matias Elo <matias.elo@nokia.com> | 2022-04-26 08:54:52 +0300 |
---|---|---|
committer | Matias Elo <matias.elo@nokia.com> | 2022-04-27 08:45:18 +0300 |
commit | 2f869d2698349bf75ec2404d4ab7d7f3b5b4c88b (patch) | |
tree | a1a4f8467823b2e4943f74e81dd10bbb1c05ef52 | |
parent | ef063cdc879c566802231523d783e01225bd543c (diff) |
linux-dpdk: remove deprecated dpdk code
The supported DPDK versions are currently v19.11 and v20.11.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
-rw-r--r-- | platform/linux-dpdk/odp_crypto.c | 18 | ||||
-rw-r--r-- | platform/linux-dpdk/odp_packet_dpdk.c | 23 | ||||
-rw-r--r-- | platform/linux-dpdk/odp_schedule_eventdev.c | 4 |
3 files changed, 2 insertions, 43 deletions
diff --git a/platform/linux-dpdk/odp_crypto.c b/platform/linux-dpdk/odp_crypto.c index 14682dd8c..da2714077 100644 --- a/platform/linux-dpdk/odp_crypto.c +++ b/platform/linux-dpdk/odp_crypto.c @@ -34,7 +34,6 @@ #include <rte_crypto.h> #include <rte_cryptodev.h> #include <rte_malloc.h> -#include <rte_version.h> #include <string.h> #include <math.h> @@ -334,11 +333,8 @@ int _odp_crypto_init_global(void) } for (cdev_id = 0; cdev_id < rte_cryptodev_count(); cdev_id++) { -#if RTE_VERSION < RTE_VERSION_NUM(18, 5, 0, 0) - sess_sz = rte_cryptodev_get_private_session_size(cdev_id); -#else sess_sz = rte_cryptodev_sym_get_private_session_size(cdev_id); -#endif + if (sess_sz > max_sess_sz) max_sess_sz = sess_sz; } @@ -386,18 +382,12 @@ int _odp_crypto_init_global(void) * cache size, so we multiply by 2. */ pool_size += 2 * odp_thread_count_max() * SESSION_CACHE_SIZE; -#if RTE_VERSION < RTE_VERSION_NUM(19, 2, 0, 0) - mp = rte_mempool_create(mp_name, pool_size, max_sess_sz, - SESSION_CACHE_SIZE, 0, NULL, NULL, NULL, - NULL, socket_id, 0); -#else mp = rte_cryptodev_sym_session_pool_create(mp_name, pool_size, max_sess_sz, SESSION_CACHE_SIZE, 0, socket_id); -#endif if (mp == NULL) { ODP_ERR("Cannot create session pool on socket %d\n", socket_id); @@ -420,17 +410,11 @@ int _odp_crypto_init_global(void) for (queue_pair = 0; queue_pair < nb_queue_pairs; queue_pair++) { -#if RTE_VERSION < RTE_VERSION_NUM(19, 2, 0, 0) - rc = rte_cryptodev_queue_pair_setup(cdev_id, queue_pair, - &qp_conf, socket_id, - mp); -#else qp_conf.mp_session = mp; qp_conf.mp_session_private = mp; rc = rte_cryptodev_queue_pair_setup(cdev_id, queue_pair, &qp_conf, socket_id); -#endif if (rc < 0) { ODP_ERR("Fail to setup queue pair %u on dev %u", queue_pair, cdev_id); diff --git a/platform/linux-dpdk/odp_packet_dpdk.c b/platform/linux-dpdk/odp_packet_dpdk.c index 00ad2621c..a74772740 100644 --- a/platform/linux-dpdk/odp_packet_dpdk.c +++ b/platform/linux-dpdk/odp_packet_dpdk.c @@ -50,15 +50,6 @@ #include <rte_ip_frag.h> #include <rte_udp.h> #include <rte_tcp.h> -#include <rte_version.h> - -#if RTE_VERSION < RTE_VERSION_NUM(19, 8, 0, 0) -#define rte_ether_addr ether_addr -#define rte_ipv4_hdr ipv4_hdr -#define rte_ipv6_hdr ipv6_hdr -#define rte_tcp_hdr tcp_hdr -#define rte_udp_hdr udp_hdr -#endif /* DPDK poll mode drivers requiring minimum RX burst size DPDK_MIN_RX_BURST */ #define IXGBE_DRV_NAME "net_ixgbe" @@ -68,11 +59,7 @@ #define DPDK_MIN_RX_BURST 4 /* Limits for setting link MTU */ -#if RTE_VERSION >= RTE_VERSION_NUM(19, 11, 0, 0) #define DPDK_MTU_MIN (RTE_ETHER_MIN_MTU + _ODP_ETHHDR_LEN) -#else -#define DPDK_MTU_MIN (68 + _ODP_ETHHDR_LEN) -#endif #define DPDK_MTU_MAX (9000 + _ODP_ETHHDR_LEN) /* Number of packet buffers to prefetch in RX */ @@ -617,15 +604,6 @@ static int dpdk_init_capability(pktio_entry_t *pktio_entry, * mode change. Use system call for them. */ static void promisc_mode_check(pkt_dpdk_t *pkt_dpdk) { -#if RTE_VERSION < RTE_VERSION_NUM(19, 11, 0, 0) - /* Enable and disable calls do not have return value */ - rte_eth_promiscuous_enable(pkt_dpdk->port_id); - - if (!rte_eth_promiscuous_get(pkt_dpdk->port_id)) - pkt_dpdk->flags.vdev_sysc_promisc = 1; - - rte_eth_promiscuous_disable(pkt_dpdk->port_id); -#else int ret; ret = rte_eth_promiscuous_enable(pkt_dpdk->port_id); @@ -637,7 +615,6 @@ static void promisc_mode_check(pkt_dpdk_t *pkt_dpdk) if (ret) pkt_dpdk->flags.vdev_sysc_promisc = 1; -#endif } static int setup_pkt_dpdk(odp_pktio_t pktio ODP_UNUSED, diff --git a/platform/linux-dpdk/odp_schedule_eventdev.c b/platform/linux-dpdk/odp_schedule_eventdev.c index eb6c782cf..8e2c2c034 100644 --- a/platform/linux-dpdk/odp_schedule_eventdev.c +++ b/platform/linux-dpdk/odp_schedule_eventdev.c @@ -25,7 +25,6 @@ #include <rte_eventdev.h> #include <rte_event_eth_rx_adapter.h> #include <rte_service.h> -#include <rte_version.h> #include <inttypes.h> #include <string.h> @@ -97,7 +96,6 @@ static int unlink_port(uint8_t dev_id, uint8_t port_id, uint8_t queue_ids[], return ret; } -#if RTE_VERSION >= RTE_VERSION_NUM(18, 11, 0, 0) do { ret = rte_event_port_unlinks_in_progress(dev_id, port_id); if (ret < 0) { @@ -107,7 +105,7 @@ static int unlink_port(uint8_t dev_id, uint8_t port_id, uint8_t queue_ids[], } odp_cpu_pause(); } while (ret > 0); -#endif + if (queue_ids == NULL) _odp_eventdev_gbl->port[port_id].linked = 0; |