summaryrefslogtreecommitdiffstats
path: root/VNFs/DPPD-PROX/prox_compat.h
blob: 404ce9edb967e3f3ab1ac5a0f1d3dca406edac85 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49

@media only all and (prefers-color-scheme: dark) {
.highlight .hll { background-color: #49483e }
.highlight .c { color: #75715e } /* Comment */
.highlight .err { color: #960050; background-color: #1e0010 } /* Error */
.highlight .k { color: #66d9ef } /* Keyword */
.highlight .l { color: #ae81ff } /* Literal */
.highlight .n { color: #f8f8f2 } /* Name */
.highlight .o { color: #f92672 } /* Operator */
.highlight .p { color: #f8f8f2 } /* Punctuation */
.highlight .ch { color: #75715e } /* Comment.Hashbang */
.highlight .cm { color: #75715e } /* Comment.Multiline */
.highlight .cp { color: #75715e } /* Comment.Preproc */
.highlight .cpf { color: #75715e } /* Comment.PreprocFile */
.highlight .c1 { color: #75715e } /* Comment.Single */
.highlight .cs { color: #75715e } /* Comment.Special */
.highlight .gd { color: #f92672 } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .gi { color: #a6e22e } /* Generic.Inserted */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #75715e } /* Generic.Subheading */
.highlight .kc { color: #66d9ef } /* Keyword.Constant */
.highlight .kd { color: #66d9ef } /* Keyword.Declaration */
.highlight .kn { color: #f92672 } /* Keyword.Namespace */
.highlight .kp { color: #66d9ef } /* Keyword.Pseudo */
.highlight .kr { color: #66d9ef } /* Keyword.Reserved */
.highlight .kt { color: #66d9ef } /* Keyword.Type */
.highlight .ld { color: #e6db74 } /* Literal.Date */
.highlight .m { color: #ae81ff } /* Literal.Number */
.highlight .s { color: #e6db74 } /* Literal.String */
.highlight .na { color: #a6e22e } /* Name.Attribute */
.highlight .nb { color: #f8f8f2 } /* Name.Builtin */
.highlight .nc { color: #a6e22e } /* Name.Class */
.highlight .no { color: #66d9ef } /* Name.Constant */
.highlight .nd { color: #a6e22e } /* Name.Decorator */
.highlight .ni { color: #f8f8f2 } /* Name.Entity */
.highlight .ne { color: #a6e22e } /* Name.Exception */
.highlight .nf { color: #a6e22e } /* Name.Function */
.highlight .nl { color: #f8f8f2 } /* Name.Label */
.highlight .nn { color: #f8f8f2 } /* Name.Namespace */
.highlight .nx { color: #a6e22e } /* Name.Other */
.highlight .py { color: #f8f8f2 } /* Name.Property */
.highlight .nt { color: #f92672 } /* Name.Tag */
.highlight .nv { color: #f8f8f2 } /* Name.Variable */
.highlight .ow { color: #f92672 } /* Operator.Word */
.highlight .w { color: #f8f8f2 } /* Text.Whitespace */
.highlight .mb { color: #ae81ff } /* Literal.Number.Bin */
.highlight .mf { color: #ae81ff } /* Literal.Number.Float */
.highlight .mh { color: #ae81ff } /* Literal.Number.Hex */
.highlight .mi { color: #ae81ff } /* Literal.Number.Integer */
.highlight .mo { color: #ae81ff } /* Literal.Number.Oct */
.highlight .sa { color: #e6db74 } /* Literal.String.Affix */
.highlight .sb { color: #e6db74 } /* Literal.String.Backtick */
.highlight .sc { color: #e6db74 } /* Literal.String.Char */
.highlight .dl { color: #e6db74 } /* Literal.String.Delimiter */
.highlight .sd { color: #e6db74 } /* Literal.String.Doc */
.highlight .s2 { color: #e6db74 } /* Literal.String.Double */
.highlight .se { color: #ae81ff } /* Literal.String.Escape */
.highlight .sh { color: #e6db74 } /* Literal.String.Heredoc */
.highlight .si { color: #e6db74 } /* Literal.String.Interpol */
.highlight .sx { color: #e6db74 } /* Literal.String.Other */
.highlight .sr { color: #e6db74 } /* Literal.String.Regex */
.highlight .s1 { color: #e6db74 } /* Literal.String.Single */
.highlight .ss { color: #e6db74 } /* Literal.String.Symbol */
.highlight .bp { color: #f8f8f2 } /* Name.Builtin.Pseudo */
.highlight .fm { color: #a6e22e } /* Name.Function.Magic */
.highlight .vc { color: #f8f8f2 } /* Name.Variable.Class */
.highlight .vg { color: #f8f8f2 } /* Name.Variable.Global */
.highlight .vi { color: #f8f8f2 } /* Name.Variable.Instance */
.highlight .vm { color: #f8f8f2 } /* Name.Variable.Magic */
.highlight .il { color: #ae81ff } /* Literal.Number.Integer.Long */
}
@media (prefers-color-scheme: light) {
.highlight .hll { background-color: #ffffcc }
.highlight .c { color: #888888 } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.highlight .k { color: #008800; font-weight: bold } /* Keyword */
.highlight .ch { color: #888888 } /* Comment.Hashbang */
.highlight .cm { color: #888888 } /* Comment.Multiline */
.highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */
.highlight .cpf { color: #888888 } /* Comment.PreprocFile */
.highlight .c1 { color: #888888 } /* Comment.Single */
.highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .gr { color: #aa0000 } /* Generic.Error */
.highlight .gh { color: #333333 } /* Generic.Heading */
.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
.highlight .go { color: #888888 } /* Generic.Output */
.highlight .gp { color: #555555 } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #666666 } /* Generic.Subheading */
.highlight .gt { color: #aa0000 } /* Generic.Traceback */
.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */
.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */
.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */
.highlight .kp { color: #008800 } /* Keyword.Pseudo */
.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */
.highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */
.highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */
.highlight .na { color: #336699 } /* Name.Attribute */
.highlight .nb { color: #003388 } /* Name.Builtin */
.highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */
.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */
.highlight .nd { color: #555555 } /* Name.Decorator */
.highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */
.highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */
.highlight .nl { color: #336699; font-style: italic } /* Name.Label */
.highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */
.highlight .py { color: #336699; font-weight: bold } /* Name.Property */
.highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */
.highlight .nv { color: #336699 } /* Name.Variable */
.highlight .ow { color: #008800 } /* Operator.Word */
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
.highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */
.highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */
.highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */
.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */
.highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */
.highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */
.highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */
.highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */
.highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */
.highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */
.highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */
.highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */
.highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */
.highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */
.highlight .sx { color: #22bb22; background-color: #f0fff0 } 
/*
// Copyright (c) 2010-2020 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
*/
#ifndef _PROX_COMPAT_H_
#define _PROX_COMPAT_H_
#include <rte_common.h>
#include <rte_table_hash.h>
#include <rte_ethdev.h>
#include <rte_hash_crc.h>
#include <rte_cryptodev.h>

#include "hash_utils.h"
#include "log.h"

/* This is a copy of the rte_table_hash_params from DPDK 17.11  *
 * So if DPDK decides to change the structure the modifications *
 * to PROX code should mainly be limited to this file           *
 */
struct prox_rte_table_params {
	const char *name;
	uint32_t key_size;
	uint32_t key_offset;
	uint8_t *key_mask;
	uint32_t n_keys;
	uint32_t n_buckets;
	rte_table_hash_op_hash f_hash;
	uint64_t seed;
};

#if RTE_VERSION < RTE_VERSION_NUM(16,4,0,0)
typedef uint8_t prox_next_hop_index_type;
#else
typedef uint32_t prox_next_hop_index_type;
#endif

#if RTE_VERSION < RTE_VERSION_NUM(16,7,0,0)
static void rte_mempool_free(struct rte_mempool *mp)
{
	plog_warn("rte_mempool_free not supported in this DPDK - upgrade DPDK to avoid memory leaks\n");
}
#endif

#if RTE_VERSION < RTE_VERSION_NUM(17,11,0,0)

static void *prox_rte_table_create(struct prox_rte_table_params *params, int socket_id, uint32_t entry_size)
{
	if (params->key_size == 8) {
		struct rte_table_hash_key8_ext_params dpdk17_08_params;
        	dpdk17_08_params.n_entries = params->n_keys;
        	dpdk17_08_params.n_entries_ext = params->n_keys >> 2;
        	dpdk17_08_params.f_hash = (rte_table_hash_op_hash)rte_hash_crc;
        	dpdk17_08_params.seed = params->seed;
        	dpdk17_08_params.signature_offset = HASH_METADATA_OFFSET(8);  // Ignored for dosig
        	dpdk17_08_params.key_offset = HASH_METADATA_OFFSET(0);
        	dpdk17_08_params.key_mask = params->key_mask;
		return rte_table_hash_key8_ext_dosig_ops.f_create(&dpdk17_08_params, socket_id, entry_size);
	} else {
		struct rte_table_hash_ext_params dpdk17_08_params;
		dpdk17_08_params.key_size = params->key_size;
		dpdk17_08_params.n_keys = params->n_keys;
		dpdk17_08_params.n_buckets = params->n_buckets;
		dpdk17_08_params.n_buckets_ext = params->n_buckets >> 1;
		dpdk17_08_params.seed = params->seed;
		dpdk17_08_params.f_hash = (rte_table_hash_op_hash)rte_hash_crc;
		dpdk17_08_params.signature_offset = HASH_METADATA_OFFSET(0);
		dpdk17_08_params.key_offset = HASH_METADATA_OFFSET(0);
		return rte_table_hash_ext_dosig_ops.f_create(&dpdk17_08_params, socket_id, entry_size);
	}
};

static inline int prox_rte_eth_dev_get_port_by_name(const char *name, uint16_t *port_id)
{
#if RTE_VERSION < RTE_VERSION_NUM(16,7,0,0)
	plog_err("Not supported in DPDK version <= 16.04 by lack of rte_eth_dev_get_port_by_name support\n");
	return -1;
#else
	return rte_eth_dev_get_port_by_name(name, (uint8_t *)port_id);
#endif
}

#define prox_rte_table_free        rte_table_hash_ext_dosig_ops.f_free
#define prox_rte_table_add         rte_table_hash_ext_dosig_ops.f_add
#define prox_rte_table_delete      rte_table_hash_ext_dosig_ops.f_delete
#define prox_rte_table_add_bulk    rte_table_hash_ext_dosig_ops.f_add_bulk
#define prox_rte_table_delete_bulk rte_table_hash_ext_dosig_ops.f_delete_bulk
#define prox_rte_table_lookup      rte_table_hash_ext_dosig_ops.f_lookup
#define prox_rte_table_stats       rte_table_hash_ext_dosig_ops.f_stats

#define prox_rte_table_key8_free        rte_table_hash_key8_ext_dosig_ops.f_free
#define prox_rte_table_key8_add         rte_table_hash_key8_ext_dosig_ops.f_add
#define prox_rte_table_key8_delete      rte_table_hash_key8_ext_dosig_ops.f_delete
#define prox_rte_table_key8_add_bulk    rte_table_hash_key8_ext_dosig_ops.f_add_bulk
#define prox_rte_table_key8_delete_bulk rte_table_hash_key8_ext_dosig_ops.f_delete_bulk
#define prox_rte_table_key8_lookup      rte_table_hash_key8_ext_dosig_ops.f_lookup
#define prox_rte_table_key8_stats       rte_table_hash_key8_ext_dosig_ops.f_stats

#define rte_log_set_global_level rte_set_log_level

#else

static void *prox_rte_table_create(struct prox_rte_table_params *params, int socket_id, uint32_t entry_size)
{
	struct rte_table_hash_params dpdk_17_11_params;
        dpdk_17_11_params.name = params->name;
        dpdk_17_11_params.key_size = params->key_size;
        dpdk_17_11_params.key_offset = params->key_offset;
        dpdk_17_11_params.key_mask = params->key_mask;
        dpdk_17_11_params.n_keys = params->n_keys;
        dpdk_17_11_params.n_buckets = rte_align32pow2(params->n_buckets);
        dpdk_17_11_params.f_hash = params->f_hash;
        dpdk_17_11_params.seed = params->seed;

	if (params->key_size == 8) {
		return rte_table_hash_key8_ext_ops.f_create(&dpdk_17_11_params, socket_id, entry_size);
	} else {
		return rte_table_hash_ext_ops.f_create(&dpdk_17_11_params, socket_id, entry_size);
	}
}

#define prox_rte_eth_dev_get_port_by_name rte_eth_dev_get_port_by_name

#define prox_rte_table_free        rte_table_hash_ext_ops.f_free
#define prox_rte_table_add         rte_table_hash_ext_ops.f_add
#define prox_rte_table_delete      rte_table_hash_ext_ops.f_delete
#define prox_rte_table_add_bulk    rte_table_hash_ext_ops.f_add_bulk
#define prox_rte_table_delete_bulk rte_table_hash_ext_ops.f_delete_bulk
#define prox_rte_table_lookup      rte_table_hash_ext_ops.f_lookup
#define prox_rte_table_stats       rte_table_hash_ext_ops.f_stats

#define prox_rte_table_key8_free        rte_table_hash_key8_ext_ops.f_free
#define prox_rte_table_key8_add         rte_table_hash_key8_ext_ops.f_add
#define prox_rte_table_key8_delete      rte_table_hash_key8_ext_ops.f_delete
#define prox_rte_table_key8_add_bulk    rte_table_hash_key8_ext_ops.f_add_bulk
#define prox_rte_table_key8_delete_bulk rte_table_hash_key8_ext_ops.f_delete_bulk
#define prox_rte_table_key8_lookup      rte_table_hash_key8_ext_ops.f_lookup
#define prox_rte_table_key8_stats       rte_table_hash_key8_ext_ops.f_stats

#endif

#if RTE_VERSION < RTE_VERSION_NUM(18,8,0,0)
#define rte_cryptodev_sym_get_private_session_size rte_cryptodev_get_private_session_size
#endif

#ifndef DEV_RX_OFFLOAD_JUMBO_FRAME
#define DEV_RX_OFFLOAD_JUMBO_FRAME 0x00000800
#endif

#ifndef DEV_RX_OFFLOAD_KEEP_CRC
#ifndef DEV_RX_OFFLOAD_CRC_STRIP
#define DEV_RX_OFFLOAD_CRC_STRIP 0x00001000
#endif
#endif

#if RTE_VERSION < RTE_VERSION_NUM(19,2,0,0)
#define RTE_COLOR_GREEN e_RTE_METER_GREEN
#define RTE_COLOR_YELLOW e_RTE_METER_YELLOW
#define RTE_COLOR_RED e_RTE_METER_RED
#define prox_rte_color rte_meter_color
#define prox_rte_sched_port_pkt_read_tree_path(A,B,C,D,E,F) rte_sched_port_pkt_read_tree_path(B,C,D,E,F)
#define prox_rte_sched_port_pkt_write(A,B,C,D,E,F,G) rte_sched_port_pkt_write(B,C,D,E,F,G);
#else
#define prox_rte_color rte_color
#define prox_rte_sched_port_pkt_read_tree_path(A,B,C,D,E,F) rte_sched_port_pkt_read_tree_path(A,B,C,D,E,F)
#define prox_rte_sched_port_pkt_write(A,B,C,D,E,F,G) rte_sched_port_pkt_write(A,B,C,D,E,F,G);
#endif

#if RTE_VERSION < RTE_VERSION_NUM(19,8,0,0)
#if RTE_VERSION >= RTE_VERSION_NUM(18,5,0,0)
typedef struct vxlan_gpe_hdr prox_rte_vxlan_gpe_hdr;
#endif
#define PROX_RTE_ETHER_CRC_LEN ETHER_CRC_LEN
#define PROX_RTE_ETHER_MIN_LEN ETHER_MIN_LEN
#define PROX_RTE_ETHER_MAX_LEN ETHER_MAX_LEN
#define PROX_RTE_ETHER_HDR_LEN ETHER_HDR_LEN
#define PROX_RTE_TCP_SYN_FLAG TCP_SYN_FLAG
#define PROX_RTE_TCP_FIN_FLAG TCP_FIN_FLAG
#define PROX_RTE_TCP_RST_FLAG TCP_RST_FLAG
#define PROX_RTE_TCP_ACK_FLAG TCP_ACK_FLAG
#define PROX_RTE_IP_ICMP_ECHO_REPLY IP_ICMP_ECHO_REPLY
#define PROX_RTE_IP_ICMP_ECHO_REQUEST IP_ICMP_ECHO_REQUEST

#define prox_rte_ether_addr_copy ether_addr_copy
#define prox_rte_eth_random_addr eth_random_addr

typedef struct ipv6_hdr prox_rte_ipv6_hdr;
typedef struct ipv4_hdr prox_rte_ipv4_hdr;
typedef struct ether_addr prox_rte_ether_addr;
typedef struct ether_hdr prox_rte_ether_hdr;
typedef struct vlan_hdr prox_rte_vlan_hdr;
typedef struct udp_hdr prox_rte_udp_hdr;
typedef struct tcp_hdr prox_rte_tcp_hdr;
typedef struct icmp_hdr prox_rte_icmp_hdr;

#ifndef RTE_SCHED_BE_QUEUES_PER_PIPE
#define RTE_SCHED_BE_QUEUES_PER_PIPE RTE_SCHED_QUEUES_PER_PIPE
#endif

#define PROX_RTE_IS_IPV4_MCAST IS_IPV4_MCAST
#define prox_rte_is_same_ether_addr is_same_ether_addr
#define prox_rte_is_zero_ether_addr is_zero_ether_addr
#else

#define PROX_RTE_ETHER_CRC_LEN RTE_ETHER_CRC_LEN
#define PROX_RTE_ETHER_MIN_LEN RTE_ETHER_MIN_LEN
#define PROX_RTE_ETHER_MAX_LEN RTE_ETHER_MAX_LEN
#define PROX_RTE_ETHER_HDR_LEN RTE_ETHER_HDR_LEN
#define PROX_RTE_TCP_SYN_FLAG RTE_TCP_SYN_FLAG
#define PROX_RTE_TCP_FIN_FLAG RTE_TCP_FIN_FLAG
#define PROX_RTE_TCP_RST_FLAG RTE_TCP_RST_FLAG
#define PROX_RTE_TCP_ACK_FLAG RTE_TCP_ACK_FLAG
#define PROX_RTE_IP_ICMP_ECHO_REPLY RTE_IP_ICMP_ECHO_REPLY
#define PROX_RTE_IP_ICMP_ECHO_REQUEST RTE_IP_ICMP_ECHO_REQUEST

#define prox_rte_ether_addr_copy rte_ether_addr_copy
#define prox_rte_eth_random_addr rte_eth_random_addr

typedef struct rte_ipv6_hdr prox_rte_ipv6_hdr;
typedef struct rte_ipv4_hdr prox_rte_ipv4_hdr;
typedef struct rte_ether_addr prox_rte_ether_addr;
typedef struct rte_ether_hdr prox_rte_ether_hdr;
typedef struct rte_vlan_hdr prox_rte_vlan_hdr;
typedef struct rte_vxlan_gpe_hdr prox_rte_vxlan_gpe_hdr;
typedef struct rte_udp_hdr prox_rte_udp_hdr;
typedef struct rte_tcp_hdr prox_rte_tcp_hdr;
typedef struct rte_icmp_hdr prox_rte_icmp_hdr;

#define PROX_RTE_IS_IPV4_MCAST  RTE_IS_IPV4_MCAST
#define prox_rte_is_same_ether_addr rte_is_same_ether_addr
#define prox_rte_is_zero_ether_addr rte_is_zero_ether_addr

#endif

char *prox_strncpy(char * dest, const char * src, size_t count);

#ifdef RTE_LIBRTE_PMD_AESNI_MB
#if RTE_VERSION < RTE_VERSION_NUM(19,5,0,0)
//RFC4303
struct prox_esp_hdr {
        uint32_t spi;
        uint32_t seq;
};
struct prox_rte_cryptodev_qp_conf {
	uint32_t nb_descriptors; /**< Number of descriptors per queue pair */
	struct rte_mempool * 	mp_session;
	struct rte_mempool * 	mp_session_private;
};

static int prox_rte_cryptodev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id, struct prox_rte_cryptodev_qp_conf *qp_conf, int socket_id)
{
	struct rte_mempool *session_pool = qp_conf->mp_session;
	return rte_cryptodev_queue_pair_setup(dev_id, queue_pair_id, (struct rte_cryptodev_qp_conf *)qp_conf, socket_id, session_pool);
}

#else
#define prox_rte_cryptodev_qp_conf rte_cryptodev_qp_conf
static int prox_rte_cryptodev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id, struct prox_rte_cryptodev_qp_conf *qp_conf, int socket_id)
{
	return rte_cryptodev_queue_pair_setup(dev_id, queue_pair_id, (struct rte_cryptodev_qp_conf *)qp_conf, socket_id);
}

#if RTE_VERSION < RTE_VERSION_NUM(19,8,0,0)
#define prox_esp_hdr esp_hdr

#else	// From DPDK 19.08
#define prox_esp_hdr rte_esp_hdr

#endif
#endif
#endif	// CONFIG_RTE_LIBRTE_PMD_AESNI_MB

#if RTE_VERSION < RTE_VERSION_NUM(19,11,0,0)
#define prox_rte_eth_dev_count_avail() rte_eth_dev_count()
#else
#define prox_rte_eth_dev_count_avail() rte_eth_dev_count_avail()
#endif

#endif // _PROX_COMPAT_H