From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 84E90460E2; Tue, 28 Jan 2025 02:35:25 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6F78D40DFB; Tue, 28 Jan 2025 02:35:25 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 6191940DD1 for ; Tue, 28 Jan 2025 02:35:23 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1202) id A35352037171; Mon, 27 Jan 2025 17:35:22 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com A35352037171 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxonhyperv.com; s=default; t=1738028122; bh=9wwvYutofdUpq07ukXULUZYu04as6HnnRvmIjonlCQ8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hb3soSrvK2YePbuRKWZW5F+ZysGxsTq3HKsey+UTBPy8z/FvaPJmSNrCl6aKAByy1 UpqkgIzZxe28HE9uN1mOo6oK3dSPi25cU0ZEjLVujWgkIVjvSGnU5k7I9cGJuqxO+G P0EMymtQtsil5auqq4BI0XUvW2O48ZDsgTikfF1w= From: longli@linuxonhyperv.com To: Ferruh Yigit , Andrew Rybchenko , Wei Hu Cc: dev@dpdk.org, Long Li Subject: [PATCH 3/4] net/netvsc: log error on failure to switch data path Date: Mon, 27 Jan 2025 17:35:05 -0800 Message-Id: <1738028106-25239-3-git-send-email-longli@linuxonhyperv.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1738028106-25239-1-git-send-email-longli@linuxonhyperv.com> References: <1738028106-25239-1-git-send-email-longli@linuxonhyperv.com> X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Long Li 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 --- 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