From 50937e495f5bcc5985365b3b93e34b6efffeca10 Mon Sep 17 00:00:00 2001 From: Qi Zhang Date: Wed, 26 May 2021 17:53:05 +0800 Subject: [PATCH] net/iavf: fix handling of unsupported promiscuous iavf_execute_vf_cmd returns standard error code but not IAVF_xxx, The patch fix the wrong error handling in iavf_config_promisc. Fixes: 1e4d55a7fe71 ("net/iavf: optimize promiscuous device operations") Cc: stable@dpdk.org Signed-off-by: Qi Zhang Acked-by: Beilei Xing --- drivers/net/iavf/iavf_vchnl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c index 5d57e8b541..02e828f9b7 100644 --- a/drivers/net/iavf/iavf_vchnl.c +++ b/drivers/net/iavf/iavf_vchnl.c @@ -1257,8 +1257,8 @@ iavf_config_promisc(struct iavf_adapter *adapter, PMD_DRV_LOG(ERR, "fail to execute command CONFIG_PROMISCUOUS_MODE"); - if (err == IAVF_NOT_SUPPORTED) - return -ENOTSUP; + if (err == -ENOTSUP) + return err; return -EAGAIN; } -- 2.20.1