From: Wei Zhao <wei.zhao1@intel.com>
To: dev@dpdk.org
Cc: stable@dpdk.org, qi.z.zhang@intel.com, yuan.peng@intel.com,
Wei Zhao <wei.zhao1@intel.com>
Subject: [dpdk-dev] [PATCH] net/i40e: fix queue region error in priority configuration
Date: Tue, 22 Jan 2019 16:11:03 +0800 [thread overview]
Message-ID: <1548144663-3735-1-git-send-email-wei.zhao1@intel.com> (raw)
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
next reply other threads:[~2019-01-22 8:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-22 8:11 Wei Zhao [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1548144663-3735-1-git-send-email-wei.zhao1@intel.com \
--to=wei.zhao1@intel.com \
--cc=dev@dpdk.org \
--cc=qi.z.zhang@intel.com \
--cc=stable@dpdk.org \
--cc=yuan.peng@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).