From patchwork Thu Oct 6 19:00:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ajmera, Megha" X-Patchwork-Id: 117501 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4F33BA00C2; Thu, 6 Oct 2022 21:03:44 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 32A4E400D6; Thu, 6 Oct 2022 21:03:44 +0200 (CEST) Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 8740A40042; Thu, 6 Oct 2022 21:03:42 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1665083022; x=1696619022; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=bm+/nwch/bVcj/4E6sY2RWPz+N/bOuiygbRzScfwQ00=; b=O9hPE6DGW2yqquq/r1rKWWjFbynGBaRKmsTUUeuFp5cX8wkCsl5ri2AH U4SIP2BvTQ7q4yN7BqPxf1mf65XfYVIdr9dOPh/TOfqikSftydZIFeH7+ mUd4m/o69mCEHfI4+NGGVe07c5g/I2lup9kOxUaOKEbKRoI2LiOBRwwHV ry9pmaLXejvHkL6tNch3J/45yDQlDZvysA+YL7J4MJZc0w9bSSDQNNSCU uihuLVofyn/TNjzAV0jTx9xZF/tc0pxtDUrq6ML8NUttsqqMwBje7Nq2m XlQpB7+jW2vfoeq4PeDDtI73QCDSdYdHOglPAr/WF2AIfSzNDR9MiXcKv w==; X-IronPort-AV: E=McAfee;i="6500,9779,10492"; a="365483778" X-IronPort-AV: E=Sophos;i="5.95,164,1661842800"; d="scan'208";a="365483778" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Oct 2022 12:03:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10492"; a="800006136" X-IronPort-AV: E=Sophos;i="5.95,164,1661842800"; d="scan'208";a="800006136" Received: from unknown (HELO localhost.localdomain) ([10.190.213.60]) by orsmga005.jf.intel.com with ESMTP; 06 Oct 2022 12:03:40 -0700 From: Megha Ajmera To: dev@dpdk.org, jasvinder.singh@intel.com, cristian.dumitrescu@intel.com Cc: stable@dpdk.org Subject: [PATCH 1/3] sched: fix subport profile id not set correctly Date: Thu, 6 Oct 2022 19:00:36 +0000 Message-Id: <20221006190038.431828-1-megha.ajmera@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221005172239.254327-1-megha.ajmera@intel.com> References: <20221005172239.254327-1-megha.ajmera@intel.com> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org In rte_sched_subport_config() API, subport_profile_id is not set correctly. Fixes: ac6fcb841b0f ("sched: update subport rate dynamically") Cc: cristian.dumitrescu@intel.com Signed-off-by: Megha Ajmera Acked-by: Cristian Dumitrescu --- lib/sched/rte_sched.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/sched/rte_sched.c b/lib/sched/rte_sched.c index c5fa9e4582..c91697131d 100644 --- a/lib/sched/rte_sched.c +++ b/lib/sched/rte_sched.c @@ -1257,8 +1257,6 @@ rte_sched_subport_config(struct rte_sched_port *port, n_subports++; - subport_profile_id = 0; - /* Port */ port->subports[subport_id] = s; From patchwork Thu Oct 6 19:00:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ajmera, Megha" X-Patchwork-Id: 117502 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9E2FAA00C2; Thu, 6 Oct 2022 21:04:11 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 94FD4427EE; Thu, 6 Oct 2022 21:04:11 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id D0B4C40E2D; Thu, 6 Oct 2022 21:04:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1665083050; x=1696619050; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=UJOltTy+azAFiogdydPskfdiZUrdkbo8dTISBV3sIiM=; b=c9rJ7GDZoGcJfY55oby4zjCTlDUlPKVjmK3CSnwvbAsfelI3ge31C0m0 y9DgivWV8oiQXkhwNnKqnxpTv+wovljeRChRaMpnYtfVHWBmAuOWuH5LN 7Q2HNSFcMJb9BnoEKBYoBtVrf2LIsQxYzGXNUDzYePMIyMjcWK97ypzBs T8PH0DMBjEMrcGslvZvQD9frcGOCYn4tyk7sFQjKaIxrhO8QUSwJLF5Jo jUrlu7T1bz7T8kTyP12wPyDVMWisn6eWmXPtNcSYDZaBTy1jgB6zQGeaM wCnaC5vhCAIyjD5CBtRyqzO1j+6m2sv42Q0+B2OR+HkjevBAkl9S2c9rR Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10492"; a="283911121" X-IronPort-AV: E=Sophos;i="5.95,164,1661842800"; d="scan'208";a="283911121" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Oct 2022 12:03:46 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10492"; a="800006165" X-IronPort-AV: E=Sophos;i="5.95,164,1661842800"; d="scan'208";a="800006165" Received: from unknown (HELO localhost.localdomain) ([10.190.213.60]) by orsmga005.jf.intel.com with ESMTP; 06 Oct 2022 12:03:45 -0700 From: Megha Ajmera To: dev@dpdk.org, jasvinder.singh@intel.com, cristian.dumitrescu@intel.com Cc: stable@dpdk.org Subject: [PATCH 2/3] sched: removed unused subport field in hqos profile Date: Thu, 6 Oct 2022 19:00:37 +0000 Message-Id: <20221006190038.431828-2-megha.ajmera@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221006190038.431828-1-megha.ajmera@intel.com> References: <20221005172239.254327-1-megha.ajmera@intel.com> <20221006190038.431828-1-megha.ajmera@intel.com> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Removed unused subport field from profile.cfg Correctly using subport profile id in subport config load. Fixes: 802d214dc880 ("examples/qos_sched: update subport rate dynamically") Cc: cristian.dumitrescu@intel.com Signed-off-by: Megha Ajmera Acked-by: Cristian Dumitrescu --- examples/qos_sched/cfg_file.c | 2 +- examples/qos_sched/profile.cfg | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/examples/qos_sched/cfg_file.c b/examples/qos_sched/cfg_file.c index 3d5d75fcf0..ca871d3287 100644 --- a/examples/qos_sched/cfg_file.c +++ b/examples/qos_sched/cfg_file.c @@ -157,7 +157,7 @@ cfg_load_subport_profile(struct rte_cfgfile *cfg, profiles = rte_cfgfile_num_sections(cfg, "subport profile", sizeof("subport profile") - 1); - subport_params[0].n_pipe_profiles = profiles; + port_params.n_subport_profiles = profiles; for (i = 0; i < profiles; i++) { char sec_name[32]; diff --git a/examples/qos_sched/profile.cfg b/examples/qos_sched/profile.cfg index c9ec187c93..e8de101b6c 100644 --- a/examples/qos_sched/profile.cfg +++ b/examples/qos_sched/profile.cfg @@ -26,8 +26,6 @@ number of subports per port = 1 number of pipes per subport = 4096 queue sizes = 64 64 64 64 64 64 64 64 64 64 64 64 64 -subport 0-8 = 0 ; These subports are configured with subport profile 0 - [subport profile 0] tb rate = 1250000000 ; Bytes per second tb size = 1000000 ; Bytes From patchwork Thu Oct 6 19:00:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ajmera, Megha" X-Patchwork-Id: 117503 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1C421A00C2; Thu, 6 Oct 2022 21:04:17 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 936FB42847; Thu, 6 Oct 2022 21:04:12 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id 260E740042; Thu, 6 Oct 2022 21:04:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1665083050; x=1696619050; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=jdjbFOFzRnprnLJnvp/nvC81uwolkbLoTU5ANSzjN+4=; b=ZuoV1UU4j6hX0AmdOAF0ihMPYYimCoE2knSPRR1iLCv8G4bcyMdn8NGi vxDEkHk9T8RGT/WjD5pNi5XUTLNON9YerQnWlQDvPrVaK6S7/Edx0pcZy eHIXaIH02+jEc26yxN7F8SkghVv6roYVufYkp63FRewx8xmbvD9XAcSIm z399qczEudRZ/HkMGKiN9sA03VUaNOozWhWPefDuoKmoG0Zce+67n5bPk ACmiw3gpjG7OjbLsdQU1JNKpYN1X3KF2v/BphzalJyuqnrnM7GGSAvAMM ZLKCd554wO52LQ50nNdf2mvOdDepcGX+HFm4ZJmrExiKcucHAS5cAoU7t A==; X-IronPort-AV: E=McAfee;i="6500,9779,10492"; a="329975811" X-IronPort-AV: E=Sophos;i="5.95,164,1661842800"; d="scan'208";a="329975811" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Oct 2022 12:03:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10492"; a="800006200" X-IronPort-AV: E=Sophos;i="5.95,164,1661842800"; d="scan'208";a="800006200" Received: from unknown (HELO localhost.localdomain) ([10.190.213.60]) by orsmga005.jf.intel.com with ESMTP; 06 Oct 2022 12:03:51 -0700 From: Megha Ajmera To: dev@dpdk.org, jasvinder.singh@intel.com, cristian.dumitrescu@intel.com Cc: stable@dpdk.org Subject: [PATCH 3/3] sched: support for 100G+ rates in subport/pipe config Date: Thu, 6 Oct 2022 19:00:38 +0000 Message-Id: <20221006190038.431828-3-megha.ajmera@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221006190038.431828-1-megha.ajmera@intel.com> References: <20221005172239.254327-1-megha.ajmera@intel.com> <20221006190038.431828-1-megha.ajmera@intel.com> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Config load functions updated to support 100G rates for subport and pipes. Signed-off-by: Megha Ajmera --- examples/qos_sched/cfg_file.c | 64 +++++++++++++++++------------------ 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/examples/qos_sched/cfg_file.c b/examples/qos_sched/cfg_file.c index ca871d3287..ca60d616a1 100644 --- a/examples/qos_sched/cfg_file.c +++ b/examples/qos_sched/cfg_file.c @@ -64,67 +64,67 @@ cfg_load_pipe(struct rte_cfgfile *cfg, struct rte_sched_pipe_params *pipe_params entry = rte_cfgfile_get_entry(cfg, pipe_name, "tb rate"); if (entry) - pipe_params[j].tb_rate = (uint64_t)atoi(entry); + pipe_params[j].tb_rate = atol(entry); entry = rte_cfgfile_get_entry(cfg, pipe_name, "tb size"); if (entry) - pipe_params[j].tb_size = (uint64_t)atoi(entry); + pipe_params[j].tb_size = atol(entry); entry = rte_cfgfile_get_entry(cfg, pipe_name, "tc period"); if (entry) - pipe_params[j].tc_period = (uint64_t)atoi(entry); + pipe_params[j].tc_period = atol(entry); entry = rte_cfgfile_get_entry(cfg, pipe_name, "tc 0 rate"); if (entry) - pipe_params[j].tc_rate[0] = (uint64_t)atoi(entry); + pipe_params[j].tc_rate[0] = atol(entry); entry = rte_cfgfile_get_entry(cfg, pipe_name, "tc 1 rate"); if (entry) - pipe_params[j].tc_rate[1] = (uint64_t)atoi(entry); + pipe_params[j].tc_rate[1] = atol(entry); entry = rte_cfgfile_get_entry(cfg, pipe_name, "tc 2 rate"); if (entry) - pipe_params[j].tc_rate[2] = (uint64_t)atoi(entry); + pipe_params[j].tc_rate[2] = atol(entry); entry = rte_cfgfile_get_entry(cfg, pipe_name, "tc 3 rate"); if (entry) - pipe_params[j].tc_rate[3] = (uint64_t)atoi(entry); + pipe_params[j].tc_rate[3] = atol(entry); entry = rte_cfgfile_get_entry(cfg, pipe_name, "tc 4 rate"); if (entry) - pipe_params[j].tc_rate[4] = (uint64_t)atoi(entry); + pipe_params[j].tc_rate[4] = atol(entry); entry = rte_cfgfile_get_entry(cfg, pipe_name, "tc 5 rate"); if (entry) - pipe_params[j].tc_rate[5] = (uint64_t)atoi(entry); + pipe_params[j].tc_rate[5] = atol(entry); entry = rte_cfgfile_get_entry(cfg, pipe_name, "tc 6 rate"); if (entry) - pipe_params[j].tc_rate[6] = (uint64_t)atoi(entry); + pipe_params[j].tc_rate[6] = atol(entry); entry = rte_cfgfile_get_entry(cfg, pipe_name, "tc 7 rate"); if (entry) - pipe_params[j].tc_rate[7] = (uint64_t)atoi(entry); + pipe_params[j].tc_rate[7] = atol(entry); entry = rte_cfgfile_get_entry(cfg, pipe_name, "tc 8 rate"); if (entry) - pipe_params[j].tc_rate[8] = (uint64_t)atoi(entry); + pipe_params[j].tc_rate[8] = atol(entry); entry = rte_cfgfile_get_entry(cfg, pipe_name, "tc 9 rate"); if (entry) - pipe_params[j].tc_rate[9] = (uint64_t)atoi(entry); + pipe_params[j].tc_rate[9] = atol(entry); entry = rte_cfgfile_get_entry(cfg, pipe_name, "tc 10 rate"); if (entry) - pipe_params[j].tc_rate[10] = (uint64_t)atoi(entry); + pipe_params[j].tc_rate[10] = atol(entry); entry = rte_cfgfile_get_entry(cfg, pipe_name, "tc 11 rate"); if (entry) - pipe_params[j].tc_rate[11] = (uint64_t)atoi(entry); + pipe_params[j].tc_rate[11] = atol(entry); entry = rte_cfgfile_get_entry(cfg, pipe_name, "tc 12 rate"); if (entry) - pipe_params[j].tc_rate[12] = (uint64_t)atoi(entry); + pipe_params[j].tc_rate[12] = atol(entry); entry = rte_cfgfile_get_entry(cfg, pipe_name, "tc 12 oversubscription weight"); if (entry) @@ -165,67 +165,67 @@ cfg_load_subport_profile(struct rte_cfgfile *cfg, entry = rte_cfgfile_get_entry(cfg, sec_name, "tb rate"); if (entry) - subport_profile[i].tb_rate = (uint64_t)atoi(entry); + subport_profile[i].tb_rate = atol(entry); entry = rte_cfgfile_get_entry(cfg, sec_name, "tb size"); if (entry) - subport_profile[i].tb_size = (uint64_t)atoi(entry); + subport_profile[i].tb_size = atol(entry); entry = rte_cfgfile_get_entry(cfg, sec_name, "tc period"); if (entry) - subport_profile[i].tc_period = (uint64_t)atoi(entry); + subport_profile[i].tc_period = atol(entry); entry = rte_cfgfile_get_entry(cfg, sec_name, "tc 0 rate"); if (entry) - subport_profile[i].tc_rate[0] = (uint64_t)atoi(entry); + subport_profile[i].tc_rate[0] = atol(entry); entry = rte_cfgfile_get_entry(cfg, sec_name, "tc 1 rate"); if (entry) - subport_profile[i].tc_rate[1] = (uint64_t)atoi(entry); + subport_profile[i].tc_rate[1] = atol(entry); entry = rte_cfgfile_get_entry(cfg, sec_name, "tc 2 rate"); if (entry) - subport_profile[i].tc_rate[2] = (uint64_t)atoi(entry); + subport_profile[i].tc_rate[2] = atol(entry); entry = rte_cfgfile_get_entry(cfg, sec_name, "tc 3 rate"); if (entry) - subport_profile[i].tc_rate[3] = (uint64_t)atoi(entry); + subport_profile[i].tc_rate[3] = atol(entry); entry = rte_cfgfile_get_entry(cfg, sec_name, "tc 4 rate"); if (entry) - subport_profile[i].tc_rate[4] = (uint64_t)atoi(entry); + subport_profile[i].tc_rate[4] = atol(entry); entry = rte_cfgfile_get_entry(cfg, sec_name, "tc 5 rate"); if (entry) - subport_profile[i].tc_rate[5] = (uint64_t)atoi(entry); + subport_profile[i].tc_rate[5] = atol(entry); entry = rte_cfgfile_get_entry(cfg, sec_name, "tc 6 rate"); if (entry) - subport_profile[i].tc_rate[6] = (uint64_t)atoi(entry); + subport_profile[i].tc_rate[6] = atol(entry); entry = rte_cfgfile_get_entry(cfg, sec_name, "tc 7 rate"); if (entry) - subport_profile[i].tc_rate[7] = (uint64_t)atoi(entry); + subport_profile[i].tc_rate[7] = atol(entry); entry = rte_cfgfile_get_entry(cfg, sec_name, "tc 8 rate"); if (entry) - subport_profile[i].tc_rate[8] = (uint64_t)atoi(entry); + subport_profile[i].tc_rate[8] = atol(entry); entry = rte_cfgfile_get_entry(cfg, sec_name, "tc 9 rate"); if (entry) - subport_profile[i].tc_rate[9] = (uint64_t)atoi(entry); + subport_profile[i].tc_rate[9] = atol(entry); entry = rte_cfgfile_get_entry(cfg, sec_name, "tc 10 rate"); if (entry) - subport_profile[i].tc_rate[10] = (uint64_t)atoi(entry); + subport_profile[i].tc_rate[10] = atol(entry); entry = rte_cfgfile_get_entry(cfg, sec_name, "tc 11 rate"); if (entry) - subport_profile[i].tc_rate[11] = (uint64_t)atoi(entry); + subport_profile[i].tc_rate[11] = atol(entry); entry = rte_cfgfile_get_entry(cfg, sec_name, "tc 12 rate"); if (entry) - subport_profile[i].tc_rate[12] = (uint64_t)atoi(entry); + subport_profile[i].tc_rate[12] = atol(entry); } return 0;