From: Savinay Dharmappa Date: Fri, 9 Oct 2020 12:39:18 +0000 (+0100) Subject: test/sched: update subport rate dynamically X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=b393ad5f56d1246991a6eb256d59882953b8e65b;p=dpdk.git test/sched: update subport rate dynamically Modify the test_sched application to build the hierarchical scheduler with default subport bandwidth profile. It also allows to update a subport with different subport rates dynamically Signed-off-by: Savinay Dharmappa Acked-by: Cristian Dumitrescu --- diff --git a/app/test/test_sched.c b/app/test/test_sched.c index 5e5c2a59bf..958b631144 100644 --- a/app/test/test_sched.c +++ b/app/test/test_sched.c @@ -21,6 +21,7 @@ #define PIPE 1 #define TC 2 #define QUEUE 0 +#define MAX_SCHED_SUBPORT_PROFILES 8 static struct rte_sched_pipe_params pipe_profile[] = { { /* Profile #0 */ @@ -36,15 +37,20 @@ static struct rte_sched_pipe_params pipe_profile[] = { }, }; -static struct rte_sched_subport_params subport_param[] = { +static struct rte_sched_subport_profile_params + subport_profile[] = { { .tb_rate = 1250000000, .tb_size = 1000000, - .tc_rate = {1250000000, 1250000000, 1250000000, 1250000000, 1250000000, 1250000000, 1250000000, 1250000000, 1250000000, 1250000000, 1250000000, 1250000000, 1250000000}, .tc_period = 10, + }, +}; + +static struct rte_sched_subport_params subport_param[] = { + { .n_pipes_per_subport_enabled = 1024, .qsize = {32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32}, .pipe_profiles = pipe_profile, @@ -59,6 +65,9 @@ static struct rte_sched_port_params port_param = { .mtu = 1522, .frame_overhead = RTE_SCHED_FRAME_OVERHEAD_DEFAULT, .n_subports_per_port = 1, + .n_subport_profiles = 1, + .subport_profiles = subport_profile, + .n_max_subport_profiles = MAX_SCHED_SUBPORT_PROFILES, .n_pipes_per_subport = 1024, };