Skip to contentSkip to conversation

net/iavf: fix error handle for unsupported promisc configure

PATCH In review Qi Zhang 2 participants 3 messages May 26, 2021 – Jun 1, 2021 Network drivers

lore
Share & tools
lore

Qi Zhang

author
#0 lore raw

PATCH 1/1 net/iavf: fix error handle for unsupported promisc configure

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")
---
 drivers/net/iavf/iavf_vchnl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/iavf/iavf_vchnl.c +2 -2
index 5d57e8b541..02e828f9b7 100644
@@ -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;
 	}
Signature · 1 line
2.26.2
Acked-by on v1 1/1
#1 lore raw
Quoted 35 lines

-----Original Message-----
From: Zhang, Qi Z <[email protected]>
Sent: Wednesday, May 26, 2021 5:53 PM
To: Xing, Beilei <[email protected]>
Cc: [email protected]; Zhang, Qi Z <[email protected]>; [email protected]
Subject: [PATCH] net/iavf: fix error handle for unsupported promisc configure

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")
---
 drivers/net/iavf/iavf_vchnl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/iavf/iavf_vchnl.c index renamed from drivers/net/iavf/iavf_vchnl.c +0 -0

5d57e8b541..02e828f9b7 100644

drivers/net/iavf/iavf_vchnl.c +2 -2
@@ -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;
Quoted 3 lines

}
--
2.26.2

author Applied
#2 lore raw
Quoted 47 lines

-----Original Message-----
From: Xing, Beilei <[email protected]>
Sent: Thursday, May 27, 2021 9:54 AM
To: Zhang, Qi Z <[email protected]>
Cc: [email protected]; [email protected]
Subject: RE: [PATCH] net/iavf: fix error handle for unsupported promisc configure

Quoted 35 lines

-----Original Message-----
From: Zhang, Qi Z <[email protected]>
Sent: Wednesday, May 26, 2021 5:53 PM
To: Xing, Beilei <[email protected]>
Cc: [email protected]; Zhang, Qi Z <[email protected]>; [email protected]
Subject: [PATCH] net/iavf: fix error handle for unsupported promisc configure

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: [email protected]

---
 drivers/net/iavf/iavf_vchnl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
(quoted diff) +0 -0

b/drivers/net/iavf/iavf_vchnl.c index
5d57e8b541..02e828f9b7 100644

drivers/net/iavf/iavf_vchnl.c +2 -2
@@ -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;
 
Quoted 6 lines
Quoted 4 lines
drivers/net/iavf/iavf_vchnl.c +0 -0
 		return -EAGAIN;

}
--
2.26.2

Applied to dpdk-next-net-intel.

Thanks
Qi

Quoted 1 line