From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D08B8440F0; Tue, 28 May 2024 09:05:31 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A4500402D2; Tue, 28 May 2024 09:05:31 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 416DE40150 for ; Tue, 28 May 2024 09:05:30 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 44RKlJ5E022435 for ; Tue, 28 May 2024 00:05:29 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=pfpt0220; bh=O q5TChvSvRtqsMU1c4G1J5v3TyNLNYRfboHTToMfp5A=; b=F0xapwbWVNmbGGh+G l1k6sGPY6h1kxQ96kcR+7bOF2XVdIND0WnpAKqZjfx4oJl8FaD0n7jr7Cieb34dR Sh6fGwNaGtET1WGZ4znsd2xfBdjXEUIl4oVECX5Iv4qHJKMXQ6s933pYFInFIgmU KHKovdQP9eCiAtlgPfqazViAPboZct4uj+lMbLaN6xSo+i8kdqZaPh7cdqmAkqX9 nVvj8uCAiEfiDCOUdF/oSidswD5fmokNG9rcngigBaH5ixdk6QzfZPG7pdwjPm1m 7qCpY/WqKyOvBc0ckTNt4m8l/Yn06KUQ4Zek9z5ZC9kaJjqlaSzzqoeCVonkxL/Q 94wug== Received: from dc5-exch05.marvell.com ([199.233.59.128]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3ycm8gvgub-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 28 May 2024 00:05:28 -0700 (PDT) Received: from DC5-EXCH05.marvell.com (10.69.176.209) by DC5-EXCH05.marvell.com (10.69.176.209) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Tue, 28 May 2024 00:05:27 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH05.marvell.com (10.69.176.209) with Microsoft SMTP Server id 15.2.1544.4 via Frontend Transport; Tue, 28 May 2024 00:05:27 -0700 Received: from hyd1588t430.caveonetworks.com (unknown [10.29.52.204]) by maili.marvell.com (Postfix) with ESMTP id 8BCC93F7099; Tue, 28 May 2024 00:05:25 -0700 (PDT) From: Nithin Dabilpuram To: Nithin Dabilpuram , Kiran Kumar K , Sunil Kumar Kori , Satha Rao , Harman Kalra CC: , Subject: [PATCH v2 01/10] common/cnxk: sync VF root weight with kernel Date: Tue, 28 May 2024 12:35:13 +0530 Message-ID: <20240528070522.3857626-1-ndabilpuram@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240517074448.3146611-1-ndabilpuram@marvell.com> References: <20240517074448.3146611-1-ndabilpuram@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: HNl8hewkrB0VMh3nhTm9nHW5-n56OoYa X-Proofpoint-ORIG-GUID: HNl8hewkrB0VMh3nhTm9nHW5-n56OoYa X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.12.28.16 definitions=2024-05-28_04,2024-05-27_01,2024-05-17_01 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 From: Satha Rao By default set VF root scheduling weight same as other kernel configured VFs. Also fix a compilation issue when cflags has -Werror=shadow=compatible-local. Signed-off-by: Satha Rao --- v2: - Added fixes tag to 9/10 and documentation to 10/10, 6/10 patches drivers/common/cnxk/roc_nix.h | 1 + drivers/common/cnxk/roc_nix_queue.c | 3 ++- drivers/common/cnxk/roc_nix_tm.c | 6 +++++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/common/cnxk/roc_nix.h b/drivers/common/cnxk/roc_nix.h index bd3e540f45..63bcd5b25e 100644 --- a/drivers/common/cnxk/roc_nix.h +++ b/drivers/common/cnxk/roc_nix.h @@ -473,6 +473,7 @@ struct roc_nix { bool force_rx_aura_bp; bool custom_meta_aura_ena; bool rx_inj_ena; + uint32_t root_sched_weight; /* End of input parameters */ /* LMT line base for "Per Core Tx LMT line" mode*/ uintptr_t lmt_base; diff --git a/drivers/common/cnxk/roc_nix_queue.c b/drivers/common/cnxk/roc_nix_queue.c index ae4e0ea40c..f5441e0e6b 100644 --- a/drivers/common/cnxk/roc_nix_queue.c +++ b/drivers/common/cnxk/roc_nix_queue.c @@ -1030,7 +1030,8 @@ sqb_pool_populate(struct roc_nix *roc_nix, struct roc_nix_sq *sq) thr = PLT_DIV_CEIL((nb_sqb_bufs * ROC_NIX_SQB_THRESH), 100); nb_sqb_bufs += NIX_SQB_PREFETCH; /* Clamp up the SQB count */ - nb_sqb_bufs = PLT_MIN(roc_nix->max_sqb_count, (uint16_t)PLT_MAX(NIX_DEF_SQB, nb_sqb_bufs)); + nb_sqb_bufs = PLT_MAX(NIX_DEF_SQB, nb_sqb_bufs); + nb_sqb_bufs = PLT_MIN(roc_nix->max_sqb_count, (uint16_t)nb_sqb_bufs); sq->nb_sqb_bufs = nb_sqb_bufs; sq->sqes_per_sqb_log2 = (uint16_t)plt_log2_u32(sqes_per_sqb); diff --git a/drivers/common/cnxk/roc_nix_tm.c b/drivers/common/cnxk/roc_nix_tm.c index 4e6a28f827..ac522f8235 100644 --- a/drivers/common/cnxk/roc_nix_tm.c +++ b/drivers/common/cnxk/roc_nix_tm.c @@ -1589,7 +1589,11 @@ nix_tm_prepare_default_tree(struct roc_nix *roc_nix) node->id = nonleaf_id; node->parent_id = parent; node->priority = 0; - node->weight = NIX_TM_DFLT_RR_WT; + /* Default VF root RR_QUANTUM is in sync with kernel */ + if (lvl == ROC_TM_LVL_ROOT && !nix_tm_have_tl1_access(nix)) + node->weight = roc_nix->root_sched_weight; + else + node->weight = NIX_TM_DFLT_RR_WT; node->shaper_profile_id = ROC_NIX_TM_SHAPER_PROFILE_NONE; node->lvl = lvl; node->tree = ROC_NIX_TM_DEFAULT; -- 2.25.1