Lines Matching defs:vsi_handle

65 ice_vsi_uses_fltr(struct ice_fltr_mgmt_list_entry *fm_entry, u16 vsi_handle);
478 * @vsi_handle: VSI handle
482 bool ice_is_vsi_valid(struct ice_hw *hw, u16 vsi_handle)
484 return vsi_handle < ICE_MAX_VSI && hw->vsi_ctx[vsi_handle];
490 * @vsi_handle: VSI handle
495 u16 ice_get_hw_vsi_num(struct ice_hw *hw, u16 vsi_handle)
497 return hw->vsi_ctx[vsi_handle]->vsi_num;
503 * @vsi_handle: VSI handle
507 struct ice_vsi_ctx *ice_get_vsi_ctx(struct ice_hw *hw, u16 vsi_handle)
509 return (vsi_handle >= ICE_MAX_VSI) ? NULL : hw->vsi_ctx[vsi_handle];
515 * @vsi_handle: VSI handle
521 ice_save_vsi_ctx(struct ice_hw *hw, u16 vsi_handle, struct ice_vsi_ctx *vsi)
523 hw->vsi_ctx[vsi_handle] = vsi;
529 * @vsi_handle: VSI handle
531 void ice_clear_vsi_q_ctx(struct ice_hw *hw, u16 vsi_handle)
536 vsi = ice_get_vsi_ctx(hw, vsi_handle);
554 * @vsi_handle: VSI handle
558 static void ice_clear_vsi_ctx(struct ice_hw *hw, u16 vsi_handle)
562 vsi = ice_get_vsi_ctx(hw, vsi_handle);
564 ice_clear_vsi_q_ctx(hw, vsi_handle);
566 hw->vsi_ctx[vsi_handle] = NULL;
585 * @vsi_handle: unique VSI handle provided by drivers
594 ice_add_vsi(struct ice_hw *hw, u16 vsi_handle, struct ice_vsi_ctx *vsi_ctx,
600 if (vsi_handle >= ICE_MAX_VSI)
605 tmp_vsi_ctx = ice_get_vsi_ctx(hw, vsi_handle);
616 ice_save_vsi_ctx(hw, vsi_handle, tmp_vsi_ctx);
628 * @vsi_handle: unique VSI handle
636 ice_free_vsi(struct ice_hw *hw, u16 vsi_handle, struct ice_vsi_ctx *vsi_ctx,
641 if (!ice_is_vsi_valid(hw, vsi_handle))
643 vsi_ctx->vsi_num = ice_get_hw_vsi_num(hw, vsi_handle);
646 ice_clear_vsi_ctx(hw, vsi_handle);
653 * @vsi_handle: unique VSI handle
660 ice_update_vsi(struct ice_hw *hw, u16 vsi_handle, struct ice_vsi_ctx *vsi_ctx,
663 if (!ice_is_vsi_valid(hw, vsi_handle))
665 vsi_ctx->vsi_num = ice_get_hw_vsi_num(hw, vsi_handle);
672 * @vsi_handle: VSI SW index
676 ice_cfg_iwarp_fltr(struct ice_hw *hw, u16 vsi_handle, bool enable)
681 cached_ctx = ice_get_vsi_ctx(hw, vsi_handle);
700 status = ice_update_vsi(hw, vsi_handle, ctx, NULL);
1864 if (cur_fltr->vsi_handle == new_fltr->vsi_handle)
1867 vsi_handle_arr[0] = cur_fltr->vsi_handle;
1868 vsi_handle_arr[1] = new_fltr->vsi_handle;
1904 u16 vsi_handle = new_fltr->vsi_handle;
1911 if (ice_is_bit_set(m_entry->vsi_list_info->vsi_map, vsi_handle))
1920 status = ice_update_vsi_list_rule(hw, &vsi_handle, 1,
1925 ice_set_bit(vsi_handle,
1962 * @vsi_handle: VSI handle to be found in VSI list
1963 * @vsi_list_id: VSI list ID found containing vsi_handle
1970 ice_find_vsi_list_entry(struct ice_sw_recipe *recp_list, u16 vsi_handle,
1986 vsi_handle)) {
2002 vsi_handle)) {
2030 if (!ice_is_vsi_valid(hw, f_entry->fltr_info.vsi_handle))
2036 ice_get_hw_vsi_num(hw, f_entry->fltr_info.vsi_handle);
2046 ice_get_hw_vsi_num(hw, f_entry->fltr_info.vsi_handle);
2085 * @vsi_handle: VSI handle of the VSI to remove
2090 ice_rem_update_vsi_list(struct ice_hw *hw, u16 vsi_handle,
2102 if (!ice_is_bit_set(fm_list->vsi_list_info->vsi_map, vsi_handle))
2107 status = ice_update_vsi_list_rule(hw, &vsi_handle, 1, vsi_list_id, true,
2114 ice_clear_bit(vsi_handle, fm_list->vsi_list_info->vsi_map);
2138 tmp_fltr_info.vsi_handle = rem_vsi_handle;
2184 u16 vsi_handle;
2186 if (!ice_is_vsi_valid(hw, f_entry->fltr_info.vsi_handle))
2189 ice_get_hw_vsi_num(hw, f_entry->fltr_info.vsi_handle);
2220 vsi_handle = f_entry->fltr_info.vsi_handle;
2221 status = ice_rem_update_vsi_list(hw, vsi_handle, list_elem);
2377 u16 vsi_handle;
2381 vsi_handle = m_list_itr->fltr_info.vsi_handle;
2382 if (!ice_is_vsi_valid(hw, vsi_handle))
2384 hw_vsi_id = ice_get_hw_vsi_num(hw, vsi_handle);
2529 u16 vsi_list_id = 0, vsi_handle;
2533 if (!ice_is_vsi_valid(hw, f_entry->fltr_info.vsi_handle))
2537 ice_get_hw_vsi_num(hw, f_entry->fltr_info.vsi_handle);
2549 vsi_handle = new_fltr->vsi_handle;
2563 vsi_handle,
2567 &vsi_handle,
2593 ice_create_vsi_list_map(hw, &vsi_handle,
2629 if (cur_handle == vsi_handle) {
2635 vsi_handle_arr[1] = vsi_handle;
2932 * @vsi_handle: VSI handle to set as default
2940 ice_cfg_dflt_vsi(struct ice_port_info *pi, u16 vsi_handle, bool set,
2953 if (!ice_is_vsi_valid(hw, vsi_handle))
2956 hw_vsi_id = ice_get_hw_vsi_num(hw, vsi_handle);
2964 f_info.vsi_handle = vsi_handle;
2988 * @vsi_handle: vsi handle to check for in filter list
2994 bool ice_check_if_dflt_vsi(struct ice_port_info *pi, u16 vsi_handle,
3013 if (ice_vsi_uses_fltr(fm_entry, vsi_handle)) {
3081 u16 vsi_handle;
3086 vsi_handle = list_itr->fltr_info.vsi_handle;
3087 if (!ice_is_vsi_valid(hw, vsi_handle))
3091 ice_get_hw_vsi_num(hw, vsi_handle);
3174 * @vsi_handle: VSI handle to compare with filter info
3177 ice_vsi_uses_fltr(struct ice_fltr_mgmt_list_entry *fm_entry, u16 vsi_handle)
3180 fm_entry->fltr_info.vsi_handle == vsi_handle) ||
3184 vsi_handle))));
3190 * @vsi_handle: VSI handle to remove filters from
3201 ice_add_entry_to_vsi_fltr_list(struct ice_hw *hw, u16 vsi_handle,
3222 tmp->fltr_info.vsi_handle = vsi_handle;
3223 tmp->fltr_info.fwd_id.hw_vsi_id = ice_get_hw_vsi_num(hw, vsi_handle);
3233 * @vsi_handle: VSI handle to remove filters from
3235 * @vsi_list_head: pointer to the list pertaining to VSI with vsi_handle
3244 ice_add_to_vsi_fltr_list(struct ice_hw *hw, u16 vsi_handle,
3252 if (!ice_is_vsi_valid(hw, vsi_handle))
3257 if (!ice_vsi_uses_fltr(fm_entry, vsi_handle))
3260 status = ice_add_entry_to_vsi_fltr_list(hw, vsi_handle,
3316 * @vsi_handle: VSI handle to retrieve info from
3323 _ice_get_vsi_promisc(struct ice_hw *hw, u16 vsi_handle,
3332 if (!ice_is_vsi_valid(hw, vsi_handle) ||
3348 if (!ice_vsi_uses_fltr(itr, vsi_handle))
3364 * @vsi_handle: VSI handle to retrieve info from
3369 ice_get_vsi_promisc(struct ice_hw *hw, u16 vsi_handle,
3375 return _ice_get_vsi_promisc(hw, vsi_handle, promisc_mask,
3382 * @vsi_handle: VSI handle to retrieve info from
3387 ice_get_vsi_vlan_promisc(struct ice_hw *hw, u16 vsi_handle,
3393 return _ice_get_vsi_promisc(hw, vsi_handle, promisc_mask,
3425 * @vsi_handle: VSI handle to clear mode
3431 _ice_clear_vsi_promisc(struct ice_hw *hw, u16 vsi_handle,
3445 if (!ice_is_vsi_valid(hw, vsi_handle))
3465 if (!ice_vsi_uses_fltr(itr, vsi_handle))
3481 status = ice_add_entry_to_vsi_fltr_list(hw, vsi_handle,
3506 * @vsi_handle: VSI handle to clear mode
3511 ice_clear_vsi_promisc(struct ice_hw *hw, u16 vsi_handle,
3517 return _ice_clear_vsi_promisc(hw, vsi_handle, promisc_mask,
3524 * @vsi_handle: VSI handle to configure
3531 _ice_set_vsi_promisc(struct ice_hw *hw, u16 vsi_handle,
3547 if (!ice_is_vsi_valid(hw, vsi_handle))
3549 hw_vsi_id = ice_get_hw_vsi_num(hw, vsi_handle);
3640 new_fltr.vsi_handle = vsi_handle;
3658 * @vsi_handle: VSI handle to configure
3663 ice_set_vsi_promisc(struct ice_hw *hw, u16 vsi_handle,
3669 return _ice_set_vsi_promisc(hw, vsi_handle, promisc_mask, vid,
3677 * @vsi_handle: VSI handle to configure
3686 _ice_set_vlan_vsi_promisc(struct ice_hw *hw, u16 vsi_handle,
3701 status = ice_add_to_vsi_fltr_list(hw, vsi_handle, vlan_head,
3718 status = _ice_clear_vsi_promisc(hw, vsi_handle,
3722 status = _ice_set_vsi_promisc(hw, vsi_handle,
3741 * @vsi_handle: VSI handle to configure
3748 ice_set_vlan_vsi_promisc(struct ice_hw *hw, u16 vsi_handle,
3754 return _ice_set_vlan_vsi_promisc(hw, vsi_handle, promisc_mask,
3762 * @vsi_handle: VSI handle to remove filters from
3767 ice_remove_vsi_lkup_fltr(struct ice_hw *hw, u16 vsi_handle,
3782 status = ice_add_to_vsi_fltr_list(hw, vsi_handle, rule_head,
3825 * @vsi_handle: VSI handle to remove filters from
3829 ice_remove_vsi_fltr_rule(struct ice_hw *hw, u16 vsi_handle,
3834 ice_remove_vsi_lkup_fltr(hw, vsi_handle,
3836 ice_remove_vsi_lkup_fltr(hw, vsi_handle,
3838 ice_remove_vsi_lkup_fltr(hw, vsi_handle,
3840 ice_remove_vsi_lkup_fltr(hw, vsi_handle,
3842 ice_remove_vsi_lkup_fltr(hw, vsi_handle,
3844 ice_remove_vsi_lkup_fltr(hw, vsi_handle,
3846 ice_remove_vsi_lkup_fltr(hw, vsi_handle,
3848 ice_remove_vsi_lkup_fltr(hw, vsi_handle,
3855 * @vsi_handle: VSI handle to remove filters from
3857 void ice_remove_vsi_fltr(struct ice_hw *hw, u16 vsi_handle)
3859 ice_remove_vsi_fltr_rule(hw, vsi_handle, hw->switch_info);
3988 if (!ice_is_vsi_valid(hw, f_info->vsi_handle))
3990 f_info->fwd_id.hw_vsi_id = ice_get_hw_vsi_num(hw, f_info->vsi_handle);
4081 if (!ice_is_vsi_valid(hw, f_info->vsi_handle))
4083 f_info->fwd_id.hw_vsi_id = ice_get_hw_vsi_num(hw, f_info->vsi_handle);
4186 u16 vsi_handle;
4198 ice_for_each_set_bit(vsi_handle, itr->vsi_list_info->vsi_map,
4200 if (!ice_is_vsi_valid(hw, vsi_handle))
4203 ice_clear_bit(vsi_handle, itr->vsi_list_info->vsi_map);
4204 f_entry.fltr_info.vsi_handle = vsi_handle;
4206 ice_get_hw_vsi_num(hw, vsi_handle);
4253 * @vsi_handle: driver VSI handle
4257 * Replays the filter of recipe recp_id for a VSI represented via vsi_handle.
4262 struct ice_switch_info *sw, u16 vsi_handle, u8 recp_id,
4273 hw_vsi_id = ice_get_hw_vsi_num(hw, vsi_handle);
4281 itr->fltr_info.vsi_handle == vsi_handle) {
4293 !ice_is_bit_set(itr->vsi_list_info->vsi_map, vsi_handle))
4295 f_entry.fltr_info.vsi_handle = vsi_handle;
4317 * @vsi_handle: driver VSI handle
4319 * Replays filters for requested VSI via vsi_handle.
4323 u16 vsi_handle)
4337 status = ice_replay_vsi_fltr(hw, pi, sw, vsi_handle, i,