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 C7D4FA04BC; Fri, 9 Oct 2020 14:42:12 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8E23B1D652; Fri, 9 Oct 2020 14:39:48 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id C73FA1D630 for ; Fri, 9 Oct 2020 14:39:41 +0200 (CEST) IronPort-SDR: pYoGLxIUu8ufHEJfI3F5JLBWshmMIrnwk4eGnzXFMDA5y00JmF3dnOyqeQvE7XqVldYylZ6JHQ 695LtzsvETFQ== X-IronPort-AV: E=McAfee;i="6000,8403,9768"; a="152397601" X-IronPort-AV: E=Sophos;i="5.77,355,1596524400"; d="scan'208";a="152397601" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Oct 2020 05:39:41 -0700 IronPort-SDR: azPA9xn8qpjYwBMucV/51VlGYOBMpkMRkyTU3HBPe10I3hX7c6wXT90P3HntB6rigjRL/Ghfrf k8bazWE6Ec9g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,355,1596524400"; d="scan'208";a="528914548" Received: from silpixa00400629.ir.intel.com ([10.237.214.112]) by orsmga005.jf.intel.com with ESMTP; 09 Oct 2020 05:39:40 -0700 From: Savinay Dharmappa To: cristian.dumitrescu@intel.com, jasvinder.singh@intel.com, dev@dpdk.org Cc: savinay.dharmappa@intel.com Date: Fri, 9 Oct 2020 13:39:18 +0100 Message-Id: <20201009123919.43004-8-savinay.dharmappa@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201009123919.43004-1-savinay.dharmappa@intel.com> References: <20201007140915.19491-1-savinay.dharmappa@intel.com> <20201009123919.43004-1-savinay.dharmappa@intel.com> Subject: [dpdk-dev] [PATCH v9 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