Lines Matching refs:s_rule
183 struct ice_sw_rule_lkup_rx_tx *s_rule; in ice_lag_cfg_dflt_fltr() local
193 s_rule_sz = ICE_SW_RULE_RX_TX_ETH_HDR_SIZE(s_rule); in ice_lag_cfg_dflt_fltr()
194 s_rule = kzalloc(s_rule_sz, GFP_KERNEL); in ice_lag_cfg_dflt_fltr()
195 if (!s_rule) { in ice_lag_cfg_dflt_fltr()
201 eth_hdr = s_rule->hdr_data; in ice_lag_cfg_dflt_fltr()
209 s_rule->hdr.type = cpu_to_le16(ICE_AQC_SW_RULES_T_LKUP_RX); in ice_lag_cfg_dflt_fltr()
210 s_rule->recipe_id = cpu_to_le16(lag->pf_recipe); in ice_lag_cfg_dflt_fltr()
211 s_rule->src = cpu_to_le16(hw->port_info->lport); in ice_lag_cfg_dflt_fltr()
212 s_rule->act = cpu_to_le32(act); in ice_lag_cfg_dflt_fltr()
213 s_rule->hdr_len = cpu_to_le16(DUMMY_ETH_HDR_LEN); in ice_lag_cfg_dflt_fltr()
216 s_rule->index = cpu_to_le16(lag->pf_rule_id); in ice_lag_cfg_dflt_fltr()
220 err = ice_aq_sw_rules(&lag->pf->hw, s_rule, s_rule_sz, 1, opc, NULL); in ice_lag_cfg_dflt_fltr()
225 lag->pf_rule_id = le16_to_cpu(s_rule->index); in ice_lag_cfg_dflt_fltr()
230 kfree(s_rule); in ice_lag_cfg_dflt_fltr()
703 struct ice_sw_rule_lkup_rx_tx *s_rule = NULL; in ice_lag_cfg_cp_fltr() local
709 buf_len = ICE_SW_RULE_RX_TX_HDR_SIZE(s_rule, in ice_lag_cfg_cp_fltr()
711 s_rule = kzalloc(buf_len, GFP_KERNEL); in ice_lag_cfg_cp_fltr()
712 if (!s_rule) { in ice_lag_cfg_cp_fltr()
718 s_rule->hdr.type = cpu_to_le16(ICE_AQC_SW_RULES_T_LKUP_RX); in ice_lag_cfg_cp_fltr()
719 s_rule->recipe_id = cpu_to_le16(ICE_LAG_SRIOV_CP_RECIPE); in ice_lag_cfg_cp_fltr()
720 s_rule->src = cpu_to_le16(vsi->port_info->lport); in ice_lag_cfg_cp_fltr()
721 s_rule->act = cpu_to_le32(ICE_FWD_TO_VSI | in ice_lag_cfg_cp_fltr()
727 s_rule->hdr_len = cpu_to_le16(ICE_LAG_SRIOV_TRAIN_PKT_LEN); in ice_lag_cfg_cp_fltr()
728 memcpy(s_rule->hdr_data, lacp_train_pkt, LACP_TRAIN_PKT_LEN); in ice_lag_cfg_cp_fltr()
732 s_rule->index = cpu_to_le16(lag->cp_rule_idx); in ice_lag_cfg_cp_fltr()
734 if (ice_aq_sw_rules(&lag->pf->hw, s_rule, buf_len, 1, opc, NULL)) { in ice_lag_cfg_cp_fltr()
741 lag->cp_rule_idx = le16_to_cpu(s_rule->index); in ice_lag_cfg_cp_fltr()
746 kfree(s_rule); in ice_lag_cfg_cp_fltr()
1111 struct ice_sw_rule_vsi_list *s_rule = NULL; in ice_lag_add_prune_list() local
1126 rule_buf_sz = (u16)ICE_SW_RULE_VSI_LIST_SIZE(s_rule, num_vsi); in ice_lag_add_prune_list()
1127 s_rule = kzalloc(rule_buf_sz, GFP_KERNEL); in ice_lag_add_prune_list()
1128 if (!s_rule) { in ice_lag_add_prune_list()
1133 s_rule->hdr.type = cpu_to_le16(ICE_AQC_SW_RULES_T_PRUNE_LIST_SET); in ice_lag_add_prune_list()
1134 s_rule->index = cpu_to_le16(vsi_list_id); in ice_lag_add_prune_list()
1135 s_rule->number_vsi = cpu_to_le16(num_vsi); in ice_lag_add_prune_list()
1136 s_rule->vsi[0] = cpu_to_le16(event_vsi_num); in ice_lag_add_prune_list()
1138 if (ice_aq_sw_rules(&event_pf->hw, s_rule, rule_buf_sz, 1, in ice_lag_add_prune_list()
1141 kfree(s_rule); in ice_lag_add_prune_list()
1152 struct ice_sw_rule_vsi_list *s_rule = NULL; in ice_lag_del_prune_list() local
1167 rule_buf_sz = (u16)ICE_SW_RULE_VSI_LIST_SIZE(s_rule, num_vsi); in ice_lag_del_prune_list()
1168 s_rule = kzalloc(rule_buf_sz, GFP_KERNEL); in ice_lag_del_prune_list()
1169 if (!s_rule) { in ice_lag_del_prune_list()
1174 s_rule->hdr.type = cpu_to_le16(ICE_AQC_SW_RULES_T_PRUNE_LIST_CLEAR); in ice_lag_del_prune_list()
1175 s_rule->index = cpu_to_le16(vsi_list_id); in ice_lag_del_prune_list()
1176 s_rule->number_vsi = cpu_to_le16(num_vsi); in ice_lag_del_prune_list()
1177 s_rule->vsi[0] = cpu_to_le16(vsi_num); in ice_lag_del_prune_list()
1179 if (ice_aq_sw_rules(&event_pf->hw, (struct ice_aqc_sw_rules *)s_rule, in ice_lag_del_prune_list()
1183 kfree(s_rule); in ice_lag_del_prune_list()