[v1] net/ice: fix DCF be configured with bandwidth limit

Message ID 20210706090007.19456-1-ting.xu@intel.com (mailing list archive)
State Rejected, archived
Delegated to: Qi Zhang
Headers
Series [v1] net/ice: fix DCF be configured with bandwidth limit |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-testing warning apply patch failure
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS

Commit Message

Xu, Ting July 6, 2021, 9 a.m. UTC
  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 <ting.xu@intel.com>
---
 drivers/net/ice/ice_dcf_sched.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
  

Patch

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;