src/dpdk/drivers/net/ice/base/ice_fdir.c
struct ice_fdir_fltr *
ice_fdir_find_fltr_by_idx(struct ice_hw *hw, u32 fltr_idx)
{
	struct ice_fdir_fltr *rule;

	LIST_FOR_EACH_ENTRY(rule, &hw->fdir_list_head, ice_fdir_fltr,
			    fltr_node) {
		/* rule ID found in the list */
		if (fltr_idx == rule->fltr_id)
			return rule;
		if (fltr_idx < rule->fltr_id)
			break;
	}
	return NULL;
}
/**
 * ice_fdir_find_by_idx - find filter with idx
 * @hw: pointer to hardware structure
 * @fltr_idx: index to find.
 *
 * Returns pointer to filter if found or null
 */
find filter with idx
@hw: pointer to hardware structure
@fltr_idx: index to find.

Returns pointer to filter if found or null
find filter with idx @hw : pointer to hardware structure @fltr_idx : index to find . Returns pointer to filter if found or null
struct ice_fdir_fltr *
ice_fdir_find_fltr_by_idx(struct ice_hw *hw, u32 fltr_idx)
{
	struct ice_fdir_fltr *rule;
	LIST_FOR_EACH_ENTRY(rule, &hw->fdir_list_head, ice_fdir_fltr,
			    fltr_node) {
		if (fltr_idx == rule->fltr_id)
			return rule;
		if (fltr_idx < rule->fltr_id)
			break;
	}
	return NULL;
}
struct ice_fdir_fltr * ice_fdir_find_fltr_by_idx ( struct ice_hw * hw , u32 fltr_idx ) { struct ice_fdir_fltr * rule ; LIST_FOR_EACH_ENTRY ( rule , & hw -> fdir_list_head , ice_fdir_fltr , fltr_node ) { if ( fltr_idx == rule -> fltr_id ) return rule ; if ( fltr_idx < rule -> fltr_id ) break ; } return NULL ; }
ice_fdir_find_by_idx - find filter with idx
 @hw: pointer to hardware structure
 @fltr_idx: index to find.
ice_fdir_find_by_idx - find filter with idx @hw : pointer to hardware structure @fltr_idx : index to find .
/* rule ID found in the list */