diff options
author | Heinrich Kuhn <heinrich.kuhn@corigine.com> | 2021-08-18 16:21:39 +0200 |
---|---|---|
committer | Luc Provoost <luc.provoost@intel.com> | 2021-09-13 13:22:32 +0000 |
commit | 75597545ef748d7113591cdbfc8d1aaa88cf15cb (patch) | |
tree | 2d00c7766d341785cb1a17b72f971e1383f257d9 /VNFs/DPPD-PROX/prox_args.c | |
parent | d87ea3dfce75c5993564a60cadb81bfa75f20c80 (diff) |
Use updated DPDK scheduling schema in Prox
The scheduling infrastructure in DPDK has changed somewhat in DPDK 20.11
and up. This patch adds the needed compatibly code to make use of the
new layout in DPDK. The bulk of the changes revolve around moving tb/tc
rates and period fields from rte_sched_subport_params to a new struct
called rte_sched_subport_profile_params
Signed-off-by: Heinrich Kuhn <heinrich.kuhn@corigine.com>
Signed-off-by: Simon Horman <simon.horman@corigine.com>
Change-Id: Ie365903b972528eaa9324c707fe3868610f51993
Diffstat (limited to 'VNFs/DPPD-PROX/prox_args.c')
-rw-r--r-- | VNFs/DPPD-PROX/prox_args.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/VNFs/DPPD-PROX/prox_args.c b/VNFs/DPPD-PROX/prox_args.c index d8c41021..d7c436d6 100644 --- a/VNFs/DPPD-PROX/prox_args.c +++ b/VNFs/DPPD-PROX/prox_args.c @@ -1632,46 +1632,70 @@ static int get_core_cfg(unsigned sindex, char *str, void *data) return 0; } if (STR_EQ(str, "subport tb rate")) { +#if RTE_VERSION >= RTE_VERSION_NUM(20,11,0,0) + return parse_u64(&targ->qos_conf.port_params.subport_profiles->tb_rate, pkey); +#else #if RTE_VERSION > RTE_VERSION_NUM(19,11,0,0) return parse_u64(&targ->qos_conf.subport_params[0].tb_rate, pkey); #else return parse_int(&targ->qos_conf.subport_params[0].tb_rate, pkey); #endif +#endif } if (STR_EQ(str, "subport tb size")) { +#if RTE_VERSION >= RTE_VERSION_NUM(20,11,0,0) + return parse_u64(&targ->qos_conf.port_params.subport_profiles->tb_size, pkey); +#else #if RTE_VERSION > RTE_VERSION_NUM(19,11,0,0) return parse_u64(&targ->qos_conf.subport_params[0].tb_size, pkey); #else return parse_int(&targ->qos_conf.subport_params[0].tb_size, pkey); #endif +#endif } if (STR_EQ(str, "subport tc 0 rate")) { +#if RTE_VERSION >= RTE_VERSION_NUM(20,11,0,0) + return parse_u64(&targ->qos_conf.port_params.subport_profiles->tc_rate[0], pkey); +#else #if RTE_VERSION > RTE_VERSION_NUM(19,11,0,0) return parse_u64(&targ->qos_conf.subport_params[0].tc_rate[0], pkey); #else return parse_int(&targ->qos_conf.subport_params[0].tc_rate[0], pkey); #endif +#endif } if (STR_EQ(str, "subport tc 1 rate")) { +#if RTE_VERSION >= RTE_VERSION_NUM(20,11,0,0) + return parse_u64(&targ->qos_conf.port_params.subport_profiles->tc_rate[1], pkey); +#else #if RTE_VERSION > RTE_VERSION_NUM(19,11,0,0) return parse_u64(&targ->qos_conf.subport_params[0].tc_rate[1], pkey); #else return parse_int(&targ->qos_conf.subport_params[0].tc_rate[1], pkey); #endif +#endif } if (STR_EQ(str, "subport tc 2 rate")) { +#if RTE_VERSION >= RTE_VERSION_NUM(20,11,0,0) + return parse_u64(&targ->qos_conf.port_params.subport_profiles->tc_rate[2], pkey); +#else #if RTE_VERSION > RTE_VERSION_NUM(19,11,0,0) return parse_u64(&targ->qos_conf.subport_params[0].tc_rate[2], pkey); #else return parse_int(&targ->qos_conf.subport_params[0].tc_rate[2], pkey); #endif +#endif } if (STR_EQ(str, "subport tc 3 rate")) { +#if RTE_VERSION >= RTE_VERSION_NUM(20,11,0,0) + return parse_u64(&targ->qos_conf.port_params.subport_profiles->tc_rate[3], pkey); +#else #if RTE_VERSION > RTE_VERSION_NUM(19,11,0,0) return parse_u64(&targ->qos_conf.subport_params[0].tc_rate[3], pkey); #else return parse_int(&targ->qos_conf.subport_params[0].tc_rate[3], pkey); #endif +#endif } if (STR_EQ(str, "subport tc rate")) { @@ -1681,19 +1705,30 @@ static int get_core_cfg(unsigned sindex, char *str, void *data) return -1; } +#if RTE_VERSION >= RTE_VERSION_NUM(20,11,0,0) + targ->qos_conf.port_params.subport_profiles->tc_rate[0] = val; + targ->qos_conf.port_params.subport_profiles->tc_rate[1] = val; + targ->qos_conf.port_params.subport_profiles->tc_rate[2] = val; + targ->qos_conf.port_params.subport_profiles->tc_rate[3] = val; +#else targ->qos_conf.subport_params[0].tc_rate[0] = val; targ->qos_conf.subport_params[0].tc_rate[1] = val; targ->qos_conf.subport_params[0].tc_rate[2] = val; targ->qos_conf.subport_params[0].tc_rate[3] = val; +#endif return 0; } if (STR_EQ(str, "subport tc period")) { +#if RTE_VERSION >= RTE_VERSION_NUM(20,11,0,0) + return parse_u64(&targ->qos_conf.port_params.subport_profiles->tc_period, pkey); +#else #if RTE_VERSION > RTE_VERSION_NUM(19,11,0,0) return parse_u64(&targ->qos_conf.subport_params[0].tc_period, pkey); #else return parse_int(&targ->qos_conf.subport_params[0].tc_period, pkey); #endif +#endif } if (STR_EQ(str, "pipe tb rate")) { #if RTE_VERSION > RTE_VERSION_NUM(19,11,0,0) |