From: peng1x.zhang@intel.com
To: qiming.yang@intel.com, qi.z.zhang@intel.com,
yidingx.zhou@intel.com, dev@dpdk.org
Cc: Peng Zhang <peng1x.zhang@intel.com>, stable@dpdk.org
Subject: [PATCH] net/ice: Modify DCF state checking mechanism and error code
Date: Thu, 5 May 2022 15:39:32 +0000 [thread overview]
Message-ID: <20220505153932.401749-1-peng1x.zhang@intel.com> (raw)
From: Peng Zhang <peng1x.zhang@intel.com>
Add DCF state checking mechanism which will conduct whether reset is
done.And modify error code to avoid misleading.
Fixes: b71573ec2fc2 ("net/ice: retry getting VF VSI map after failure")
Cc: stable@dpdk.org
Signed-off-by: Peng Zhang <peng1x.zhang@intel.com>
---
drivers/net/ice/ice_dcf.c | 3 ++-
drivers/net/ice/ice_switch_filter.c | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ice/ice_dcf.c b/drivers/net/ice/ice_dcf.c
index 7f0c074b01..3808272ea3 100644
--- a/drivers/net/ice/ice_dcf.c
+++ b/drivers/net/ice/ice_dcf.c
@@ -544,7 +544,8 @@ ice_dcf_handle_vsi_update_event(struct ice_dcf_hw *hw)
for (;;) {
if (ice_dcf_get_vf_resource(hw) == 0 &&
- ice_dcf_get_vf_vsi_map(hw) >= 0) {
+ ice_dcf_get_vf_vsi_map(hw) >= 0 &&
+ ice_dcf_check_reset_done(hw) == 0) {
err = 0;
break;
}
diff --git a/drivers/net/ice/ice_switch_filter.c b/drivers/net/ice/ice_switch_filter.c
index 36c9bffb73..199a981018 100644
--- a/drivers/net/ice/ice_switch_filter.c
+++ b/drivers/net/ice/ice_switch_filter.c
@@ -434,7 +434,7 @@ ice_switch_create(struct ice_adapter *ad,
flow->rule = filter_conf_ptr;
} else {
if (ice_dcf_adminq_need_retry(ad))
- ret = -EAGAIN;
+ ret = -EBUSY;
else
ret = -EINVAL;
--
2.25.1
next reply other threads:[~2022-05-05 7:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-05 15:39 peng1x.zhang [this message]
2022-05-07 7:10 ` Zhang, Qi Z
2022-05-07 7:29 ` Zhang, Peng1X
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=20220505153932.401749-1-peng1x.zhang@intel.com \
--to=peng1x.zhang@intel.com \
--cc=dev@dpdk.org \
--cc=qi.z.zhang@intel.com \
--cc=qiming.yang@intel.com \
--cc=stable@dpdk.org \
--cc=yidingx.zhou@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).