summaryrefslogtreecommitdiffstats
path: root/VNFs
diff options
context:
space:
mode:
authorLong Wu <long.wu@corigine.com>2022-09-08 01:36:12 -0400
committerPatrice Buriez <patrice.buriez@chenapan.org>2022-12-31 12:05:45 +0000
commit8912be9d61200a3ad8b30a33e362be963eb8c4bb (patch)
tree1e6d66fd75c4d8184b21c180d2440b2e02bd15c6 /VNFs
parent81270cab1daea40a39a77c06b47b45e211631186 (diff)
Modify code according to new dpdk variable name
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 <long.wu@corigine.com> Reviewed-by: Simon Horman <simon.horman@corigine.com> Reviewed-by: Chaoyong He <chaoyong.he@corigine.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com> Signed-off-by: Patrice Buriez <patrice.buriez@chenapan.org> Change-Id: Ibaad7ac00b121ae9b12ed03bd0380400b226e805
Diffstat (limited to 'VNFs')
-rw-r--r--VNFs/DPPD-PROX/defaults.c4
-rw-r--r--VNFs/DPPD-PROX/prox_args.c2
2 files changed, 3 insertions, 3 deletions
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;
}