Commit f3b9da31 authored by Haiyue Wang's avatar Haiyue Wang Committed by Tony Nguyen

iavf: enhance the duplicated FDIR list scan handling

When the FDIR entry is found, just return the result directly to break
the loop.
Signed-off-by: default avatarHaiyue Wang <haiyue.wang@intel.com>
Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
parent f995f95a
...@@ -713,7 +713,6 @@ void iavf_print_fdir_fltr(struct iavf_adapter *adapter, struct iavf_fdir_fltr *f ...@@ -713,7 +713,6 @@ void iavf_print_fdir_fltr(struct iavf_adapter *adapter, struct iavf_fdir_fltr *f
bool iavf_fdir_is_dup_fltr(struct iavf_adapter *adapter, struct iavf_fdir_fltr *fltr) bool iavf_fdir_is_dup_fltr(struct iavf_adapter *adapter, struct iavf_fdir_fltr *fltr)
{ {
struct iavf_fdir_fltr *tmp; struct iavf_fdir_fltr *tmp;
bool ret = false;
list_for_each_entry(tmp, &adapter->fdir_list_head, list) { list_for_each_entry(tmp, &adapter->fdir_list_head, list) {
if (tmp->flow_type != fltr->flow_type) if (tmp->flow_type != fltr->flow_type)
...@@ -724,13 +723,11 @@ bool iavf_fdir_is_dup_fltr(struct iavf_adapter *adapter, struct iavf_fdir_fltr * ...@@ -724,13 +723,11 @@ bool iavf_fdir_is_dup_fltr(struct iavf_adapter *adapter, struct iavf_fdir_fltr *
!memcmp(&tmp->ip_data, &fltr->ip_data, !memcmp(&tmp->ip_data, &fltr->ip_data,
sizeof(fltr->ip_data)) && sizeof(fltr->ip_data)) &&
!memcmp(&tmp->ext_data, &fltr->ext_data, !memcmp(&tmp->ext_data, &fltr->ext_data,
sizeof(fltr->ext_data))) { sizeof(fltr->ext_data)))
ret = true; return true;
break;
}
} }
return ret; return false;
} }
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment