Lines Matching refs:snap

187 	struct ice_mbx_snapshot *snap = &hw->mbx_snapshot;  in ice_mbx_detect_malvf()  local
189 if (vf_id >= snap->mbx_vf.vfcntr_len) in ice_mbx_detect_malvf()
193 snap->mbx_vf.vf_cntr[vf_id]++; in ice_mbx_detect_malvf()
195 if (snap->mbx_vf.vf_cntr[vf_id] >= ICE_ASYNC_VF_MSG_THRESHOLD) in ice_mbx_detect_malvf()
210 static void ice_mbx_reset_snapshot(struct ice_mbx_snapshot *snap) in ice_mbx_reset_snapshot() argument
214 if (!snap || !snap->mbx_vf.vf_cntr) in ice_mbx_reset_snapshot()
218 vfcntr_len = snap->mbx_vf.vfcntr_len; in ice_mbx_reset_snapshot()
220 memset(snap->mbx_vf.vf_cntr, 0, in ice_mbx_reset_snapshot()
221 (vfcntr_len * sizeof(*snap->mbx_vf.vf_cntr))); in ice_mbx_reset_snapshot()
224 memset(&snap->mbx_buf, 0, sizeof(snap->mbx_buf)); in ice_mbx_reset_snapshot()
225 snap->mbx_buf.state = ICE_MAL_VF_DETECT_STATE_NEW_SNAPSHOT; in ice_mbx_reset_snapshot()
256 struct ice_mbx_snapshot *snap = &hw->mbx_snapshot; in ice_mbx_vf_state_handler() local
286 snap_buf = &snap->mbx_buf; in ice_mbx_vf_state_handler()
291 ice_mbx_reset_snapshot(snap); in ice_mbx_vf_state_handler()
396 ice_mbx_clear_malvf(struct ice_mbx_snapshot *snap, unsigned long *all_malvfs, in ice_mbx_clear_malvf() argument
399 if (!snap || !all_malvfs) in ice_mbx_clear_malvf()
402 if (bitmap_len < snap->mbx_vf.vfcntr_len) in ice_mbx_clear_malvf()
406 if (vf_id >= bitmap_len || vf_id >= snap->mbx_vf.vfcntr_len) in ice_mbx_clear_malvf()
418 snap->mbx_vf.vf_cntr[vf_id] = 0; in ice_mbx_clear_malvf()
438 struct ice_mbx_snapshot *snap = &hw->mbx_snapshot; in ice_mbx_init_snapshot() local
447 snap->mbx_vf.vf_cntr = devm_kcalloc(ice_hw_to_dev(hw), vf_count, in ice_mbx_init_snapshot()
448 sizeof(*snap->mbx_vf.vf_cntr), in ice_mbx_init_snapshot()
450 if (!snap->mbx_vf.vf_cntr) in ice_mbx_init_snapshot()
456 snap->mbx_vf.vfcntr_len = vf_count; in ice_mbx_init_snapshot()
461 memset(&snap->mbx_buf, 0, sizeof(snap->mbx_buf)); in ice_mbx_init_snapshot()
462 snap->mbx_buf.state = ICE_MAL_VF_DETECT_STATE_NEW_SNAPSHOT; in ice_mbx_init_snapshot()
475 struct ice_mbx_snapshot *snap = &hw->mbx_snapshot; in ice_mbx_deinit_snapshot() local
478 devm_kfree(ice_hw_to_dev(hw), snap->mbx_vf.vf_cntr); in ice_mbx_deinit_snapshot()
479 snap->mbx_vf.vfcntr_len = 0; in ice_mbx_deinit_snapshot()
482 memset(&snap->mbx_buf, 0, sizeof(snap->mbx_buf)); in ice_mbx_deinit_snapshot()