[35/52] net/ice/base: correct return value
diff mbox series

Message ID 20200603024016.30636-36-qi.z.zhang@intel.com
State Superseded, archived
Delegated to: xiaolong ye
Headers show
Series
  • net/ice: base code update
Related show

Checks

Context Check Description
ci/Intel-compilation success Compilation OK
ci/checkpatch success coding style OK

Commit Message

Qi Zhang June 3, 2020, 2:39 a.m. UTC
Function ice_rem_adv_rule_id return incorrect error code (ICE_ERR_PARAM)
whereas it should have returned ICE_ERR_DOES_NOT_EXIST return code
if filter list is empty or unable to find "rule" in list

Signed-off-by: Kiran Patil <kiran.patil@intel.com>
Signed-off-by: Paul M. Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/base/ice_switch.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Patil, Kiran June 3, 2020, 2:47 a.m. UTC | #1
ACK

-----Original Message-----
From: Zhang, Qi Z <qi.z.zhang@intel.com> 
Sent: Tuesday, June 2, 2020 7:40 PM
To: Yang, Qiming <qiming.yang@intel.com>
Cc: dev@dpdk.org; Ye, Xiaolong <xiaolong.ye@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>; Patil, Kiran <kiran.patil@intel.com>; Stillwell Jr, Paul M <paul.m.stillwell.jr@intel.com>
Subject: [PATCH 35/52] net/ice/base: correct return value

Function ice_rem_adv_rule_id return incorrect error code (ICE_ERR_PARAM) whereas it should have returned ICE_ERR_DOES_NOT_EXIST return code if filter list is empty or unable to find "rule" in list

Signed-off-by: Kiran Patil <kiran.patil@intel.com>
Signed-off-by: Paul M. Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/base/ice_switch.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c
index 01dcace55..5c53b9ec3 100644
--- a/drivers/net/ice/base/ice_switch.c
+++ b/drivers/net/ice/base/ice_switch.c
@@ -7661,7 +7661,8 @@ ice_rem_adv_rule_by_id(struct ice_hw *hw,
 						list_itr->lkups_cnt, &rinfo);
 		}
 	}
-	return ICE_ERR_PARAM;
+	/* either list is empty or unable to find rule */
+	return ICE_ERR_DOES_NOT_EXIST;
 }
 
 /**
--
2.13.6

Patch
diff mbox series

diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c
index 01dcace55..5c53b9ec3 100644
--- a/drivers/net/ice/base/ice_switch.c
+++ b/drivers/net/ice/base/ice_switch.c
@@ -7661,7 +7661,8 @@  ice_rem_adv_rule_by_id(struct ice_hw *hw,
 						list_itr->lkups_cnt, &rinfo);
 		}
 	}
-	return ICE_ERR_PARAM;
+	/* either list is empty or unable to find rule */
+	return ICE_ERR_DOES_NOT_EXIST;
 }
 
 /**