Modify code according to new dpdk variable name 77/73477/3
authorLong Wu <long.wu@corigine.com>
Thu, 8 Sep 2022 05:36:12 +0000 (01:36 -0400)
committerPatrice Buriez <patrice.buriez@chenapan.org>
Sat, 31 Dec 2022 12:05:45 +0000 (12:05 +0000)
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

VNFs/DPPD-PROX/defaults.c
VNFs/DPPD-PROX/prox_args.c

index ec45b78..f5624b9 100644 (file)
@@ -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 = {
index 3d5bcf7..dc21249 100644 (file)
@@ -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;
                }