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 9359CA04BB; Tue, 6 Oct 2020 20:06:02 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8B3C01B68E; Tue, 6 Oct 2020 20:04:07 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 2A4E929C6 for ; Tue, 6 Oct 2020 20:03:59 +0200 (CEST) IronPort-SDR: epLfiwrkBZZIAu8XPtcTQ8RkSusl8q5vz0IdTTGRK72iVNuuiL/Qg5VYjZf/INeQofLnHJin6D 2h4f33cCzKkQ== X-IronPort-AV: E=McAfee;i="6000,8403,9765"; a="161217343" X-IronPort-AV: E=Sophos;i="5.77,343,1596524400"; d="scan'208";a="161217343" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Oct 2020 11:03:28 -0700 IronPort-SDR: ocgdoSUABW7V8bD+V/hI1EPV3uMDtghdNdjAxaabCF+xHuLvwhPYpJTqtwprDXAHZlGRSu5MLu jz1YJLpxFSeQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,343,1596524400"; d="scan'208";a="527479494" Received: from silpixa00400629.ir.intel.com ([10.237.214.112]) by orsmga005.jf.intel.com with ESMTP; 06 Oct 2020 11:03:27 -0700 From: Savinay Dharmappa To: cristian.dumitrescu@intel.com, jasvinder.singh@intel.com, dev@dpdk.org Cc: savinay.dharmappa@intel.com Date: Tue, 6 Oct 2020 19:02:32 +0100 Message-Id: <20201006180233.15793-8-savinay.dharmappa@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201006180233.15793-1-savinay.dharmappa@intel.com> References: <20201006152733.52178-1-savinay.dharmappa@intel.com> <20201006180233.15793-1-savinay.dharmappa@intel.com> Subject: [dpdk-dev] [PATCH v7 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