From patchwork Tue Jul 6 09:00:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Xu, Ting" X-Patchwork-Id: 95339 X-Patchwork-Delegate: qi.z.zhang@intel.com 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 34217A0C47; Tue, 6 Jul 2021 10:57:09 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1C34D4124B; Tue, 6 Jul 2021 10:57:09 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id 881284067E; Tue, 6 Jul 2021 10:57:07 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10036"; a="189458568" X-IronPort-AV: E=Sophos;i="5.83,328,1616482800"; d="scan'208";a="189458568" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jul 2021 01:57:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.83,328,1616482800"; d="scan'208";a="496527608" Received: from dpdk-xuting-second.sh.intel.com ([10.67.116.193]) by fmsmga002.fm.intel.com with ESMTP; 06 Jul 2021 01:57:04 -0700 From: Ting Xu To: dev@dpdk.org Cc: qi.z.zhang@intel.com, jingjing.wu@intel.com, beilei.xing@intel.com, Ting Xu , stable@dpdk.org Date: Tue, 6 Jul 2021 17:00:07 +0800 Message-Id: <20210706090007.19456-1-ting.xu@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dpdk-dev] [PATCH v1] net/ice: fix DCF be configured with bandwidth limit 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 Sender: "dev" When configuring QoS Tx bandwidth limit, DCF (VF0) is taken into account and its bandwidth may be configured as well. Since DCF does not handle traffic, it is no need to configure its bandwidth, which could even have negative influence on other VFs bandwidth configuration. This patch just skips the step to configure DCF bandwidth. Fixes: 3a5a5bfc618b ("net/ice: support QoS config VF bandwidth in DCF") Cc: stable@dpdk.org Signed-off-by: Ting Xu --- drivers/net/ice/ice_dcf_sched.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/ice/ice_dcf_sched.c b/drivers/net/ice/ice_dcf_sched.c index 4371bbc820..875b563bfc 100644 --- a/drivers/net/ice/ice_dcf_sched.c +++ b/drivers/net/ice/ice_dcf_sched.c @@ -690,7 +690,10 @@ static int ice_dcf_hierarchy_commit(struct rte_eth_dev *dev, VIRTCHNL_DCF_BW_PIR | VIRTCHNL_DCF_BW_CIR; } - for (vf_id = 0; vf_id < hw->num_vfs; vf_id++) { + /* start with VF1, skip VF0 since DCF does not need to configure + * bandwidth for itself + */ + for (vf_id = 1; vf_id < hw->num_vfs; vf_id++) { num_elem = 0; vf_bw->vf_id = vf_id; vf_bw->node_type = VIRTCHNL_DCF_TARGET_VF_BW;