From b950110b2a8a23ac498deef1bebca643f80c38b1 Mon Sep 17 00:00:00 2001 From: Xavier Simonart Date: Sun, 20 Feb 2022 00:50:56 +0000 Subject: Add initial support for DPDK 21.11 Note that this patch simplistically removes some PROX features, because they are not directly supported anymore by DPDK, since rte_eth_devices is now private: - reading and writing NIC register through PROX command line - querying ixgbe HW statistics instead of getting them from DPDK Also adjusted to following DPDK changes: * struct rte_ether_hdr fields renamed: - d_addr -> dst_addr - s_addr -> src_addr * struct rte_eth_rxmode field renamed: - max_rx_pkt_len -> mtu * --master-lcore -> --main-lcore Signed-off-by: Xavier Simonart Signed-off-by: Patrice Buriez Change-Id: I08445b3dd0f7fe471d9bc7cfb557bd3aeb2f50be --- VNFs/DPPD-PROX/prox_compat.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'VNFs/DPPD-PROX/prox_compat.h') diff --git a/VNFs/DPPD-PROX/prox_compat.h b/VNFs/DPPD-PROX/prox_compat.h index 404ce9ed..4f5fa321 100644 --- a/VNFs/DPPD-PROX/prox_compat.h +++ b/VNFs/DPPD-PROX/prox_compat.h @@ -210,7 +210,7 @@ typedef struct icmp_hdr prox_rte_icmp_hdr; #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 +#else // >= 19.08 #define PROX_RTE_ETHER_CRC_LEN RTE_ETHER_CRC_LEN #define PROX_RTE_ETHER_MIN_LEN RTE_ETHER_MIN_LEN @@ -229,7 +229,16 @@ typedef struct icmp_hdr prox_rte_icmp_hdr; 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; +#if RTE_VERSION < RTE_VERSION_NUM(21,11,0,0) typedef struct rte_ether_hdr prox_rte_ether_hdr; +#else +typedef struct prox_rte_ether_hdr +{ + struct rte_ether_addr d_addr; /**< Destination address. */ + struct rte_ether_addr s_addr; /**< Source address. */ + rte_be16_t ether_type; /**< Frame type. */ +} __rte_aligned(2) prox_rte_ether_hdr; +#endif 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; -- cgit 1.2.3-korg