[dpdk-dev] [PATCH v2 44/66] net/ice/base: check RSS flow profile list

Leyi Rong leyi.rong at intel.com
Tue Jun 11 17:51:59 CEST 2019


Minor change to check if there are any RSS flow profiles to remove.
This will avoid flow profile lock acquisition and release
if the list is empty.

Signed-off-by: Vignesh Sridhar <vignesh.sridhar at intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr at intel.com>
Signed-off-by: Leyi Rong <leyi.rong at intel.com>
---
 drivers/net/ice/base/ice_flow.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/ice/base/ice_flow.c b/drivers/net/ice/base/ice_flow.c
index 0dad62010..b25f30c3f 100644
--- a/drivers/net/ice/base/ice_flow.c
+++ b/drivers/net/ice/base/ice_flow.c
@@ -1690,6 +1690,9 @@ enum ice_status ice_rem_vsi_rss_cfg(struct ice_hw *hw, u16 vsi_handle)
 	if (!ice_is_vsi_valid(hw, vsi_handle))
 		return ICE_ERR_PARAM;
 
+	if (LIST_EMPTY(&hw->fl_profs[blk]))
+		return ICE_SUCCESS;
+
 	ice_acquire_lock(&hw->fl_profs_locks[blk]);
 	LIST_FOR_EACH_ENTRY_SAFE(p, t, &hw->fl_profs[blk], ice_flow_prof,
 				 l_entry) {
-- 
2.17.1



More information about the dev mailing list