From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 555C9A04BA; Wed, 7 Oct 2020 16:12:51 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 799371BD08; Wed, 7 Oct 2020 16:10:20 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 7C6511BCB4 for ; Wed, 7 Oct 2020 16:10:15 +0200 (CEST) IronPort-SDR: Y8GhoKg8ymG1+o7B+fqWT6P2TzqmLlc4b0Z0TdLpECAK42GHpkKQHLcPi5CTIPBJHL72SP6m7E 9GCEN+zU5nlg== X-IronPort-AV: E=McAfee;i="6000,8403,9767"; a="162336215" X-IronPort-AV: E=Sophos;i="5.77,347,1596524400"; d="scan'208";a="162336215" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Oct 2020 07:10:13 -0700 IronPort-SDR: PpAesU3FL6VG0ck59G/1IGWRyTkQA9pQE4xHjRVmx+liW3PzJAeVl24hjxuxmWV/NCBKuKZyM/ +BxFPp+P5PRQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,347,1596524400"; d="scan'208";a="311760561" Received: from silpixa00400629.ir.intel.com ([10.237.214.112]) by orsmga003.jf.intel.com with ESMTP; 07 Oct 2020 07:10:11 -0700 From: Savinay Dharmappa To: cristian.dumitrescu@intel.com, jasvinder.singh@intel.com, dev@dpdk.org Cc: savinay.dharmappa@intel.com Date: Wed, 7 Oct 2020 15:09:14 +0100 Message-Id: <20201007140915.19491-8-savinay.dharmappa@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201007140915.19491-1-savinay.dharmappa@intel.com> References: <20201006180233.15793-1-savinay.dharmappa@intel.com> <20201007140915.19491-1-savinay.dharmappa@intel.com> Subject: [dpdk-dev] [PATCH v8 7/8] app/test_sched: update subport rate dynamically X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- app/test/test_sched.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/app/test/test_sched.c b/app/test/test_sched.c index 5e5c2a59b..958b63114 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, }; -- 2.17.1