DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/i40e: fix queue region error in priority configuration
@ 2019-01-22  8:11 Wei Zhao
  2019-01-22  9:31 ` Zhao1, Wei
  2019-01-22 12:48 ` Zhang, Qi Z
  0 siblings, 2 replies; 5+ messages in thread
From: Wei Zhao @ 2019-01-22  8:11 UTC (permalink / raw)
  To: dev; +Cc: stable, qi.z.zhang, yuan.peng, Wei Zhao

There is no need to set vlan priority realted resigsters
when there is no configuration about that in queue region.

Fixes: 7cbecc2f7424 ("net/i40e: support queue region set and flush")
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
---
 drivers/net/i40e/rte_pmd_i40e.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/drivers/net/i40e/rte_pmd_i40e.c b/drivers/net/i40e/rte_pmd_i40e.c
index 7ce5d02..c49c872 100644
--- a/drivers/net/i40e/rte_pmd_i40e.c
+++ b/drivers/net/i40e/rte_pmd_i40e.c
@@ -2818,13 +2818,23 @@ i40e_queue_region_dcb_configure(struct i40e_hw *hw,
 	struct i40e_dcbx_config *old_cfg = &hw->local_dcbx_config;
 	int32_t ret = -EINVAL;
 	uint16_t i, j, prio_index, region_index;
-	uint8_t tc_map, tc_bw, bw_lf;
+	uint8_t tc_map, tc_bw, bw_lf, dcb_flag = 0;
 
 	if (!info->queue_region_number) {
 		PMD_DRV_LOG(ERR, "No queue region been set before");
 		return ret;
 	}
 
+	for (i = 0; i < info->queue_region_number; i++) {
+		if (info->region[i].user_priority_num) {
+			dcb_flag = 1;
+			break;
+		}
+	}
+
+	if (dcb_flag == 0)
+		return 0;
+
 	dcb_cfg = &dcb_cfg_local;
 	memset(dcb_cfg, 0, sizeof(struct i40e_dcbx_config));
 
-- 
2.7.5

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-01-23  1:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-22  8:11 [dpdk-dev] [PATCH] net/i40e: fix queue region error in priority configuration Wei Zhao
2019-01-22  9:31 ` Zhao1, Wei
2019-01-22 12:48 ` Zhang, Qi Z
2019-01-22 16:33   ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
2019-01-23  1:56     ` Zhang, Qi Z

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).