summaryrefslogtreecommitdiffstats
path: root/VNFs/DPPD-PROX/defaults.c
diff options
context:
space:
mode:
authorHeinrich Kuhn <heinrich.kuhn@corigine.com>2021-08-18 16:21:39 +0200
committerLuc Provoost <luc.provoost@intel.com>2021-09-13 13:22:32 +0000
commit75597545ef748d7113591cdbfc8d1aaa88cf15cb (patch)
tree2d00c7766d341785cb1a17b72f971e1383f257d9 /VNFs/DPPD-PROX/defaults.c
parentd87ea3dfce75c5993564a60cadb81bfa75f20c80 (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/defaults.c')
-rw-r--r--VNFs/DPPD-PROX/defaults.c15
1 files changed, 15 insertions, 0 deletions
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,