From 8912be9d61200a3ad8b30a33e362be963eb8c4bb Mon Sep 17 00:00:00 2001 From: Long Wu Date: Thu, 8 Sep 2022 01:36:12 -0400 Subject: Modify code according to new dpdk variable name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Note that most of the original contents of this commit has been removed from this final patchset, because compatibility issues with DPDK 21.11 have already been addressed, although differently, by these commits: - b950110: Add initial support for DPDK 21.11 - 5efd9d8: Fix tons of deprecation warnings Many macros, structure members and dpdk args' name have been changed since dpdk 21.11 and the current latest version(22.07) still has these changes. These changes caused the prox compilation to fail. Modify the code so that prox can be compiled successfully with new dpdk variable name. Signed-off-by: Long Wu Reviewed-by: Simon Horman Reviewed-by: Chaoyong He Reviewed-by: Niklas Söderlund Signed-off-by: Patrice Buriez Change-Id: Ibaad7ac00b121ae9b12ed03bd0380400b226e805 --- VNFs/DPPD-PROX/defaults.c | 4 ++-- VNFs/DPPD-PROX/prox_args.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'VNFs') diff --git a/VNFs/DPPD-PROX/defaults.c b/VNFs/DPPD-PROX/defaults.c index ec45b784..f5624b97 100644 --- a/VNFs/DPPD-PROX/defaults.c +++ b/VNFs/DPPD-PROX/defaults.c @@ -51,9 +51,9 @@ static const struct rte_eth_conf default_port_conf = { .rxmode = { .mq_mode = 0, #if RTE_VERSION < RTE_VERSION_NUM(21,11,0,0) - .max_rx_pkt_len = PROX_MTU + PROX_RTE_ETHER_HDR_LEN + PROX_RTE_ETHER_CRC_LEN + .max_rx_pkt_len = PROX_MTU + PROX_RTE_ETHER_HDR_LEN + PROX_RTE_ETHER_CRC_LEN, #else - .mtu = PROX_MTU + .mtu = PROX_MTU, #endif }, .rx_adv_conf = { diff --git a/VNFs/DPPD-PROX/prox_args.c b/VNFs/DPPD-PROX/prox_args.c index 3d5bcf79..dc212494 100644 --- a/VNFs/DPPD-PROX/prox_args.c +++ b/VNFs/DPPD-PROX/prox_args.c @@ -660,7 +660,7 @@ static int get_port_cfg(unsigned sindex, char *str, void *data) if (cfg->port_conf.rxmode.max_rx_pkt_len > PROX_RTE_ETHER_MAX_LEN) #else cfg->port_conf.rxmode.mtu = cfg->mtu; - if (cfg->port_conf.rxmode.mtu > PROX_RTE_ETHER_MAX_LEN - PROX_RTE_ETHER_HDR_LEN - PROX_RTE_ETHER_CRC_LEN) + if (cfg->port_conf.rxmode.mtu > PROX_MTU) #endif cfg->requested_rx_offload |= RTE_ETH_RX_OFFLOAD_JUMBO_FRAME; } -- cgit 1.2.3-korg