From 75597545ef748d7113591cdbfc8d1aaa88cf15cb Mon Sep 17 00:00:00 2001 From: Heinrich Kuhn Date: Wed, 18 Aug 2021 16:21:39 +0200 Subject: 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 Signed-off-by: Simon Horman Change-Id: Ie365903b972528eaa9324c707fe3868610f51993 --- VNFs/DPPD-PROX/defaults.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'VNFs/DPPD-PROX/defaults.c') diff --git a/VNFs/DPPD-PROX/defaults.c b/VNFs/DPPD-PROX/defaults.c index a2becb07..2156a74f 100644 --- a/VNFs/DPPD-PROX/defaults.c +++ b/VNFs/DPPD-PROX/defaults.c @@ -76,6 +76,16 @@ static struct rte_eth_txconf default_tx_conf = { .tx_rs_thresh = 32, /* Use PMD default values */ }; +#if RTE_VERSION >= RTE_VERSION_NUM(20,11,0,0) +static struct rte_sched_subport_profile_params subport_profile_params_default = { + .tb_rate = TEN_GIGABIT / NB_PIPES, + .tb_size = 4000000, + + .tc_rate = {TEN_GIGABIT / NB_PIPES, TEN_GIGABIT / NB_PIPES, TEN_GIGABIT / NB_PIPES, TEN_GIGABIT / NB_PIPES}, + .tc_period = 40, +}; +#endif + static struct rte_sched_port_params port_params_default = { .name = "port_0", .socket = 0, @@ -83,6 +93,9 @@ static struct rte_sched_port_params port_params_default = { .rate = 0, .frame_overhead = RTE_SCHED_FRAME_OVERHEAD_DEFAULT, .n_subports_per_port = 1, +#if RTE_VERSION >= RTE_VERSION_NUM(20,11,0,0) + .subport_profiles = &subport_profile_params_default, +#endif .n_pipes_per_subport = NB_PIPES, #if RTE_VERSION < RTE_VERSION_NUM(19,11,0,0) .qsize = {QUEUE_SIZES, QUEUE_SIZES, QUEUE_SIZES, QUEUE_SIZES}, @@ -106,10 +119,12 @@ static struct rte_sched_pipe_params pipe_params_default = { }; static struct rte_sched_subport_params subport_params_default = { +#if RTE_VERSION < RTE_VERSION_NUM(20,11,0,0) .tb_rate = TEN_GIGABIT, .tb_size = 4000000, .tc_rate = {TEN_GIGABIT, TEN_GIGABIT, TEN_GIGABIT, TEN_GIGABIT}, .tc_period = 40, /* default was 10 */ +#endif #if RTE_VERSION > RTE_VERSION_NUM(19,11,0,0) .qsize = {QUEUE_SIZES, QUEUE_SIZES, QUEUE_SIZES, QUEUE_SIZES}, .pipe_profiles = NULL, -- cgit 1.2.3-korg