Lines Matching refs:vsi_handle
1649 * @vsi_handle: VSI handle
1653 bool ice_is_vsi_valid(struct ice_hw *hw, u16 vsi_handle)
1655 return vsi_handle < ICE_MAX_VSI && hw->vsi_ctx[vsi_handle];
1661 * @vsi_handle: VSI handle
1666 u16 ice_get_hw_vsi_num(struct ice_hw *hw, u16 vsi_handle)
1668 return hw->vsi_ctx[vsi_handle]->vsi_num;
1674 * @vsi_handle: VSI handle
1678 struct ice_vsi_ctx *ice_get_vsi_ctx(struct ice_hw *hw, u16 vsi_handle)
1680 return (vsi_handle >= ICE_MAX_VSI) ? NULL : hw->vsi_ctx[vsi_handle];
1686 * @vsi_handle: VSI handle
1692 ice_save_vsi_ctx(struct ice_hw *hw, u16 vsi_handle, struct ice_vsi_ctx *vsi)
1694 hw->vsi_ctx[vsi_handle] = vsi;
1700 * @vsi_handle: VSI handle
1702 static void ice_clear_vsi_q_ctx(struct ice_hw *hw, u16 vsi_handle)
1704 struct ice_vsi_ctx *vsi = ice_get_vsi_ctx(hw, vsi_handle);
1720 * @vsi_handle: VSI handle
1724 static void ice_clear_vsi_ctx(struct ice_hw *hw, u16 vsi_handle)
1728 vsi = ice_get_vsi_ctx(hw, vsi_handle);
1730 ice_clear_vsi_q_ctx(hw, vsi_handle);
1732 hw->vsi_ctx[vsi_handle] = NULL;
1751 * @vsi_handle: unique VSI handle provided by drivers
1760 ice_add_vsi(struct ice_hw *hw, u16 vsi_handle, struct ice_vsi_ctx *vsi_ctx,
1766 if (vsi_handle >= ICE_MAX_VSI)
1771 tmp_vsi_ctx = ice_get_vsi_ctx(hw, vsi_handle);
1781 ice_save_vsi_ctx(hw, vsi_handle, tmp_vsi_ctx);
1793 * @vsi_handle: unique VSI handle
1801 ice_free_vsi(struct ice_hw *hw, u16 vsi_handle, struct ice_vsi_ctx *vsi_ctx,
1806 if (!ice_is_vsi_valid(hw, vsi_handle))
1808 vsi_ctx->vsi_num = ice_get_hw_vsi_num(hw, vsi_handle);
1811 ice_clear_vsi_ctx(hw, vsi_handle);
1818 * @vsi_handle: unique VSI handle
1825 ice_update_vsi(struct ice_hw *hw, u16 vsi_handle, struct ice_vsi_ctx *vsi_ctx,
1828 if (!ice_is_vsi_valid(hw, vsi_handle))
1830 vsi_ctx->vsi_num = ice_get_hw_vsi_num(hw, vsi_handle);
1837 * @vsi_handle: VSI SW index
1841 ice_cfg_rdma_fltr(struct ice_hw *hw, u16 vsi_handle, bool enable)
1846 cached_ctx = ice_get_vsi_ctx(hw, vsi_handle);
1865 status = ice_update_vsi(hw, vsi_handle, ctx, NULL);
3149 if (cur_fltr->vsi_handle == new_fltr->vsi_handle)
3152 vsi_handle_arr[0] = cur_fltr->vsi_handle;
3153 vsi_handle_arr[1] = new_fltr->vsi_handle;
3189 u16 vsi_handle = new_fltr->vsi_handle;
3196 if (test_bit(vsi_handle, m_entry->vsi_list_info->vsi_map))
3205 status = ice_update_vsi_list_rule(hw, &vsi_handle, 1,
3210 set_bit(vsi_handle, m_entry->vsi_list_info->vsi_map);
3249 * @vsi_handle: VSI handle to be found in VSI list
3250 * @vsi_list_id: VSI list ID found containing vsi_handle
3257 ice_find_vsi_list_entry(struct ice_hw *hw, u8 recp_id, u16 vsi_handle,
3269 if (test_bit(vsi_handle, map_info->vsi_map)) {
3296 if (!ice_is_vsi_valid(hw, f_entry->fltr_info.vsi_handle))
3299 ice_get_hw_vsi_num(hw, f_entry->fltr_info.vsi_handle);
3361 * @vsi_handle: VSI handle of the VSI to remove
3366 ice_rem_update_vsi_list(struct ice_hw *hw, u16 vsi_handle,
3378 if (!test_bit(vsi_handle, fm_list->vsi_list_info->vsi_map))
3383 status = ice_update_vsi_list_rule(hw, &vsi_handle, 1, vsi_list_id, true,
3390 clear_bit(vsi_handle, fm_list->vsi_list_info->vsi_map);
3414 tmp_fltr_info.vsi_handle = rem_vsi_handle;
3460 u16 vsi_handle;
3463 if (!ice_is_vsi_valid(hw, f_entry->fltr_info.vsi_handle))
3466 ice_get_hw_vsi_num(hw, f_entry->fltr_info.vsi_handle);
3495 vsi_handle = f_entry->fltr_info.vsi_handle;
3496 status = ice_rem_update_vsi_list(hw, vsi_handle, list_elem);
3541 * @vsi_handle: check MAC filter for this VSI
3543 bool ice_vlan_fltr_exist(struct ice_hw *hw, u16 vlan_id, u16 vsi_handle)
3554 if (!ice_is_vsi_valid(hw, vsi_handle))
3557 hw_vsi_id = ice_get_hw_vsi_num(hw, vsi_handle);
3593 if (!test_bit(vsi_handle, map_info->vsi_map))
3623 u16 vsi_handle;
3627 vsi_handle = m_list_itr->fltr_info.vsi_handle;
3628 if (!ice_is_vsi_valid(hw, vsi_handle))
3630 hw_vsi_id = ice_get_hw_vsi_num(hw, vsi_handle);
3661 u16 vsi_list_id = 0, vsi_handle;
3665 if (!ice_is_vsi_valid(hw, f_entry->fltr_info.vsi_handle))
3669 ice_get_hw_vsi_num(hw, f_entry->fltr_info.vsi_handle);
3681 vsi_handle = new_fltr->vsi_handle;
3695 vsi_handle,
3699 &vsi_handle,
3725 ice_create_vsi_list_map(hw, &vsi_handle,
3761 if (cur_handle == vsi_handle) {
3767 vsi_handle_arr[1] = vsi_handle;
3928 * @vsi_handle: VSI handle to set as default
3936 ice_cfg_dflt_vsi(struct ice_port_info *pi, u16 vsi_handle, bool set,
3945 if (!ice_is_vsi_valid(hw, vsi_handle))
3948 hw_vsi_id = ice_get_hw_vsi_num(hw, vsi_handle);
3956 f_info.vsi_handle = vsi_handle;
3981 * @vsi_handle: VSI handle to compare with filter info
3984 ice_vsi_uses_fltr(struct ice_fltr_mgmt_list_entry *fm_entry, u16 vsi_handle)
3987 fm_entry->fltr_info.vsi_handle == vsi_handle) ||
3990 (test_bit(vsi_handle, fm_entry->vsi_list_info->vsi_map))));
3996 * @vsi_handle: vsi handle to check for in filter list
4003 ice_check_if_dflt_vsi(struct ice_port_info *pi, u16 vsi_handle,
4022 if (ice_vsi_uses_fltr(fm_entry, vsi_handle)) {
4055 u16 vsi_handle;
4060 vsi_handle = list_itr->fltr_info.vsi_handle;
4061 if (!ice_is_vsi_valid(hw, vsi_handle))
4065 ice_get_hw_vsi_num(hw, vsi_handle);
4105 * @vsi_handle: VSI handle to remove filters from
4116 ice_add_entry_to_vsi_fltr_list(struct ice_hw *hw, u16 vsi_handle,
4137 tmp->fltr_info.vsi_handle = vsi_handle;
4138 tmp->fltr_info.fwd_id.hw_vsi_id = ice_get_hw_vsi_num(hw, vsi_handle);
4148 * @vsi_handle: VSI handle to remove filters from
4150 * @vsi_list_head: pointer to the list pertaining to VSI with vsi_handle
4159 ice_add_to_vsi_fltr_list(struct ice_hw *hw, u16 vsi_handle,
4167 if (!ice_is_vsi_valid(hw, vsi_handle))
4171 if (!ice_vsi_uses_fltr(fm_entry, vsi_handle))
4174 status = ice_add_entry_to_vsi_fltr_list(hw, vsi_handle,
4239 * @vsi_handle: VSI handle to clear mode
4244 ice_clear_vsi_promisc(struct ice_hw *hw, u16 vsi_handle, u8 promisc_mask,
4256 if (!ice_is_vsi_valid(hw, vsi_handle))
4274 if (!ice_vsi_uses_fltr(itr, vsi_handle))
4288 status = ice_add_entry_to_vsi_fltr_list(hw, vsi_handle,
4312 * @vsi_handle: VSI handle to configure
4317 ice_set_vsi_promisc(struct ice_hw *hw, u16 vsi_handle, u8 promisc_mask, u16 vid)
4328 if (!ice_is_vsi_valid(hw, vsi_handle))
4330 hw_vsi_id = ice_get_hw_vsi_num(hw, vsi_handle);
4408 new_fltr.vsi_handle = vsi_handle;
4424 * @vsi_handle: VSI handle to configure
4431 ice_set_vlan_vsi_promisc(struct ice_hw *hw, u16 vsi_handle, u8 promisc_mask,
4446 status = ice_add_to_vsi_fltr_list(hw, vsi_handle, vlan_head,
4462 status = ice_clear_vsi_promisc(hw, vsi_handle,
4465 status = ice_set_vsi_promisc(hw, vsi_handle,
4482 * @vsi_handle: VSI handle to remove filters from
4486 ice_remove_vsi_lkup_fltr(struct ice_hw *hw, u16 vsi_handle,
4501 status = ice_add_to_vsi_fltr_list(hw, vsi_handle, rule_head,
4538 * @vsi_handle: VSI handle to remove filters from
4540 void ice_remove_vsi_fltr(struct ice_hw *hw, u16 vsi_handle)
4542 ice_remove_vsi_lkup_fltr(hw, vsi_handle, ICE_SW_LKUP_MAC);
4543 ice_remove_vsi_lkup_fltr(hw, vsi_handle, ICE_SW_LKUP_MAC_VLAN);
4544 ice_remove_vsi_lkup_fltr(hw, vsi_handle, ICE_SW_LKUP_PROMISC);
4545 ice_remove_vsi_lkup_fltr(hw, vsi_handle, ICE_SW_LKUP_VLAN);
4546 ice_remove_vsi_lkup_fltr(hw, vsi_handle, ICE_SW_LKUP_DFLT);
4547 ice_remove_vsi_lkup_fltr(hw, vsi_handle, ICE_SW_LKUP_ETHERTYPE);
4548 ice_remove_vsi_lkup_fltr(hw, vsi_handle, ICE_SW_LKUP_ETHERTYPE_MAC);
4549 ice_remove_vsi_lkup_fltr(hw, vsi_handle, ICE_SW_LKUP_PROMISC_VLAN);
5946 vsi_handle_arr[0] = cur_fltr->sw_act.vsi_handle;
5947 vsi_handle_arr[1] = new_fltr->sw_act.vsi_handle;
5974 u16 vsi_handle = new_fltr->sw_act.vsi_handle;
5980 if (test_bit(vsi_handle, m_entry->vsi_list_info->vsi_map))
5988 status = ice_update_vsi_list_rule(hw, &vsi_handle, 1,
5994 set_bit(vsi_handle, m_entry->vsi_list_info->vsi_map);
6035 * @added_entry: this will return recipe_id, rule_id and vsi_handle. should be
6054 u16 rid = 0, i, rule_buf_sz, vsi_handle;
6102 vsi_handle = rinfo->sw_act.vsi_handle;
6103 if (!ice_is_vsi_valid(hw, vsi_handle)) {
6112 ice_get_hw_vsi_num(hw, vsi_handle);
6118 rinfo->sw_act.src = ice_get_hw_vsi_num(hw, vsi_handle);
6139 added_entry->vsi_handle = rinfo->sw_act.vsi_handle;
6267 added_entry->vsi_handle = rinfo->sw_act.vsi_handle;
6290 * @vsi_handle: driver VSI handle
6294 * Replays the filter of recipe recp_id for a VSI represented via vsi_handle.
6298 ice_replay_vsi_fltr(struct ice_hw *hw, u16 vsi_handle, u8 recp_id,
6307 hw_vsi_id = ice_get_hw_vsi_num(hw, vsi_handle);
6314 itr->fltr_info.vsi_handle == vsi_handle) {
6324 !test_bit(vsi_handle, itr->vsi_list_info->vsi_map))
6326 f_entry.fltr_info.vsi_handle = vsi_handle;
6345 * @vsi_handle: VSI handle of the VSI to remove
6350 ice_adv_rem_update_vsi_list(struct ice_hw *hw, u16 vsi_handle,
6363 if (!test_bit(vsi_handle, fm_list->vsi_list_info->vsi_map))
6368 status = ice_update_vsi_list_rule(hw, &vsi_handle, 1, vsi_list_id, true,
6375 clear_bit(vsi_handle, fm_list->vsi_list_info->vsi_map);
6403 fm_list->rule_info.sw_act.vsi_handle = rem_vsi_handle;
6456 u16 i, rid, vsi_handle;
6486 vsi_handle = rinfo->sw_act.vsi_handle;
6487 status = ice_adv_rem_update_vsi_list(hw, vsi_handle, list_elem);
6489 vsi_handle = rinfo->sw_act.vsi_handle;
6490 status = ice_adv_rem_update_vsi_list(hw, vsi_handle, list_elem);
6543 * vsi_handle with a given rule_id which is passed as parameter in remove_entry
6562 rinfo.sw_act.vsi_handle = remove_entry->vsi_handle;
6574 * @vsi_handle: driver VSI handle
6580 ice_replay_vsi_adv_rule(struct ice_hw *hw, u16 vsi_handle,
6593 if (vsi_handle != rinfo->sw_act.vsi_handle)
6606 * @vsi_handle: driver VSI handle
6608 * Replays filters for requested VSI via vsi_handle.
6610 int ice_replay_vsi_all_fltr(struct ice_hw *hw, u16 vsi_handle)
6621 status = ice_replay_vsi_fltr(hw, vsi_handle, i, head);
6623 status = ice_replay_vsi_adv_rule(hw, vsi_handle, head);