From: longli@linuxonhyperv.com
To: Ferruh Yigit <ferruh.yigit@amd.com>,
Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,
Wei Hu <weh@microsoft.com>
Cc: dev@dpdk.org, Long Li <longli@microsoft.com>
Subject: [PATCH 3/4] net/netvsc: log error on failure to switch data path
Date: Mon, 27 Jan 2025 17:35:05 -0800 [thread overview]
Message-ID: <1738028106-25239-3-git-send-email-longli@linuxonhyperv.com> (raw)
In-Reply-To: <1738028106-25239-1-git-send-email-longli@linuxonhyperv.com>
From: Long Li <longli@microsoft.com>
There is no recovery code path if netvsc failed to switch data path.
Log an error in this case for troubleshooting.
Signed-off-by: Long Li <longli@microsoft.com>
---
drivers/net/netvsc/hn_vf.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/netvsc/hn_vf.c b/drivers/net/netvsc/hn_vf.c
index 5d8058774d..4ff766ec8b 100644
--- a/drivers/net/netvsc/hn_vf.c
+++ b/drivers/net/netvsc/hn_vf.c
@@ -316,8 +316,9 @@ static void hn_vf_remove(struct hn_data *hv)
} else {
/* Stop incoming packets from arriving on VF */
ret = hn_nvs_set_datapath(hv, NVS_DATAPATH_SYNTHETIC);
- if (ret == 0)
- hv->vf_ctx.vf_vsc_switched = false;
+ if (ret)
+ PMD_DRV_LOG(ERR, "Failed to switch to synthetic");
+ hv->vf_ctx.vf_vsc_switched = false;
}
rte_rwlock_write_unlock(&hv->vf_lock);
}
--
2.34.1
next prev parent reply other threads:[~2025-01-28 1:35 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-28 1:35 [PATCH 1/4] net/netvsc: scan all net devices under the PCI device longli
2025-01-28 1:35 ` [PATCH 2/4] net/netvsc: remove RTE device if all its net devices are removed longli
2025-01-28 1:35 ` longli [this message]
2025-01-28 1:35 ` [PATCH 4/4] net/netvsc: cache device parameters for hot plug events longli
2025-01-28 21:00 ` Stephen Hemminger
2025-01-29 0:10 ` [EXTERNAL] " Long Li
2025-01-29 0:31 ` Stephen Hemminger
2025-01-29 0:54 ` Long Li
2025-01-30 3:59 ` Stephen Hemminger
2025-01-28 21:01 ` Stephen Hemminger
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=1738028106-25239-3-git-send-email-longli@linuxonhyperv.com \
--to=longli@linuxonhyperv.com \
--cc=andrew.rybchenko@oktetlabs.ru \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@amd.com \
--cc=longli@microsoft.com \
--cc=weh@microsoft.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).