Lines Matching refs:s_rule
212 struct ice_sw_rule_lkup_rx_tx *s_rule; in ice_lag_cfg_fltr() local
222 s_rule_sz = ICE_SW_RULE_RX_TX_ETH_HDR_SIZE(s_rule); in ice_lag_cfg_fltr()
223 s_rule = kzalloc(s_rule_sz, GFP_KERNEL); in ice_lag_cfg_fltr()
224 if (!s_rule) { in ice_lag_cfg_fltr()
230 eth_hdr = s_rule->hdr_data; in ice_lag_cfg_fltr()
235 s_rule->recipe_id = cpu_to_le16(recipe_id); in ice_lag_cfg_fltr()
237 s_rule->hdr.type = in ice_lag_cfg_fltr()
239 s_rule->src = cpu_to_le16(hw->port_info->lport); in ice_lag_cfg_fltr()
241 s_rule->hdr.type = in ice_lag_cfg_fltr()
243 s_rule->src = cpu_to_le16(vsi_num); in ice_lag_cfg_fltr()
245 s_rule->act = cpu_to_le32(act); in ice_lag_cfg_fltr()
246 s_rule->hdr_len = cpu_to_le16(DUMMY_ETH_HDR_LEN); in ice_lag_cfg_fltr()
249 s_rule->index = cpu_to_le16(*rule_idx); in ice_lag_cfg_fltr()
253 err = ice_aq_sw_rules(&lag->pf->hw, s_rule, s_rule_sz, 1, opc, NULL); in ice_lag_cfg_fltr()
258 *rule_idx = le16_to_cpu(s_rule->index); in ice_lag_cfg_fltr()
263 kfree(s_rule); in ice_lag_cfg_fltr()
781 struct ice_sw_rule_lkup_rx_tx *s_rule = NULL; in ice_lag_cfg_cp_fltr() local
787 buf_len = ICE_SW_RULE_RX_TX_HDR_SIZE(s_rule, in ice_lag_cfg_cp_fltr()
789 s_rule = kzalloc(buf_len, GFP_KERNEL); in ice_lag_cfg_cp_fltr()
790 if (!s_rule) { in ice_lag_cfg_cp_fltr()
796 s_rule->hdr.type = cpu_to_le16(ICE_AQC_SW_RULES_T_LKUP_RX); in ice_lag_cfg_cp_fltr()
797 s_rule->recipe_id = cpu_to_le16(ICE_LAG_SRIOV_CP_RECIPE); in ice_lag_cfg_cp_fltr()
798 s_rule->src = cpu_to_le16(vsi->port_info->lport); in ice_lag_cfg_cp_fltr()
799 s_rule->act = cpu_to_le32(ICE_FWD_TO_VSI | in ice_lag_cfg_cp_fltr()
803 s_rule->hdr_len = cpu_to_le16(ICE_LAG_SRIOV_TRAIN_PKT_LEN); in ice_lag_cfg_cp_fltr()
804 memcpy(s_rule->hdr_data, lacp_train_pkt, LACP_TRAIN_PKT_LEN); in ice_lag_cfg_cp_fltr()
808 s_rule->index = cpu_to_le16(lag->cp_rule_idx); in ice_lag_cfg_cp_fltr()
810 if (ice_aq_sw_rules(&lag->pf->hw, s_rule, buf_len, 1, opc, NULL)) { in ice_lag_cfg_cp_fltr()
817 lag->cp_rule_idx = le16_to_cpu(s_rule->index); in ice_lag_cfg_cp_fltr()
822 kfree(s_rule); in ice_lag_cfg_cp_fltr()
1178 struct ice_sw_rule_vsi_list *s_rule = NULL; in ice_lag_add_prune_list() local
1193 rule_buf_sz = (u16)ICE_SW_RULE_VSI_LIST_SIZE(s_rule, num_vsi); in ice_lag_add_prune_list()
1194 s_rule = kzalloc(rule_buf_sz, GFP_KERNEL); in ice_lag_add_prune_list()
1195 if (!s_rule) { in ice_lag_add_prune_list()
1200 s_rule->hdr.type = cpu_to_le16(ICE_AQC_SW_RULES_T_PRUNE_LIST_SET); in ice_lag_add_prune_list()
1201 s_rule->index = cpu_to_le16(vsi_list_id); in ice_lag_add_prune_list()
1202 s_rule->number_vsi = cpu_to_le16(num_vsi); in ice_lag_add_prune_list()
1203 s_rule->vsi[0] = cpu_to_le16(event_vsi_num); in ice_lag_add_prune_list()
1205 if (ice_aq_sw_rules(&event_pf->hw, s_rule, rule_buf_sz, 1, in ice_lag_add_prune_list()
1208 kfree(s_rule); in ice_lag_add_prune_list()
1219 struct ice_sw_rule_vsi_list *s_rule = NULL; in ice_lag_del_prune_list() local
1234 rule_buf_sz = (u16)ICE_SW_RULE_VSI_LIST_SIZE(s_rule, num_vsi); in ice_lag_del_prune_list()
1235 s_rule = kzalloc(rule_buf_sz, GFP_KERNEL); in ice_lag_del_prune_list()
1236 if (!s_rule) { in ice_lag_del_prune_list()
1241 s_rule->hdr.type = cpu_to_le16(ICE_AQC_SW_RULES_T_PRUNE_LIST_CLEAR); in ice_lag_del_prune_list()
1242 s_rule->index = cpu_to_le16(vsi_list_id); in ice_lag_del_prune_list()
1243 s_rule->number_vsi = cpu_to_le16(num_vsi); in ice_lag_del_prune_list()
1244 s_rule->vsi[0] = cpu_to_le16(vsi_num); in ice_lag_del_prune_list()
1246 if (ice_aq_sw_rules(&event_pf->hw, (struct ice_aqc_sw_rules *)s_rule, in ice_lag_del_prune_list()
1250 kfree(s_rule); in ice_lag_del_prune_list()