src/dpdk/drivers/net/qede/base/ecore_sriov.c
static void ecore_iov_free_vf_igu_sbs(struct ecore_hwfn *p_hwfn,
				      struct ecore_ptt *p_ptt,
				      struct ecore_vf_info *vf)
{
	struct ecore_igu_info *p_info = p_hwfn->hw_info.p_igu_info;
	int idx, igu_id;
	u32 addr, val;

	/* Invalidate igu CAM lines and mark them as free */
	for (idx = 0; idx < vf->num_sbs; idx++) {
		igu_id = vf->igu_sbs[idx];
		addr = IGU_REG_MAPPING_MEMORY + sizeof(u32) * igu_id;

		val = ecore_rd(p_hwfn, p_ptt, addr);
		SET_FIELD(val, IGU_MAPPING_LINE_VALID, 0);
		ecore_wr(p_hwfn, p_ptt, addr, val);

		p_info->entry[igu_id].status |= ECORE_IGU_STATUS_FREE;
		p_hwfn->hw_info.p_igu_info->usage.free_cnt_iov++;
	}

	vf->num_sbs = 0;
}
/**
 *
 * @brief The function invalidates all the VF entries,
 *        technically this isn't required, but added for
 *        cleaness and ease of debugging incase a VF attempts to
 *        produce an interrupt after it has been taken down.
 *
 * @param p_hwfn
 * @param p_ptt
 * @param vf
 */
@brief The function invalidates all the VF entries,
technically this isn't required, but added for
cleaness and ease of debugging incase a VF attempts to
produce an interrupt after it has been taken down.


@brief The function invalidates all the VF entries technically this isn ' t required but added for cleaness and ease of debugging incase a VF attempts to produce an interrupt after it has been taken down .
static void ecore_iov_free_vf_igu_sbs(struct ecore_hwfn *p_hwfn,
				      struct ecore_ptt *p_ptt,
				      struct ecore_vf_info *vf)
{
	struct ecore_igu_info *p_info = p_hwfn->hw_info.p_igu_info;
	int idx, igu_id;
	u32 addr, val;
	for (idx = 0; idx < vf->num_sbs; idx++) {
		igu_id = vf->igu_sbs[idx];
		addr = IGU_REG_MAPPING_MEMORY + sizeof(u32) * igu_id;
		val = ecore_rd(p_hwfn, p_ptt, addr);
		SET_FIELD(val, IGU_MAPPING_LINE_VALID, 0);
		ecore_wr(p_hwfn, p_ptt, addr, val);
		p_info->entry[igu_id].status |= ECORE_IGU_STATUS_FREE;
		p_hwfn->hw_info.p_igu_info->usage.free_cnt_iov++;
	}
	vf->num_sbs = 0;
}
static void ecore_iov_free_vf_igu_sbs ( struct ecore_hwfn * p_hwfn , struct ecore_ptt * p_ptt , struct ecore_vf_info * vf ) { struct ecore_igu_info * p_info = p_hwfn -> hw_info . p_igu_info ; int idx , igu_id ; u32 addr , val ; for ( idx = 0 ; idx < vf -> num_sbs ; idx ++ ) { igu_id = vf -> igu_sbs [ idx ] ; addr = IGU_REG_MAPPING_MEMORY + sizeof ( u32 ) * igu_id ; val = ecore_rd ( p_hwfn , p_ptt , addr ) ; SET_FIELD ( val , IGU_MAPPING_LINE_VALID , 0 ) ; ecore_wr ( p_hwfn , p_ptt , addr , val ) ; p_info -> entry [ igu_id ] . status |= ECORE_IGU_STATUS_FREE ; p_hwfn -> hw_info . p_igu_info -> usage . free_cnt_iov ++ ; } vf -> num_sbs = 0 ; }
@brief The function invalidates all the VF entries,
        technically this isn't required, but added for
        cleaness and ease of debugging incase a VF attempts to
        produce an interrupt after it has been taken down.
@brief The function invalidates all the VF entries technically this isn ' t required but added for cleaness and ease of debugging incase a VF attempts to produce an interrupt after it has been taken down .
/* Invalidate igu CAM lines and mark them as free */