Lines Matching +full:int +full:- +full:fwd +full:- +full:mask

1 /* SPDX-License-Identifier: BSD-3-Clause */
68 * ice_init_def_sw_recp - initialize the recipe book keeping tables
75 int
100 * ice_aq_get_sw_cfg - get switch configuration
115 * configuration information has been returned; if non-zero (meaning not all
124 static int
131 int status;
135 cmd->element = CPU_TO_LE16(*req_desc);
139 *req_desc = LE16_TO_CPU(cmd->element);
140 *num_elems = LE16_TO_CPU(cmd->num_elems);
147 * ice_alloc_rss_global_lut - allocate a RSS global LUT
152 int ice_alloc_rss_global_lut(struct ice_hw *hw, bool shared_res, u16 *global_lut_id)
155 int status;
163 sw_buf->num_elems = CPU_TO_LE16(1);
164 sw_buf->res_type = CPU_TO_LE16(ICE_AQC_RES_TYPE_GLOBAL_RSS_HASH |
175 *global_lut_id = LE16_TO_CPU(sw_buf->elem[0].e.sw_resp);
183 * ice_free_rss_global_lut - free a RSS global LUT
187 int ice_free_rss_global_lut(struct ice_hw *hw, u16 global_lut_id)
191 int status;
198 sw_buf->num_elems = CPU_TO_LE16(num_elems);
199 sw_buf->res_type = CPU_TO_LE16(ICE_AQC_RES_TYPE_GLOBAL_RSS_HASH);
200 sw_buf->elem[0].e.sw_resp = CPU_TO_LE16(global_lut_id);
212 * ice_alloc_sw - allocate resources specific to switch
221 int
228 int status;
240 sw_buf->num_elems = CPU_TO_LE16(1);
241 sw_buf->res_type =
252 sw_ele = &sw_buf->elem[0];
253 *sw_id = LE16_TO_CPU(sw_ele->e.sw_resp);
272 counter_buf->num_elems = CPU_TO_LE16(1);
273 counter_buf->res_type =
283 counter_ele = &counter_buf->elem[0];
284 *counter_id = LE16_TO_CPU(counter_ele->e.sw_resp);
294 * ice_free_sw - free resources specific to switch
305 int ice_free_sw(struct ice_hw *hw, u16 sw_id, u16 counter_id)
308 int status, ret_status;
321 sw_buf->num_elems = CPU_TO_LE16(1);
322 sw_buf->res_type = CPU_TO_LE16(ICE_AQC_RES_TYPE_SWID);
323 sw_buf->elem[0].e.sw_resp = CPU_TO_LE16(sw_id);
343 counter_buf->num_elems = CPU_TO_LE16(1);
344 counter_buf->res_type = CPU_TO_LE16(ICE_AQC_RES_TYPE_VEB_COUNTER);
345 counter_buf->elem[0].e.sw_resp = CPU_TO_LE16(counter_id);
367 int
374 int status;
381 if (!vsi_ctx->alloc_from_pool)
382 cmd->vsi_num = CPU_TO_LE16(vsi_ctx->vsi_num |
384 cmd->vf_id = vsi_ctx->vf_num;
386 cmd->vsi_flags = CPU_TO_LE16(vsi_ctx->flags);
390 status = ice_aq_send_cmd(hw, &desc, &vsi_ctx->info,
391 sizeof(vsi_ctx->info), cd);
394 vsi_ctx->vsi_num = LE16_TO_CPU(res->vsi_num) & ICE_AQ_VSI_NUM_M;
395 vsi_ctx->vsis_allocd = LE16_TO_CPU(res->vsi_used);
396 vsi_ctx->vsis_unallocated = LE16_TO_CPU(res->vsi_free);
411 int
418 int status;
425 cmd->vsi_num = CPU_TO_LE16(vsi_ctx->vsi_num | ICE_AQ_VSI_IS_VALID);
427 cmd->cmd_flags = CPU_TO_LE16(ICE_AQ_VSI_KEEP_ALLOC);
431 vsi_ctx->vsis_allocd = LE16_TO_CPU(resp->vsi_used);
432 vsi_ctx->vsis_unallocated = LE16_TO_CPU(resp->vsi_free);
446 int
453 int status;
460 cmd->vsi_num = CPU_TO_LE16(vsi_ctx->vsi_num | ICE_AQ_VSI_IS_VALID);
464 status = ice_aq_send_cmd(hw, &desc, &vsi_ctx->info,
465 sizeof(vsi_ctx->info), cd);
468 vsi_ctx->vsis_allocd = LE16_TO_CPU(resp->vsi_used);
469 vsi_ctx->vsis_unallocated = LE16_TO_CPU(resp->vsi_free);
476 * ice_is_vsi_valid - check whether the VSI is valid or not
484 return vsi_handle < ICE_MAX_VSI && hw->vsi_ctx[vsi_handle];
488 * ice_get_hw_vsi_num - return the HW VSI number
497 return hw->vsi_ctx[vsi_handle]->vsi_num;
501 * ice_get_vsi_ctx - return the VSI context entry for a given VSI handle
509 return (vsi_handle >= ICE_MAX_VSI) ? NULL : hw->vsi_ctx[vsi_handle];
513 * ice_save_vsi_ctx - save the VSI context for a given VSI handle
523 hw->vsi_ctx[vsi_handle] = vsi;
527 * ice_clear_vsi_q_ctx - clear VSI queue contexts for all TCs
540 if (vsi->lan_q_ctx[i]) {
541 ice_free(hw, vsi->lan_q_ctx[i]);
542 vsi->lan_q_ctx[i] = NULL;
544 if (vsi->rdma_q_ctx[i]) {
545 ice_free(hw, vsi->rdma_q_ctx[i]);
546 vsi->rdma_q_ctx[i] = NULL;
552 * ice_clear_vsi_ctx - clear the VSI context entry
566 hw->vsi_ctx[vsi_handle] = NULL;
571 * ice_clear_all_vsi_ctx - clear all the VSI context entries
583 * ice_add_vsi - add VSI context to the hardware and VSI handle list
593 int
598 int status;
619 tmp_vsi_ctx->vsi_num = vsi_ctx->vsi_num;
626 * ice_free_vsi- free VSI context from hardware and VSI handle list
635 int
639 int status;
643 vsi_ctx->vsi_num = ice_get_hw_vsi_num(hw, vsi_handle);
659 int
665 vsi_ctx->vsi_num = ice_get_hw_vsi_num(hw, vsi_handle);
670 * ice_cfg_iwarp_fltr - enable/disable iWARP filtering on VSI
675 int
679 int status;
689 ctx->info.q_opt_rss = cached_ctx->info.q_opt_rss;
690 ctx->info.q_opt_tc = cached_ctx->info.q_opt_tc;
691 ctx->info.q_opt_flags = cached_ctx->info.q_opt_flags;
693 ctx->info.valid_sections = CPU_TO_LE16(ICE_AQ_VSI_PROP_Q_OPT_VALID);
696 ctx->info.q_opt_flags |= ICE_AQ_VSI_Q_OPT_PE_FLTR_EN;
698 ctx->info.q_opt_flags &= ~ICE_AQ_VSI_Q_OPT_PE_FLTR_EN;
702 cached_ctx->info.q_opt_flags = ctx->info.q_opt_flags;
703 cached_ctx->info.valid_sections |= ctx->info.valid_sections;
718 int
725 int status;
732 cmd->vsi_num = CPU_TO_LE16(vsi_ctx->vsi_num | ICE_AQ_VSI_IS_VALID);
734 status = ice_aq_send_cmd(hw, &desc, &vsi_ctx->info,
735 sizeof(vsi_ctx->info), cd);
737 vsi_ctx->vsi_num = LE16_TO_CPU(resp->vsi_num) &
739 vsi_ctx->vf_num = resp->vf_id;
740 vsi_ctx->vsis_allocd = LE16_TO_CPU(resp->vsi_used);
741 vsi_ctx->vsis_unallocated = LE16_TO_CPU(resp->vsi_free);
748 * ice_aq_add_update_mir_rule - add/update a mirror rule
759 int
768 int status;
797 /* Pre-process 'mr_buf' items for add/update of virtual port
802 int i;
813 ice_debug(hw, ICE_DBG_SW, "Error VSI index (%u) out-of-range\n",
832 cmd->rule_id = CPU_TO_LE16(((*rule_id) & ICE_AQC_RULE_ID_M) |
834 cmd->rule_type = CPU_TO_LE16(rule_type & ICE_AQC_RULE_TYPE_M);
835 cmd->num_entries = CPU_TO_LE16(count);
836 cmd->dest = CPU_TO_LE16(dest_vsi);
840 *rule_id = LE16_TO_CPU(cmd->rule_id) & ICE_AQC_RULE_ID_M;
848 * ice_aq_delete_mir_rule - delete a mirror rule
857 int
872 cmd->rule_id = CPU_TO_LE16(rule_id);
875 cmd->flags = CPU_TO_LE16(ICE_AQC_FLAG_KEEP_ALLOCD_M);
885 * @opc: switch rules population command type - pass in the command opcode
889 static int
897 int status;
903 sw_buf->num_elems = CPU_TO_LE16(1);
913 sw_buf->res_type = CPU_TO_LE16(ICE_AQC_RES_TYPE_VSI_LIST_REP);
915 sw_buf->res_type =
923 sw_buf->elem[0].e.sw_resp = CPU_TO_LE16(*vsi_list_id);
930 vsi_ele = &sw_buf->elem[0];
931 *vsi_list_id = LE16_TO_CPU(vsi_ele->e.sw_resp);
940 * ice_aq_set_storm_ctrl - Sets storm control configuration
948 int
959 cmd->bcast_thresh_size = CPU_TO_LE32(bcast_thresh & ICE_AQ_THRESHOLD_M);
960 cmd->mcast_thresh_size = CPU_TO_LE32(mcast_thresh & ICE_AQ_THRESHOLD_M);
961 cmd->storm_ctrl_ctrl = CPU_TO_LE32(ctl_bitmask);
967 * ice_aq_get_storm_ctrl - gets storm control configuration
975 int
980 int status;
989 *bcast_thresh = LE32_TO_CPU(resp->bcast_thresh_size) &
992 *mcast_thresh = LE32_TO_CPU(resp->mcast_thresh_size) &
995 *ctl_bitmask = LE32_TO_CPU(resp->storm_ctrl_ctrl);
1002 * ice_aq_sw_rules - add/update/remove switch rules
1007 * @opc: switch rules population command type - pass in the command opcode
1012 int
1017 int status;
1033 hw->adminq.sq_last_status == ICE_AQ_RC_ENOENT)
1039 /* ice_init_port_info - Initialize port_info with switch configuration data
1053 pi->lport = (u8)(vsi_port_num & ICE_LPORT_MASK);
1054 pi->sw_id = swid;
1055 pi->pf_vf_num = pf_vf_num;
1056 pi->is_vf = is_vf;
1059 ice_debug(pi->hw, ICE_DBG_SW, "incorrect VSI/port type received\n");
1064 /* ice_get_initial_sw_cfg - Get initial port and default VSI data
1067 int ice_get_initial_sw_cfg(struct ice_hw *hw)
1073 int status;
1088 * writing a non-zero value in req_desc
1104 vsi_port_num = LE16_TO_CPU(ele->vsi_port_num) &
1107 pf_vf_num = LE16_TO_CPU(ele->pf_vf_num) &
1110 swid = LE16_TO_CPU(ele->swid);
1112 if (LE16_TO_CPU(ele->pf_vf_num) &
1116 res_type = (u8)(LE16_TO_CPU(ele->vsi_port_num) >>
1121 if (hw->fw_vsi_num != ICE_DFLT_VSI_INVAL)
1122 ice_debug(hw, ICE_DBG_SW, "fw_vsi_num %d -> %d\n",
1123 hw->fw_vsi_num, vsi_port_num);
1124 hw->fw_vsi_num = vsi_port_num;
1133 ice_init_port_info(hw->port_info,
1150 * ice_fill_sw_info - Helper function to populate lb_en and lan_en
1160 fi->lb_en = false;
1161 fi->lan_en = false;
1162 if ((fi->flag & ICE_FLTR_TX) &&
1163 (fi->fltr_act == ICE_FWD_TO_VSI ||
1164 fi->fltr_act == ICE_FWD_TO_VSI_LIST ||
1165 fi->fltr_act == ICE_FWD_TO_Q ||
1166 fi->fltr_act == ICE_FWD_TO_QGRP)) {
1170 if (fi->lkup_type != ICE_SW_LKUP_VLAN)
1171 fi->lb_en = true;
1177 * promiscuous, ethertype-MAC, promiscuous-VLAN
1178 * and default-port OR
1190 if (hw->evb_veb) {
1191 if (fi->lkup_type == ICE_SW_LKUP_ETHERTYPE ||
1192 fi->lkup_type == ICE_SW_LKUP_PROMISC ||
1193 fi->lkup_type == ICE_SW_LKUP_ETHERTYPE_MAC ||
1194 fi->lkup_type == ICE_SW_LKUP_PROMISC_VLAN ||
1195 fi->lkup_type == ICE_SW_LKUP_DFLT ||
1196 fi->lkup_type == ICE_SW_LKUP_VLAN ||
1197 (fi->lkup_type == ICE_SW_LKUP_MAC &&
1198 !IS_UNICAST_ETHER_ADDR(fi->l_data.mac.mac_addr)) ||
1199 (fi->lkup_type == ICE_SW_LKUP_MAC_VLAN &&
1200 !IS_UNICAST_ETHER_ADDR(fi->l_data.mac.mac_addr))) {
1201 if (!fi->fltVeb_en)
1202 fi->lan_en = true;
1205 fi->lan_en = true;
1211 if (fi->flag & ICE_FLTR_RX_LB) {
1212 fi->lb_en = false;
1213 fi->lan_en = true;
1218 * ice_fill_sw_rule - Helper function to fill switch rule structure
1222 * @opc: switch rules population command type - pass in the command opcode
1239 s_rule->act = 0;
1240 s_rule->index = CPU_TO_LE16(f_info->fltr_rule_id);
1241 s_rule->hdr_len = 0;
1246 eth_hdr = s_rule->hdr_data;
1252 switch (f_info->fltr_act) {
1254 act |= (f_info->fwd_id.hw_vsi_id << ICE_SINGLE_ACT_VSI_ID_S) &
1256 if (f_info->lkup_type != ICE_SW_LKUP_VLAN)
1262 act |= (f_info->fwd_id.vsi_list_id <<
1265 if (f_info->lkup_type != ICE_SW_LKUP_VLAN)
1271 act |= (f_info->fwd_id.q_id << ICE_SINGLE_ACT_Q_INDEX_S) &
1279 q_rgn = f_info->qgrp_size > 0 ?
1280 (u8)ice_ilog2(f_info->qgrp_size) : 0;
1282 act |= (f_info->fwd_id.q_id << ICE_SINGLE_ACT_Q_INDEX_S) &
1291 if (f_info->lb_en)
1293 if (f_info->lan_en)
1296 switch (f_info->lkup_type) {
1298 daddr = f_info->l_data.mac.mac_addr;
1301 vlan_id = f_info->l_data.vlan.vlan_id;
1302 if (f_info->l_data.vlan.tpid_valid)
1303 vlan_tpid = f_info->l_data.vlan.tpid;
1304 if (f_info->fltr_act == ICE_FWD_TO_VSI ||
1305 f_info->fltr_act == ICE_FWD_TO_VSI_LIST) {
1311 daddr = f_info->l_data.ethertype_mac.mac_addr;
1312 /* fall-through */
1315 *off = CPU_TO_BE16(f_info->l_data.ethertype_mac.ethertype);
1318 daddr = f_info->l_data.mac_vlan.mac_addr;
1319 vlan_id = f_info->l_data.mac_vlan.vlan_id;
1322 vlan_id = f_info->l_data.mac_vlan.vlan_id;
1323 /* fall-through */
1325 daddr = f_info->l_data.mac_vlan.mac_addr;
1331 s_rule->hdr.type = (f_info->flag & ICE_FLTR_RX) ?
1336 s_rule->recipe_id = CPU_TO_LE16(f_info->lkup_type);
1337 s_rule->src = CPU_TO_LE16(f_info->src);
1338 s_rule->act = CPU_TO_LE32(act);
1353 s_rule->hdr_len = CPU_TO_LE16(eth_hdr_sz);
1366 static int
1373 * 1. FWD action: FWD TO VSI or VSI LIST
1380 int status;
1384 if (m_ent->fltr_info.lkup_type != ICE_SW_LKUP_MAC)
1387 /* Create two back-to-back switch rules and submit them to the HW using
1402 lg_act->hdr.type = CPU_TO_LE16(ICE_AQC_SW_RULES_T_LG_ACT);
1403 lg_act->index = CPU_TO_LE16(l_id);
1404 lg_act->size = CPU_TO_LE16(num_lg_acts);
1409 id = (m_ent->vsi_count > 1) ? m_ent->fltr_info.fwd_id.vsi_list_id :
1410 m_ent->fltr_info.fwd_id.hw_vsi_id;
1414 if (m_ent->vsi_count > 1)
1416 lg_act->act[0] = CPU_TO_LE32(act);
1422 lg_act->act[1] = CPU_TO_LE32(act);
1432 lg_act->act[2] = CPU_TO_LE32(act);
1435 ice_fill_sw_rule(hw, &m_ent->fltr_info, rx_tx,
1439 rx_tx->act = CPU_TO_LE32(ICE_SINGLE_ACT_PTR |
1447 rx_tx->index = CPU_TO_LE16(m_ent->fltr_info.fltr_rule_id);
1452 m_ent->lg_act_idx = l_id;
1453 m_ent->sw_marker_id = sw_marker;
1461 * ice_add_counter_act - add/update filter rule with counter action
1467 static int
1474 const int num_acts = 2;
1479 int status;
1482 if (m_ent->fltr_info.lkup_type != ICE_SW_LKUP_MAC)
1485 /* Create two back-to-back switch rules and submit them to the HW using
1501 lg_act->hdr.type = CPU_TO_LE16(ICE_AQC_SW_RULES_T_LG_ACT);
1502 lg_act->index = CPU_TO_LE16(l_id);
1503 lg_act->size = CPU_TO_LE16(num_acts);
1508 id = (m_ent->vsi_count > 1) ? m_ent->fltr_info.fwd_id.vsi_list_id :
1509 m_ent->fltr_info.fwd_id.hw_vsi_id;
1514 if (m_ent->vsi_count > 1)
1516 lg_act->act[0] = CPU_TO_LE32(act);
1522 lg_act->act[1] = CPU_TO_LE32(act);
1525 ice_fill_sw_rule(hw, &m_ent->fltr_info, rx_tx,
1530 rx_tx->act = CPU_TO_LE32(act);
1536 f_rule_id = m_ent->fltr_info.fltr_rule_id;
1537 rx_tx->index = CPU_TO_LE16(f_rule_id);
1542 m_ent->lg_act_idx = l_id;
1543 m_ent->counter_index = (u8)counter_id;
1564 struct ice_switch_info *sw = hw->switch_info;
1566 int i;
1572 v_map->vsi_list_id = vsi_list_id;
1573 v_map->ref_cnt = 1;
1575 ice_set_bit(vsi_handle_arr[i], v_map->vsi_map);
1577 LIST_ADD(&v_map->list_entry, &sw->vsi_list_map_head);
1588 * @opc: switch rules population command type - pass in the command opcode
1594 static int
1602 int status;
1603 int i;
1634 s_rule->vsi[i] =
1638 s_rule->hdr.type = CPU_TO_LE16(rule_type);
1639 s_rule->number_vsi = CPU_TO_LE16(num_vsi);
1640 s_rule->index = CPU_TO_LE16(vsi_list_id);
1650 * ice_create_vsi_list_rule - Creates and populates a VSI list rule
1657 static int
1661 int status;
1684 static int
1690 int status;
1704 fm_entry->fltr_info = f_entry->fltr_info;
1707 fm_entry->vsi_count = 1;
1708 fm_entry->lg_act_idx = ICE_INVAL_LG_ACT_INDEX;
1709 fm_entry->sw_marker_id = ICE_INVAL_SW_MARKER_ID;
1710 fm_entry->counter_index = ICE_INVAL_COUNTER_ID;
1712 ice_fill_sw_rule(hw, &fm_entry->fltr_info, s_rule,
1724 f_entry->fltr_info.fltr_rule_id = LE16_TO_CPU(s_rule->index);
1725 fm_entry->fltr_info.fltr_rule_id = LE16_TO_CPU(s_rule->index);
1730 LIST_ADD(&fm_entry->list_entry, &recp_list->filt_rules);
1745 static int
1749 int status;
1759 s_rule->index = CPU_TO_LE16(f_info->fltr_rule_id);
1777 int ice_update_sw_rule_bridge_mode(struct ice_hw *hw)
1783 int status = 0;
1785 sw = hw->switch_info;
1787 rule_lock = &sw->recp_list[ICE_SW_LKUP_MAC].filt_rule_lock;
1788 rule_head = &sw->recp_list[ICE_SW_LKUP_MAC].filt_rules;
1793 struct ice_fltr_info *fi = &fm_entry->fltr_info;
1794 u8 *addr = fi->l_data.mac.mac_addr;
1799 if ((fi->flag & ICE_FLTR_TX) && IS_UNICAST_ETHER_ADDR(addr) &&
1800 (fi->fltr_act == ICE_FWD_TO_VSI ||
1801 fi->fltr_act == ICE_FWD_TO_VSI_LIST ||
1802 fi->fltr_act == ICE_FWD_TO_Q ||
1803 fi->fltr_act == ICE_FWD_TO_QGRP)) {
1836 static int
1843 int status = 0;
1845 if ((cur_fltr->fltr_act == ICE_FWD_TO_Q ||
1846 cur_fltr->fltr_act == ICE_FWD_TO_QGRP))
1849 if ((new_fltr->fltr_act == ICE_FWD_TO_Q ||
1850 new_fltr->fltr_act == ICE_FWD_TO_QGRP) &&
1851 (cur_fltr->fltr_act == ICE_FWD_TO_VSI ||
1852 cur_fltr->fltr_act == ICE_FWD_TO_VSI_LIST))
1855 if (m_entry->vsi_count < 2 && !m_entry->vsi_list_info) {
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;
1871 new_fltr->lkup_type);
1876 tmp_fltr.fltr_rule_id = cur_fltr->fltr_rule_id;
1880 * "MAC fwd to VSI list"
1886 cur_fltr->fwd_id.vsi_list_id = vsi_list_id;
1887 cur_fltr->fltr_act = ICE_FWD_TO_VSI_LIST;
1888 m_entry->vsi_list_info =
1892 if (!m_entry->vsi_list_info)
1896 * to be updated to point to FWD to VSI list
1898 if (m_entry->sw_marker_id != ICE_INVAL_SW_MARKER_ID)
1901 m_entry->sw_marker_id,
1902 m_entry->lg_act_idx);
1904 u16 vsi_handle = new_fltr->vsi_handle;
1907 if (!m_entry->vsi_list_info)
1911 if (ice_is_bit_set(m_entry->vsi_list_info->vsi_map, vsi_handle))
1917 vsi_list_id = cur_fltr->fwd_id.vsi_list_id;
1922 new_fltr->lkup_type);
1926 m_entry->vsi_list_info->vsi_map);
1929 m_entry->vsi_count++;
1934 * ice_find_rule_entry - Search a rule entry
1949 if (!memcmp(&f_info->l_data, &list_itr->fltr_info.l_data,
1950 sizeof(f_info->l_data)) &&
1951 f_info->flag == list_itr->fltr_info.flag) {
1960 * ice_find_vsi_list_entry - Search VSI list map with VSI count 1
1976 list_head = &recp_list->filt_rules;
1977 if (recp_list->adv_rule) {
1983 if (list_itr->vsi_list_info) {
1984 map_info = list_itr->vsi_list_info;
1985 if (ice_is_bit_set(map_info->vsi_map,
1987 *vsi_list_id = map_info->vsi_list_id;
1998 if (list_itr->vsi_count == 1 &&
1999 list_itr->vsi_list_info) {
2000 map_info = list_itr->vsi_list_info;
2001 if (ice_is_bit_set(map_info->vsi_map,
2003 *vsi_list_id = map_info->vsi_list_id;
2013 * ice_add_rule_internal - add rule for a given lookup type
2021 static int
2028 int status = 0;
2030 if (!ice_is_vsi_valid(hw, f_entry->fltr_info.vsi_handle))
2033 /* Load the hw_vsi_id only if the fwd action is fwd to VSI */
2034 if (f_entry->fltr_info.fltr_act == ICE_FWD_TO_VSI)
2035 f_entry->fltr_info.fwd_id.hw_vsi_id =
2036 ice_get_hw_vsi_num(hw, f_entry->fltr_info.vsi_handle);
2038 rule_lock = &recp_list->filt_rule_lock;
2041 new_fltr = &f_entry->fltr_info;
2042 if (new_fltr->flag & ICE_FLTR_RX)
2043 new_fltr->src = lport;
2044 else if (new_fltr->flag & (ICE_FLTR_TX | ICE_FLTR_RX_LB))
2045 new_fltr->src =
2046 ice_get_hw_vsi_num(hw, f_entry->fltr_info.vsi_handle);
2048 m_entry = ice_find_rule_entry(&recp_list->filt_rules, new_fltr);
2054 cur_fltr = &m_entry->fltr_info;
2071 static int
2089 static int
2095 int status = 0;
2097 if (fm_list->fltr_info.fltr_act != ICE_FWD_TO_VSI_LIST ||
2098 fm_list->vsi_count == 0)
2102 if (!ice_is_bit_set(fm_list->vsi_list_info->vsi_map, vsi_handle))
2105 lkup_type = fm_list->fltr_info.lkup_type;
2106 vsi_list_id = fm_list->fltr_info.fwd_id.vsi_list_id;
2113 fm_list->vsi_count--;
2114 ice_clear_bit(vsi_handle, fm_list->vsi_list_info->vsi_map);
2116 if (fm_list->vsi_count == 1 && lkup_type != ICE_SW_LKUP_VLAN) {
2117 struct ice_fltr_info tmp_fltr_info = fm_list->fltr_info;
2119 fm_list->vsi_list_info;
2122 rem_vsi_handle = ice_find_first_bit(vsi_list_info->vsi_map,
2141 ice_debug(hw, ICE_DBG_SW, "Failed to update pkt fwd rule to FWD_TO_VSI on HW VSI %d, error %d\n",
2146 fm_list->fltr_info = tmp_fltr_info;
2149 if ((fm_list->vsi_count == 1 && lkup_type != ICE_SW_LKUP_VLAN) ||
2150 (fm_list->vsi_count == 0 && lkup_type == ICE_SW_LKUP_VLAN)) {
2152 fm_list->vsi_list_info;
2162 LIST_DEL(&vsi_list_info->list_entry);
2164 fm_list->vsi_list_info = NULL;
2171 * ice_remove_rule_internal - Remove a filter rule of a given type
2176 static int
2183 int status = 0;
2186 if (!ice_is_vsi_valid(hw, f_entry->fltr_info.vsi_handle))
2188 f_entry->fltr_info.fwd_id.hw_vsi_id =
2189 ice_get_hw_vsi_num(hw, f_entry->fltr_info.vsi_handle);
2191 rule_lock = &recp_list->filt_rule_lock;
2194 list_elem = ice_find_rule_entry(&recp_list->filt_rules,
2195 &f_entry->fltr_info);
2201 if (list_elem->fltr_info.fltr_act != ICE_FWD_TO_VSI_LIST) {
2203 } else if (!list_elem->vsi_list_info) {
2206 } else if (list_elem->vsi_list_info->ref_cnt > 1) {
2210 * is in-use by other rules.
2212 list_elem->vsi_list_info->ref_cnt--;
2220 vsi_handle = f_entry->fltr_info.vsi_handle;
2225 if (list_elem->vsi_count == 0)
2240 ice_fill_sw_rule(hw, &list_elem->fltr_info, s_rule,
2253 LIST_DEL(&list_elem->list_entry);
2262 * ice_aq_get_res_alloc - get allocated resources
2269 * The caller-supplied buffer must be large enough to store the resource
2273 int
2280 int status;
2294 *num_entries = LE16_TO_CPU(resp->resp_elem_num);
2300 * ice_aq_get_res_descs - get allocated resource descriptors
2307 * @desc_id: input - first desc ID to start; output - next desc ID
2310 int
2317 int status;
2331 cmd->ops.cmd.res = CPU_TO_LE16(((res_type << ICE_AQC_RES_TYPE_S) &
2334 cmd->ops.cmd.first_desc = CPU_TO_LE16(*desc_id);
2338 *desc_id = LE16_TO_CPU(cmd->ops.resp.next_desc);
2344 * ice_add_mac_rule - Add a MAC address based filter rule
2356 static int
2360 struct ice_sw_recipe *recp_list = &sw->recp_list[ICE_SW_LKUP_MAC];
2367 int status = 0;
2371 rule_lock = &recp_list->filt_rule_lock;
2372 rule_head = &recp_list->filt_rules;
2376 u8 *add = &m_list_itr->fltr_info.l_data.mac.mac_addr[0];
2380 m_list_itr->fltr_info.flag = ICE_FLTR_TX;
2381 vsi_handle = m_list_itr->fltr_info.vsi_handle;
2385 if (m_list_itr->fltr_info.fltr_act == ICE_FWD_TO_VSI)
2386 m_list_itr->fltr_info.fwd_id.hw_vsi_id = hw_vsi_id;
2388 if (m_list_itr->fltr_info.src_id != ICE_SRC_ID_VSI)
2390 m_list_itr->fltr_info.src = hw_vsi_id;
2391 if (m_list_itr->fltr_info.lkup_type != ICE_SW_LKUP_MAC ||
2394 if (IS_UNICAST_ETHER_ADDR(add) && !hw->umac_shared) {
2398 &m_list_itr->fltr_info)) {
2405 (IS_UNICAST_ETHER_ADDR(add) && hw->umac_shared)) {
2406 m_list_itr->status =
2409 if (m_list_itr->status)
2410 return m_list_itr->status;
2433 struct ice_fltr_info *f_info = &m_list_itr->fltr_info;
2434 u8 *mac_addr = &f_info->l_data.mac.mac_addr[0];
2437 ice_fill_sw_rule(hw, &m_list_itr->fltr_info, r_iter,
2448 total_elem_left -= elem_sent) {
2466 struct ice_fltr_info *f_info = &m_list_itr->fltr_info;
2467 u8 *mac_addr = &f_info->l_data.mac.mac_addr[0];
2471 f_info->fltr_rule_id =
2472 LE16_TO_CPU(r_iter->index);
2473 f_info->fltr_act = ICE_FWD_TO_VSI;
2481 fm_entry->fltr_info = *f_info;
2482 fm_entry->vsi_count = 1;
2487 LIST_ADD(&fm_entry->list_entry, rule_head);
2501 * ice_add_mac - Add a MAC address based filter rule
2507 int ice_add_mac(struct ice_hw *hw, struct LIST_HEAD_TYPE *m_list)
2512 return ice_add_mac_rule(hw, m_list, hw->switch_info,
2513 hw->port_info->lport);
2517 * ice_add_vlan_internal - Add one VLAN based filter rule
2522 static int
2531 int status = 0;
2533 if (!ice_is_vsi_valid(hw, f_entry->fltr_info.vsi_handle))
2536 f_entry->fltr_info.fwd_id.hw_vsi_id =
2537 ice_get_hw_vsi_num(hw, f_entry->fltr_info.vsi_handle);
2538 new_fltr = &f_entry->fltr_info;
2541 if (new_fltr->l_data.vlan.vlan_id > ICE_MAX_VLAN_ID)
2544 if (new_fltr->src_id != ICE_SRC_ID_VSI)
2547 new_fltr->src = new_fltr->fwd_id.hw_vsi_id;
2548 lkup_type = new_fltr->lkup_type;
2549 vsi_handle = new_fltr->vsi_handle;
2550 rule_lock = &recp_list->filt_rule_lock;
2552 v_list_itr = ice_find_rule_entry(&recp_list->filt_rules, new_fltr);
2556 if (new_fltr->fltr_act == ICE_FWD_TO_VSI) {
2575 new_fltr->fltr_act = ICE_FWD_TO_VSI_LIST;
2576 new_fltr->fwd_id.vsi_list_id = vsi_list_id;
2581 v_list_itr = ice_find_rule_entry(&recp_list->filt_rules,
2589 v_list_itr->vsi_list_info = map_info;
2590 map_info->ref_cnt++;
2592 v_list_itr->vsi_list_info =
2597 } else if (v_list_itr->vsi_list_info->ref_cnt == 1) {
2601 cur_fltr = &v_list_itr->fltr_info;
2617 if (v_list_itr->vsi_count > 1 &&
2618 v_list_itr->vsi_list_info->ref_cnt > 1) {
2625 ice_find_first_bit(v_list_itr->vsi_list_info->vsi_map,
2641 tmp_fltr = v_list_itr->fltr_info;
2642 tmp_fltr.fltr_rule_id = v_list_itr->fltr_info.fltr_rule_id;
2655 v_list_itr->vsi_list_info->ref_cnt--;
2658 v_list_itr->fltr_info.fwd_id.vsi_list_id = vsi_list_id;
2659 v_list_itr->vsi_list_info =
2662 v_list_itr->vsi_count++;
2671 * ice_add_vlan_rule - Add VLAN based filter rule
2676 static int
2683 recp_list = &sw->recp_list[ICE_SW_LKUP_VLAN];
2686 if (v_list_itr->fltr_info.lkup_type != ICE_SW_LKUP_VLAN)
2688 v_list_itr->fltr_info.flag = ICE_FLTR_TX;
2689 v_list_itr->status = ice_add_vlan_internal(hw, recp_list,
2691 if (v_list_itr->status)
2692 return v_list_itr->status;
2698 * ice_add_vlan - Add a VLAN based filter rule
2704 int ice_add_vlan(struct ice_hw *hw, struct LIST_HEAD_TYPE *v_list)
2709 return ice_add_vlan_rule(hw, v_list, hw->switch_info);
2713 * ice_add_eth_mac_rule - Add ethertype and MAC based filter rule
2723 static int
2734 l_type = em_list_itr->fltr_info.lkup_type;
2735 recp_list = &sw->recp_list[l_type];
2741 em_list_itr->status = ice_add_rule_internal(hw, recp_list,
2744 if (em_list_itr->status)
2745 return em_list_itr->status;
2751 * ice_add_eth_mac - Add a ethertype based filter rule
2757 int
2763 return ice_add_eth_mac_rule(hw, em_list, hw->switch_info,
2764 hw->port_info->lport);
2768 * ice_remove_eth_mac_rule - Remove an ethertype (or MAC) based filter rule
2773 static int
2784 l_type = em_list_itr->fltr_info.lkup_type;
2790 recp_list = &sw->recp_list[l_type];
2791 em_list_itr->status = ice_remove_rule_internal(hw, recp_list,
2793 if (em_list_itr->status)
2794 return em_list_itr->status;
2800 * ice_remove_eth_mac - remove a ethertype based filter rule
2805 int
2811 return ice_remove_eth_mac_rule(hw, em_list, hw->switch_info);
2815 * ice_get_lg_act_aqc_res_type - get resource type for a large action
2822 static int
2823 ice_get_lg_act_aqc_res_type(u16 *res_type, int num_acts)
2853 * ice_alloc_res_lg_act - add large action resource
2858 static int
2863 int status;
2878 sw_buf->res_type = CPU_TO_LE16(res_type);
2879 sw_buf->num_elems = CPU_TO_LE16(1);
2884 *l_id = LE16_TO_CPU(sw_buf->elem[0].e.sw_resp);
2905 LIST_DEL(&entry->list_entry);
2917 struct ice_switch_info *sw = hw->switch_info;
2923 rule_head = &sw->recp_list[i].filt_rules;
2924 if (!sw->recp_list[i].adv_rule)
2930 * ice_cfg_dflt_vsi - change state of VSI to set/clear default
2939 int
2946 struct ice_hw *hw = pi->hw;
2947 u8 lport = pi->lport;
2949 int status;
2951 recp_list = &pi->hw->switch_info->recp_list[ICE_SW_LKUP_DFLT];
2967 f_info.src = pi->lport;
2986 * ice_check_if_dflt_vsi - check if VSI is default VSI
3002 recp_list = &pi->hw->switch_info->recp_list[ICE_SW_LKUP_DFLT];
3003 rule_lock = &recp_list->filt_rule_lock;
3004 rule_head = &recp_list->filt_rules;
3024 * ice_find_ucast_rule_entry - Search for a unicast MAC filter rule entry
3028 * Helper function to search for a unicast rule entry - this is to be used
3042 if (!memcmp(&f_info->l_data, &list_itr->fltr_info.l_data,
3043 sizeof(f_info->l_data)) &&
3044 f_info->fwd_id.hw_vsi_id ==
3045 list_itr->fltr_info.fwd_id.hw_vsi_id &&
3046 f_info->flag == list_itr->fltr_info.flag)
3053 * ice_remove_mac_rule - remove a MAC based filter rule
3066 static int
3076 rule_lock = &recp_list->filt_rule_lock;
3079 enum ice_sw_lkup_type l_type = list_itr->fltr_info.lkup_type;
3080 u8 *add = &list_itr->fltr_info.l_data.mac.mac_addr[0];
3086 vsi_handle = list_itr->fltr_info.vsi_handle;
3090 list_itr->fltr_info.fwd_id.hw_vsi_id =
3092 if (IS_UNICAST_ETHER_ADDR(add) && !hw->umac_shared) {
3098 if (!ice_find_ucast_rule_entry(&recp_list->filt_rules,
3099 &list_itr->fltr_info)) {
3105 list_itr->status = ice_remove_rule_internal(hw, recp_list,
3107 if (list_itr->status)
3108 return list_itr->status;
3114 * ice_remove_mac - remove a MAC address based filter rule
3119 int ice_remove_mac(struct ice_hw *hw, struct LIST_HEAD_TYPE *m_list)
3123 recp_list = &hw->switch_info->recp_list[ICE_SW_LKUP_MAC];
3128 * ice_remove_vlan_rule - Remove VLAN based filter rule
3133 static int
3141 enum ice_sw_lkup_type l_type = v_list_itr->fltr_info.lkup_type;
3145 v_list_itr->status = ice_remove_rule_internal(hw, recp_list,
3147 if (v_list_itr->status)
3148 return v_list_itr->status;
3154 * ice_remove_vlan - remove a VLAN address based filter rule
3159 int
3167 recp_list = &hw->switch_info->recp_list[ICE_SW_LKUP_VLAN];
3172 * ice_vsi_uses_fltr - Determine if given VSI uses specified filter
3179 return ((fm_entry->fltr_info.fltr_act == ICE_FWD_TO_VSI &&
3180 fm_entry->fltr_info.vsi_handle == vsi_handle) ||
3181 (fm_entry->fltr_info.fltr_act == ICE_FWD_TO_VSI_LIST &&
3182 fm_entry->vsi_list_info &&
3183 (ice_is_bit_set(fm_entry->vsi_list_info->vsi_map,
3188 * ice_add_entry_to_vsi_fltr_list - Add copy of fltr_list_entry to remove list
3200 static int
3214 tmp->fltr_info = *fi;
3221 tmp->fltr_info.fltr_act = ICE_FWD_TO_VSI;
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);
3225 LIST_ADD(&tmp->list_entry, vsi_list_head);
3231 * ice_add_to_vsi_fltr_list - Add VSI filters to the list
3243 static int
3249 int status = 0;
3262 &fm_entry->fltr_info);
3272 * @promisc_mask: pointer to mask to be filled in
3274 * Helper function to determine which ICE_PROMISC_ mask corresponds
3280 u16 vid = fi->l_data.mac_vlan.vlan_id;
3281 u8 *macaddr = fi->l_data.mac.mac_addr;
3287 if (fi->flag == ICE_FLTR_TX)
3289 if (fi->flag == ICE_FLTR_RX_LB)
3314 * _ice_get_vsi_promisc - get promiscuous mode of given VSI
3317 * @promisc_mask: pointer to mask to be filled in
3322 static int
3337 rule_head = &sw->recp_list[lkup].filt_rules;
3338 rule_lock = &sw->recp_list[lkup].filt_rule_lock;
3351 ice_determine_promisc_mask(&itr->fltr_info, fltr_promisc_mask);
3362 * ice_get_vsi_promisc - get promiscuous mode of given VSI
3365 * @promisc_mask: pointer to mask to be filled in
3368 int
3376 vid, hw->switch_info, ICE_SW_LKUP_PROMISC);
3380 * ice_get_vsi_vlan_promisc - get VLAN promiscuous mode of given VSI
3383 * @promisc_mask: pointer to mask to be filled in
3386 int
3394 vid, hw->switch_info,
3399 * ice_remove_promisc - Remove promisc based filter rules
3404 static int
3411 recp_list = &hw->switch_info->recp_list[recp_id];
3414 v_list_itr->status =
3416 if (v_list_itr->status)
3417 return v_list_itr->status;
3423 * _ice_clear_vsi_promisc - clear specified promiscuous mode(s)
3426 * @promisc_mask: pointer to mask of promiscuous config bits to clear
3430 static int
3442 int status = 0;
3454 rule_head = &sw->recp_list[recipe_id].filt_rules;
3455 rule_lock = &sw->recp_list[recipe_id].filt_rule_lock;
3467 fltr_info = &itr->fltr_info;
3470 vid != fltr_info->l_data.mac_vlan.vlan_id)
3477 /* Skip if filter is not completely specified by given mask */
3496 LIST_DEL(&fm_entry->list_entry);
3504 * ice_clear_vsi_promisc - clear specified promiscuous mode(s) for given VSI
3507 * @promisc_mask: pointer to mask of promiscuous config bits to clear
3510 int
3518 vid, hw->switch_info);
3522 * _ice_set_vsi_promisc - set given VSI to given promiscuous mode(s)
3525 * @promisc_mask: pointer to mask of promiscuous config bits
3530 static int
3540 int status = 0;
3542 int pkt_type;
3567 * combination, so we will loop over the mask value, store the
3568 * individual type, and clear it out in the input mask as it
3643 recp_list = &sw->recp_list[recipe_id];
3656 * ice_set_vsi_promisc - set given VSI to given promiscuous mode(s)
3659 * @promisc_mask: pointer to mask of promiscuous config bits
3662 int
3670 hw->port_info->lport,
3671 hw->switch_info);
3678 * @promisc_mask: pointer to mask of promiscuous config bits
3685 static int
3694 int status;
3698 vlan_lock = &sw->recp_list[ICE_SW_LKUP_VLAN].filt_rule_lock;
3699 vlan_head = &sw->recp_list[ICE_SW_LKUP_VLAN].filt_rules;
3713 list_itr->fltr_info.l_data.vlan.tpid == 0)
3716 vlan_id = list_itr->fltr_info.l_data.vlan.vlan_id;
3732 LIST_DEL(&list_itr->list_entry);
3742 * @promisc_mask: mask of promiscuous config bits
3747 int
3755 rm_vlan_promisc, hw->port_info->lport,
3756 hw->switch_info);
3760 * ice_remove_vsi_lkup_fltr - Remove lookup type filters for a VSI
3776 int status;
3817 LIST_DEL(&fm_entry->list_entry);
3823 * ice_remove_vsi_fltr_rule - Remove all filters for a VSI
3835 sw->recp_list, ICE_SW_LKUP_MAC);
3837 sw->recp_list, ICE_SW_LKUP_MAC_VLAN);
3839 sw->recp_list, ICE_SW_LKUP_PROMISC);
3841 sw->recp_list, ICE_SW_LKUP_VLAN);
3843 sw->recp_list, ICE_SW_LKUP_DFLT);
3845 sw->recp_list, ICE_SW_LKUP_ETHERTYPE);
3847 sw->recp_list, ICE_SW_LKUP_ETHERTYPE_MAC);
3849 sw->recp_list, ICE_SW_LKUP_PROMISC_VLAN);
3853 * ice_remove_vsi_fltr - Remove all filters for a VSI
3859 ice_remove_vsi_fltr_rule(hw, vsi_handle, hw->switch_info);
3863 * ice_alloc_res_cntr - allocating resource counter
3870 static int
3876 int status;
3884 buf->num_elems = CPU_TO_LE16(num_items);
3885 buf->res_type = CPU_TO_LE16(((type << ICE_AQC_RES_TYPE_S) &
3893 *counter_id = LE16_TO_CPU(buf->elem[0].e.sw_resp);
3901 * ice_free_res_cntr - free resource counter
3908 static int
3914 int status;
3922 buf->num_elems = CPU_TO_LE16(num_items);
3923 buf->res_type = CPU_TO_LE16(((type << ICE_AQC_RES_TYPE_S) &
3925 buf->elem[0].e.sw_resp = CPU_TO_LE16(counter_id);
3937 * ice_alloc_vlan_res_counter - obtain counter resource for VLAN type
3941 int ice_alloc_vlan_res_counter(struct ice_hw *hw, u16 *counter_id)
3949 * ice_free_vlan_res_counter - Free counter resource for VLAN type
3953 int ice_free_vlan_res_counter(struct ice_hw *hw, u16 counter_id)
3961 * ice_add_mac_with_sw_marker - add filter with sw marker
3966 int
3977 int ret;
3979 if (f_info->fltr_act != ICE_FWD_TO_VSI)
3982 if (f_info->lkup_type != ICE_SW_LKUP_MAC)
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);
4001 ret = ice_add_mac_rule(hw, &l_head, hw->switch_info,
4002 hw->port_info->lport);
4008 recp_list = &hw->switch_info->recp_list[ICE_SW_LKUP_MAC];
4009 rule_lock = &recp_list->filt_rule_lock;
4012 m_entry = ice_find_rule_entry(&recp_list->filt_rules, f_info);
4019 if (m_entry->counter_index != ICE_INVAL_COUNTER_ID) {
4025 if (m_entry->sw_marker_id == sw_marker) {
4057 * ice_add_mac_with_counter - add filter with counter enabled
4062 int
4073 int ret;
4075 if (f_info->fltr_act != ICE_FWD_TO_VSI)
4078 if (f_info->lkup_type != ICE_SW_LKUP_MAC)
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);
4084 recp_list = &hw->switch_info->recp_list[ICE_SW_LKUP_MAC];
4088 rule_lock = &recp_list->filt_rule_lock;
4098 ret = ice_add_mac_rule(hw, &l_head, hw->switch_info,
4099 hw->port_info->lport);
4106 m_entry = ice_find_rule_entry(&recp_list->filt_rules, f_info);
4113 if (m_entry->sw_marker_id != ICE_INVAL_SW_MARKER_ID) {
4119 if (m_entry->counter_index != ICE_INVAL_COUNTER_ID) {
4156 * ice_replay_fltr - Replay all the filters stored by a specific list head
4161 static int
4166 u8 lport = hw->port_info->lport;
4168 int status = 0;
4173 recp_list = &hw->switch_info->recp_list[recp_id];
4175 * they can be replayed. Otherwise when trying to re-add the same
4188 f_entry.fltr_info = itr->fltr_info;
4189 if (itr->vsi_count < 2 && recp_id != ICE_SW_LKUP_VLAN) {
4198 ice_for_each_set_bit(vsi_handle, itr->vsi_list_info->vsi_map,
4203 ice_clear_bit(vsi_handle, itr->vsi_list_info->vsi_map);
4226 * ice_replay_all_fltr - replay all filters stored in bookkeeping lists
4232 int ice_replay_all_fltr(struct ice_hw *hw)
4234 struct ice_switch_info *sw = hw->switch_info;
4235 int status = ICE_SUCCESS;
4239 struct LIST_HEAD_TYPE *head = &sw->recp_list[i].filt_rules;
4249 * ice_replay_vsi_fltr - Replay filters for requested VSI
4260 static int
4267 int status = 0;
4272 recp_list = &sw->recp_list[recp_id];
4279 f_entry.fltr_info = itr->fltr_info;
4280 if (itr->vsi_count < 2 && recp_id != ICE_SW_LKUP_VLAN &&
4281 itr->fltr_info.vsi_handle == vsi_handle) {
4286 pi->lport,
4292 if (!itr->vsi_list_info ||
4293 !ice_is_bit_set(itr->vsi_list_info->vsi_map, vsi_handle))
4304 pi->lport,
4314 * ice_replay_vsi_all_fltr - replay all filters stored in bookkeeping lists
4321 int
4326 int status = 0;
4329 sw = hw->switch_info;
4335 head = &sw->recp_list[i].filt_replay_rules;
4336 if (!sw->recp_list[i].adv_rule)
4347 * ice_rm_sw_replay_rule_info - helper function to delete filter replay rules
4361 if (!LIST_EMPTY(&sw->recp_list[i].filt_replay_rules)) {
4364 l_head = &sw->recp_list[i].filt_replay_rules;
4365 if (!sw->recp_list[i].adv_rule)
4372 * ice_rm_all_sw_replay_rule_info - deletes filter replay rules
4379 ice_rm_sw_replay_rule_info(hw, hw->switch_info);