src/dpdk/drivers/net/ice/ice_fdir_filter.c
static void
ice_fdir_prof_rm(struct ice_pf *pf, enum ice_fltr_ptype ptype, bool is_tunnel)
{
	struct ice_hw *hw = ICE_PF_TO_HW(pf);
	struct ice_fd_hw_prof *hw_prof;
	uint64_t prof_id;
	uint16_t vsi_num;
	int i;

	if (!hw->fdir_prof || !hw->fdir_prof[ptype])
		return;

	hw_prof = hw->fdir_prof[ptype];

	prof_id = ptype + is_tunnel * ICE_FLTR_PTYPE_MAX;
	for (i = 0; i < pf->hw_prof_cnt[ptype][is_tunnel]; i++) {
		if (hw_prof->entry_h[i][is_tunnel]) {
			vsi_num = ice_get_hw_vsi_num(hw,
						     hw_prof->vsi_h[i]);
			ice_rem_prof_id_flow(hw, ICE_BLK_FD,
					     vsi_num, ptype);
			ice_flow_rem_entry(hw, ICE_BLK_FD,
					   hw_prof->entry_h[i][is_tunnel]);
			hw_prof->entry_h[i][is_tunnel] = 0;
		}
	}
	ice_flow_rem_prof(hw, ICE_BLK_FD, prof_id);
	rte_free(hw_prof->fdir_seg[is_tunnel]);
	hw_prof->fdir_seg[is_tunnel] = NULL;

	for (i = 0; i < hw_prof->cnt; i++)
		hw_prof->vsi_h[i] = 0;
	pf->hw_prof_cnt[ptype][is_tunnel] = 0;
}
/* Remove a profile for some filter type */
Remove a profile for some filter type
Remove a profile for some filter type
static void
ice_fdir_prof_rm(struct ice_pf *pf, enum ice_fltr_ptype ptype, bool is_tunnel)
{
	struct ice_hw *hw = ICE_PF_TO_HW(pf);
	struct ice_fd_hw_prof *hw_prof;
	uint64_t prof_id;
	uint16_t vsi_num;
	int i;
	if (!hw->fdir_prof || !hw->fdir_prof[ptype])
		return;
	hw_prof = hw->fdir_prof[ptype];
	prof_id = ptype + is_tunnel * ICE_FLTR_PTYPE_MAX;
	for (i = 0; i < pf->hw_prof_cnt[ptype][is_tunnel]; i++) {
		if (hw_prof->entry_h[i][is_tunnel]) {
			vsi_num = ice_get_hw_vsi_num(hw,
						     hw_prof->vsi_h[i]);
			ice_rem_prof_id_flow(hw, ICE_BLK_FD,
					     vsi_num, ptype);
			ice_flow_rem_entry(hw, ICE_BLK_FD,
					   hw_prof->entry_h[i][is_tunnel]);
			hw_prof->entry_h[i][is_tunnel] = 0;
		}
	}
	ice_flow_rem_prof(hw, ICE_BLK_FD, prof_id);
	rte_free(hw_prof->fdir_seg[is_tunnel]);
	hw_prof->fdir_seg[is_tunnel] = NULL;
	for (i = 0; i < hw_prof->cnt; i++)
		hw_prof->vsi_h[i] = 0;
	pf->hw_prof_cnt[ptype][is_tunnel] = 0;
}
static void ice_fdir_prof_rm ( struct ice_pf * pf , enum ice_fltr_ptype ptype , bool is_tunnel ) { struct ice_hw * hw = ICE_PF_TO_HW ( pf ) ; struct ice_fd_hw_prof * hw_prof ; uint64_t prof_id ; uint16_t vsi_num ; int i ; if ( ! hw -> fdir_prof || ! hw -> fdir_prof [ ptype ] ) return ; hw_prof = hw -> fdir_prof [ ptype ] ; prof_id = ptype + is_tunnel * ICE_FLTR_PTYPE_MAX ; for ( i = 0 ; i < pf -> hw_prof_cnt [ ptype ] [ is_tunnel ] ; i ++ ) { if ( hw_prof -> entry_h [ i ] [ is_tunnel ] ) { vsi_num = ice_get_hw_vsi_num ( hw , hw_prof -> vsi_h [ i ] ) ; ice_rem_prof_id_flow ( hw , ICE_BLK_FD , vsi_num , ptype ) ; ice_flow_rem_entry ( hw , ICE_BLK_FD , hw_prof -> entry_h [ i ] [ is_tunnel ] ) ; hw_prof -> entry_h [ i ] [ is_tunnel ] = 0 ; } } ice_flow_rem_prof ( hw , ICE_BLK_FD , prof_id ) ; rte_free ( hw_prof -> fdir_seg [ is_tunnel ] ) ; hw_prof -> fdir_seg [ is_tunnel ] = NULL ; for ( i = 0 ; i < hw_prof -> cnt ; i ++ ) hw_prof -> vsi_h [ i ] = 0 ; pf -> hw_prof_cnt [ ptype ] [ is_tunnel ] = 0 ; }
Remove a profile for some filter type
Remove a profile for some filter type