#define ICE_PPP_IPV6_PROTO_ID 0x0057
#define ICE_IPV6_ETHER_ID 0x86DD
#define ICE_TCP_PROTO_ID 0x06
+#define ICE_GTPU_PROFILE 24
#define ICE_ETH_P_8021Q 0x8100
/* Dummy ethernet header needed in the ice_aqc_sw_rules_elem
{ ICE_UDP_OF, 54 },
{ ICE_GTP, 62 },
{ ICE_IPV6_IL, 82 },
- { ICE_TCP_IL, 102 },
+ { ICE_TCP_IL, 122 },
{ ICE_PROTOCOL_LAST, 0 },
};
{ ICE_UDP_OF, 54 },
{ ICE_GTP, 62 },
{ ICE_IPV6_IL, 82 },
- { ICE_UDP_ILOS, 102 },
+ { ICE_UDP_ILOS, 122 },
{ ICE_PROTOCOL_LAST, 0 },
};
0x02, 0x00, 0x00, 0x00, /* PDU Session extension header */
0x00, 0x00, 0x00, 0x00,
+
};
static const struct ice_dummy_pkt_offsets dummy_ipv4_gtp_no_pay_packet_offsets[] = {
{ ICE_PROTOCOL_LAST, 0 },
};
+static const u8 dummy_ipv6_gtp_packet[] = {
+ 0x00, 0x00, 0x00, 0x00, /* ICE_MAC_OFOS 0 */
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x86, 0xdd,
+
+ 0x60, 0x00, 0x00, 0x00, /* ICE_IPV6_OFOS 14 */
+ 0x00, 0x6c, 0x11, 0x00, /* Next header UDP*/
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+
+ 0x08, 0x68, 0x08, 0x68, /* ICE_UDP_OF 54 */
+ 0x00, 0x00, 0x00, 0x00,
+
+ 0x30, 0x00, 0x00, 0x28, /* ICE_GTP 62 */
+ 0x00, 0x00, 0x00, 0x00,
+
+ 0x00, 0x00,
+};
+
static const struct ice_dummy_pkt_offsets dummy_pppoe_packet_offsets[] = {
{ ICE_MAC_OFOS, 0 },
{ ICE_ETYPE_OL, 12 },
{ ICE_MAC_OFOS, 0 },
{ ICE_ETYPE_OL, 12 },
{ ICE_VLAN_EX, 14 },
- { ICE_VLAN_OFOS, 18 },
+ { ICE_VLAN_IN, 18 },
{ ICE_IPV4_OFOS, 22 },
{ ICE_PROTOCOL_LAST, 0 },
};
0x91, 0x00, /* ICE_ETYPE_OL 12 */
0x00, 0x00, 0x81, 0x00, /* ICE_VLAN_EX 14 */
- 0x00, 0x00, 0x08, 0x00, /* ICE_VLAN_OFOS 18 */
+ 0x00, 0x00, 0x08, 0x00, /* ICE_VLAN_IN 18 */
0x45, 0x00, 0x00, 0x1c, /* ICE_IPV4_OFOS 22 */
0x00, 0x01, 0x00, 0x00,
{ ICE_MAC_OFOS, 0 },
{ ICE_ETYPE_OL, 12 },
{ ICE_VLAN_EX, 14 },
- { ICE_VLAN_OFOS, 18 },
+ { ICE_VLAN_IN, 18 },
{ ICE_IPV6_OFOS, 22 },
{ ICE_PROTOCOL_LAST, 0 },
};
0x91, 0x00, /* ICE_ETYPE_OL 12 */
0x00, 0x00, 0x81, 0x00, /* ICE_VLAN_EX 14 */
- 0x00, 0x00, 0x86, 0xDD, /* ICE_VLAN_OFOS 18 */
+ 0x00, 0x00, 0x86, 0xDD, /* ICE_VLAN_IN 18 */
0x60, 0x00, 0x00, 0x00, /* ICE_IPV6_OFOS 22 */
0x00, 0x10, 0x11, 0x00, /* Next header UDP */
{ ICE_MAC_OFOS, 0 },
{ ICE_ETYPE_OL, 12 },
{ ICE_VLAN_EX, 14 },
- { ICE_VLAN_OFOS, 18 },
+ { ICE_VLAN_IN, 18 },
{ ICE_PPPOE, 22 },
{ ICE_PROTOCOL_LAST, 0 },
};
{ ICE_MAC_OFOS, 0 },
{ ICE_ETYPE_OL, 12 },
{ ICE_VLAN_EX, 14 },
- { ICE_VLAN_OFOS, 18 },
+ { ICE_VLAN_IN, 18 },
{ ICE_PPPOE, 22 },
{ ICE_IPV4_OFOS, 30 },
{ ICE_PROTOCOL_LAST, 0 },
0x91, 0x00, /* ICE_ETYPE_OL 12 */
0x00, 0x00, 0x81, 0x00, /* ICE_VLAN_EX 14 */
- 0x00, 0x00, 0x88, 0x64, /* ICE_VLAN_OFOS 18 */
+ 0x00, 0x00, 0x88, 0x64, /* ICE_VLAN_IN 18 */
0x11, 0x00, 0x00, 0x00, /* ICE_PPPOE 22 */
0x00, 0x16,
0x00, 0x21, /* PPP Link Layer 28 */
- 0x45, 0x00, 0x00, 0x14, /* ICE_IPV4_IL 30 */
+ 0x45, 0x00, 0x00, 0x14, /* ICE_IPV4_OFOS 30 */
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
{ ICE_MAC_OFOS, 0 },
{ ICE_ETYPE_OL, 12 },
{ ICE_VLAN_EX, 14},
- { ICE_VLAN_OFOS, 18 },
+ { ICE_VLAN_IN, 18 },
{ ICE_PPPOE, 22 },
{ ICE_IPV6_OFOS, 30 },
{ ICE_PROTOCOL_LAST, 0 },
0x91, 0x00, /* ICE_ETYPE_OL 12 */
0x00, 0x00, 0x81, 0x00, /* ICE_VLAN_EX 14 */
- 0x00, 0x00, 0x88, 0x64, /* ICE_VLAN_OFOS 18 */
+ 0x00, 0x00, 0x88, 0x64, /* ICE_VLAN_IN 18 */
0x11, 0x00, 0x00, 0x00, /* ICE_PPPOE 22 */
0x00, 0x2a,
~ICE_AQ_RECIPE_RESULT_EN, recp->res_idxs);
}
+static struct ice_prof_type_entry ice_prof_type_tbl[ICE_GTPU_PROFILE] = {
+ { ICE_PROFID_IPV4_GTPU_IPV4_OTHER, ICE_SW_TUN_IPV4_GTPU_IPV4},
+ { ICE_PROFID_IPV4_GTPU_IPV4_UDP, ICE_SW_TUN_IPV4_GTPU_IPV4_UDP},
+ { ICE_PROFID_IPV4_GTPU_IPV4_TCP, ICE_SW_TUN_IPV4_GTPU_IPV4_TCP},
+ { ICE_PROFID_IPV4_GTPU_EH_IPV4_OTHER, ICE_SW_TUN_IPV4_GTPU_EH_IPV4},
+ { ICE_PROFID_IPV4_GTPU_EH_IPV4_UDP, ICE_SW_TUN_IPV4_GTPU_EH_IPV4_UDP},
+ { ICE_PROFID_IPV4_GTPU_EH_IPV4_TCP, ICE_SW_TUN_IPV4_GTPU_EH_IPV4_TCP},
+ { ICE_PROFID_IPV4_GTPU_IPV6_OTHER, ICE_SW_TUN_IPV4_GTPU_IPV6},
+ { ICE_PROFID_IPV4_GTPU_IPV6_UDP, ICE_SW_TUN_IPV4_GTPU_IPV6_UDP},
+ { ICE_PROFID_IPV4_GTPU_IPV6_TCP, ICE_SW_TUN_IPV4_GTPU_IPV6_TCP},
+ { ICE_PROFID_IPV4_GTPU_EH_IPV6_OTHER, ICE_SW_TUN_IPV4_GTPU_EH_IPV6},
+ { ICE_PROFID_IPV4_GTPU_EH_IPV6_UDP, ICE_SW_TUN_IPV4_GTPU_EH_IPV6_UDP},
+ { ICE_PROFID_IPV4_GTPU_EH_IPV6_TCP, ICE_SW_TUN_IPV4_GTPU_EH_IPV6_TCP},
+ { ICE_PROFID_IPV6_GTPU_IPV4_OTHER, ICE_SW_TUN_IPV6_GTPU_IPV4},
+ { ICE_PROFID_IPV6_GTPU_IPV4_UDP, ICE_SW_TUN_IPV6_GTPU_IPV4_UDP},
+ { ICE_PROFID_IPV6_GTPU_IPV4_TCP, ICE_SW_TUN_IPV6_GTPU_IPV4_TCP},
+ { ICE_PROFID_IPV6_GTPU_EH_IPV4_OTHER, ICE_SW_TUN_IPV6_GTPU_EH_IPV4},
+ { ICE_PROFID_IPV6_GTPU_EH_IPV4_UDP, ICE_SW_TUN_IPV6_GTPU_EH_IPV4_UDP},
+ { ICE_PROFID_IPV6_GTPU_EH_IPV4_TCP, ICE_SW_TUN_IPV6_GTPU_EH_IPV4_TCP},
+ { ICE_PROFID_IPV6_GTPU_IPV6_OTHER, ICE_SW_TUN_IPV6_GTPU_IPV6},
+ { ICE_PROFID_IPV6_GTPU_IPV6_UDP, ICE_SW_TUN_IPV6_GTPU_IPV6_UDP},
+ { ICE_PROFID_IPV6_GTPU_IPV6_TCP, ICE_SW_TUN_IPV6_GTPU_IPV6_TCP},
+ { ICE_PROFID_IPV6_GTPU_EH_IPV6_OTHER, ICE_SW_TUN_IPV6_GTPU_EH_IPV6},
+ { ICE_PROFID_IPV6_GTPU_EH_IPV6_UDP, ICE_SW_TUN_IPV6_GTPU_EH_IPV6_UDP},
+ { ICE_PROFID_IPV6_GTPU_EH_IPV6_TCP, ICE_SW_TUN_IPV6_GTPU_EH_IPV6_TCP},
+};
+
/**
* ice_get_tun_type_for_recipe - get tunnel type for the recipe
* @rid: recipe ID that we are populating
u8 pppoe_profile[7] = {34, 35, 36, 37, 38, 39, 40};
u8 non_tun_profile[6] = {4, 5, 6, 7, 8, 9};
enum ice_sw_tunnel_type tun_type;
- u16 i, j, profile_num = 0;
+ u16 i, j, k, profile_num = 0;
bool non_tun_valid = false;
bool pppoe_valid = false;
bool vxlan_valid = false;
}
if (tun_type == ICE_SW_TUN_GTP) {
- if (ice_is_bit_set(recipe_to_profile[rid],
- ICE_PROFID_IPV4_GTPU_IPV4_OTHER))
- tun_type = ICE_SW_TUN_IPV4_GTPU_IPV4;
- else if (ice_is_bit_set(recipe_to_profile[rid],
- ICE_PROFID_IPV4_GTPU_IPV6_OTHER))
- tun_type = ICE_SW_TUN_IPV4_GTPU_IPV6;
- else if (ice_is_bit_set(recipe_to_profile[rid],
- ICE_PROFID_IPV6_GTPU_IPV4_OTHER))
- tun_type = ICE_SW_TUN_IPV6_GTPU_IPV4;
- else if (ice_is_bit_set(recipe_to_profile[rid],
- ICE_PROFID_IPV6_GTPU_IPV6_OTHER))
- tun_type = ICE_SW_TUN_IPV6_GTPU_IPV6;
+ for (k = 0; k < ARRAY_SIZE(ice_prof_type_tbl); k++)
+ if (ice_is_bit_set(recipe_to_profile[rid],
+ ice_prof_type_tbl[k].prof_id)) {
+ tun_type = ice_prof_type_tbl[k].type;
+ break;
+ }
}
if (profile_num == 1 && (flag_valid || non_tun_valid || pppoe_valid)) {
}
/**
- * ice_free_global_lut - free a RSS global LUT
+ * ice_free_rss_global_lut - free a RSS global LUT
* @hw: pointer to the HW struct
* @global_lut_id: ID of the RSS global LUT to free
*/
buf_size = *num_recipes * sizeof(*s_recipe_list);
status = ice_aq_send_cmd(hw, &desc, s_recipe_list, buf_size, cd);
- /* cppcheck-suppress constArgument */
*num_recipes = LE16_TO_CPU(cmd->num_sub_recipes);
return status;
}
/**
- * ice_add_mac_vlan - Add MAC and VLAN pair based filter rule
+ * ice_add_mac_vlan_rule - Add MAC and VLAN pair based filter rule
* @hw: pointer to the hardware structure
* @mv_list: list of MAC and VLAN filters
* @sw: pointer to switch info struct for which function add rule
}
/**
- * ice_get_vsi_vlan_promisc - get VLAN promiscuous mode of given VSI
+ * _ice_get_vsi_vlan_promisc - get VLAN promiscuous mode of given VSI
* @hw: pointer to the hardware structure
* @vsi_handle: VSI handle to retrieve info from
* @promisc_mask: pointer to mask to be filled in
{ ICE_GENEVE, { 8, 10, 12, 14 } },
{ ICE_VXLAN_GPE, { 8, 10, 12, 14 } },
{ ICE_NVGRE, { 0, 2, 4, 6 } },
- { ICE_GTP, { 8, 10, 12, 14, 16, 18, 20 } },
+ { ICE_GTP, { 8, 10, 12, 14, 16, 18, 20, 22 } },
{ ICE_PPPOE, { 0, 2, 4, 6 } },
{ ICE_PFCP, { 8, 10, 12, 14, 16, 18, 20, 22 } },
{ ICE_L2TPV3, { 0, 2, 4, 6, 8, 10 } },
{ ICE_NAT_T, { 8, 10, 12, 14 } },
{ ICE_GTP_NO_PAY, { 8, 10, 12, 14 } },
{ ICE_VLAN_EX, { 0, 2 } },
+ { ICE_VLAN_IN, { 0, 2 } },
};
/* The following table describes preferred grouping of recipes.
* following policy.
*/
-static const struct ice_protocol_entry ice_prot_id_tbl[ICE_PROTOCOL_LAST] = {
+static struct ice_protocol_entry ice_prot_id_tbl[ICE_PROTOCOL_LAST] = {
{ ICE_MAC_OFOS, ICE_MAC_OFOS_HW },
{ ICE_MAC_IL, ICE_MAC_IL_HW },
{ ICE_ETYPE_OL, ICE_ETYPE_OL_HW },
{ ICE_NAT_T, ICE_UDP_ILOS_HW },
{ ICE_GTP_NO_PAY, ICE_UDP_ILOS_HW },
{ ICE_VLAN_EX, ICE_VLAN_OF_HW },
+ { ICE_VLAN_IN, ICE_VLAN_OL_HW },
};
/**
* Returns index of matching recipe, or ICE_MAX_NUM_RECIPES if not found.
*/
static u16 ice_find_recp(struct ice_hw *hw, struct ice_prot_lkup_ext *lkup_exts,
- enum ice_sw_tunnel_type tun_type)
+ enum ice_sw_tunnel_type tun_type, u32 priority)
{
bool refresh_required = true;
struct ice_sw_recipe *recp;
/* If for "i"th recipe the found was never set to false
* then it means we found our match
*/
- if (tun_type == recp[i].tun_type && found)
+ if (tun_type == recp[i].tun_type && found &&
+ priority == recp[i].priority)
return i; /* Return the recipe ID */
}
}
return ICE_MAX_NUM_RECIPES;
}
+/**
+ * ice_change_proto_id_to_dvm - change proto id in prot_id_tbl
+ *
+ * As protocol id for outer vlan is different in dvm and svm, if dvm is
+ * supported protocol array record for outer vlan has to be modified to
+ * reflect the value proper for DVM.
+ */
+void ice_change_proto_id_to_dvm(void)
+{
+ u8 i;
+
+ for (i = 0; i < ARRAY_SIZE(ice_prot_id_tbl); i++)
+ if (ice_prot_id_tbl[i].type == ICE_VLAN_OFOS &&
+ ice_prot_id_tbl[i].protocol_id != ICE_VLAN_OF_HW)
+ ice_prot_id_tbl[i].protocol_id = ICE_VLAN_OF_HW;
+}
+
/**
* ice_prot_type_to_id - get protocol ID from protocol type
* @type: protocol type
}
/**
- * ice_find_valid_words - count valid words
+ * ice_fill_valid_words - count valid words
* @rule: advanced rule with lookup information
* @lkup_exts: byte offset extractions of the words that are valid
*
}
/**
- * ice_tun_type_match_mask - determine if tun type needs a match mask
+ * ice_tun_type_match_word - determine if tun type needs a match mask
* @tun_type: tunnel type
* @mask: mask to be used for the tunnel
*/
case ICE_SW_IPV6_UDP:
ice_set_bit(ICE_PROFID_IPV6_UDP, bm);
return;
+ case ICE_SW_TUN_IPV4_GTPU_NO_PAY:
+ ice_set_bit(ICE_PROFID_IPV4_GTPU_TEID, bm);
+ return;
+ case ICE_SW_TUN_IPV6_GTPU_NO_PAY:
+ ice_set_bit(ICE_PROFID_IPV6_GTPU_TEID, bm);
+ return;
case ICE_SW_TUN_IPV4_GTPU_IPV4:
- ice_set_bit(ICE_PROFID_IPV4_GTPU_EH_IPV4_OTHER, bm);
ice_set_bit(ICE_PROFID_IPV4_GTPU_IPV4_OTHER, bm);
- ice_set_bit(ICE_PROFID_IPV4_GTPU_EH_IPV4_UDP, bm);
ice_set_bit(ICE_PROFID_IPV4_GTPU_IPV4_UDP, bm);
- ice_set_bit(ICE_PROFID_IPV4_GTPU_EH_IPV4_TCP, bm);
ice_set_bit(ICE_PROFID_IPV4_GTPU_IPV4_TCP, bm);
return;
+ case ICE_SW_TUN_IPV4_GTPU_IPV4_UDP:
+ ice_set_bit(ICE_PROFID_IPV4_GTPU_IPV4_UDP, bm);
+ return;
+ case ICE_SW_TUN_IPV4_GTPU_IPV4_TCP:
+ ice_set_bit(ICE_PROFID_IPV4_GTPU_IPV4_TCP, bm);
+ return;
+ case ICE_SW_TUN_IPV4_GTPU_EH_IPV4:
+ ice_set_bit(ICE_PROFID_IPV4_GTPU_EH_IPV4_OTHER, bm);
+ ice_set_bit(ICE_PROFID_IPV4_GTPU_EH_IPV4_UDP, bm);
+ ice_set_bit(ICE_PROFID_IPV4_GTPU_EH_IPV4_TCP, bm);
+ return;
+ case ICE_SW_TUN_IPV4_GTPU_EH_IPV4_UDP:
+ ice_set_bit(ICE_PROFID_IPV4_GTPU_EH_IPV4_UDP, bm);
+ return;
+ case ICE_SW_TUN_IPV4_GTPU_EH_IPV4_TCP:
+ ice_set_bit(ICE_PROFID_IPV4_GTPU_EH_IPV4_TCP, bm);
+ return;
case ICE_SW_TUN_IPV6_GTPU_IPV4:
- ice_set_bit(ICE_PROFID_IPV6_GTPU_EH_IPV4_OTHER, bm);
ice_set_bit(ICE_PROFID_IPV6_GTPU_IPV4_OTHER, bm);
- ice_set_bit(ICE_PROFID_IPV6_GTPU_EH_IPV4_UDP, bm);
ice_set_bit(ICE_PROFID_IPV6_GTPU_IPV4_UDP, bm);
- ice_set_bit(ICE_PROFID_IPV6_GTPU_EH_IPV4_TCP, bm);
ice_set_bit(ICE_PROFID_IPV6_GTPU_IPV4_TCP, bm);
return;
+ case ICE_SW_TUN_IPV6_GTPU_IPV4_UDP:
+ ice_set_bit(ICE_PROFID_IPV6_GTPU_IPV4_UDP, bm);
+ return;
+ case ICE_SW_TUN_IPV6_GTPU_IPV4_TCP:
+ ice_set_bit(ICE_PROFID_IPV6_GTPU_IPV4_TCP, bm);
+ return;
+ case ICE_SW_TUN_IPV6_GTPU_EH_IPV4:
+ ice_set_bit(ICE_PROFID_IPV6_GTPU_EH_IPV4_OTHER, bm);
+ ice_set_bit(ICE_PROFID_IPV6_GTPU_EH_IPV4_UDP, bm);
+ ice_set_bit(ICE_PROFID_IPV6_GTPU_EH_IPV4_TCP, bm);
+ return;
+ case ICE_SW_TUN_IPV6_GTPU_EH_IPV4_UDP:
+ ice_set_bit(ICE_PROFID_IPV6_GTPU_EH_IPV4_UDP, bm);
+ return;
+ case ICE_SW_TUN_IPV6_GTPU_EH_IPV4_TCP:
+ ice_set_bit(ICE_PROFID_IPV6_GTPU_EH_IPV4_TCP, bm);
+ return;
case ICE_SW_TUN_IPV4_GTPU_IPV6:
- ice_set_bit(ICE_PROFID_IPV4_GTPU_EH_IPV6_OTHER, bm);
ice_set_bit(ICE_PROFID_IPV4_GTPU_IPV6_OTHER, bm);
- ice_set_bit(ICE_PROFID_IPV4_GTPU_EH_IPV6_UDP, bm);
ice_set_bit(ICE_PROFID_IPV4_GTPU_IPV6_UDP, bm);
- ice_set_bit(ICE_PROFID_IPV4_GTPU_EH_IPV6_TCP, bm);
ice_set_bit(ICE_PROFID_IPV4_GTPU_IPV6_TCP, bm);
return;
+ case ICE_SW_TUN_IPV4_GTPU_IPV6_UDP:
+ ice_set_bit(ICE_PROFID_IPV4_GTPU_IPV6_UDP, bm);
+ return;
+ case ICE_SW_TUN_IPV4_GTPU_IPV6_TCP:
+ ice_set_bit(ICE_PROFID_IPV4_GTPU_IPV6_TCP, bm);
+ return;
+ case ICE_SW_TUN_IPV4_GTPU_EH_IPV6:
+ ice_set_bit(ICE_PROFID_IPV4_GTPU_EH_IPV6_OTHER, bm);
+ ice_set_bit(ICE_PROFID_IPV4_GTPU_EH_IPV6_UDP, bm);
+ ice_set_bit(ICE_PROFID_IPV4_GTPU_EH_IPV6_TCP, bm);
+ return;
+ case ICE_SW_TUN_IPV4_GTPU_EH_IPV6_UDP:
+ ice_set_bit(ICE_PROFID_IPV4_GTPU_EH_IPV6_UDP, bm);
+ return;
+ case ICE_SW_TUN_IPV4_GTPU_EH_IPV6_TCP:
+ ice_set_bit(ICE_PROFID_IPV4_GTPU_EH_IPV6_TCP, bm);
+ return;
case ICE_SW_TUN_IPV6_GTPU_IPV6:
- ice_set_bit(ICE_PROFID_IPV6_GTPU_EH_IPV6_OTHER, bm);
ice_set_bit(ICE_PROFID_IPV6_GTPU_IPV6_OTHER, bm);
- ice_set_bit(ICE_PROFID_IPV6_GTPU_EH_IPV6_UDP, bm);
ice_set_bit(ICE_PROFID_IPV6_GTPU_IPV6_UDP, bm);
- ice_set_bit(ICE_PROFID_IPV6_GTPU_EH_IPV6_TCP, bm);
ice_set_bit(ICE_PROFID_IPV6_GTPU_IPV6_TCP, bm);
return;
+ case ICE_SW_TUN_IPV6_GTPU_IPV6_UDP:
+ ice_set_bit(ICE_PROFID_IPV6_GTPU_IPV6_UDP, bm);
+ return;
+ case ICE_SW_TUN_IPV6_GTPU_IPV6_TCP:
+ ice_set_bit(ICE_PROFID_IPV6_GTPU_IPV6_TCP, bm);
+ return;
+ case ICE_SW_TUN_IPV6_GTPU_EH_IPV6:
+ ice_set_bit(ICE_PROFID_IPV6_GTPU_EH_IPV6_OTHER, bm);
+ ice_set_bit(ICE_PROFID_IPV6_GTPU_EH_IPV6_UDP, bm);
+ ice_set_bit(ICE_PROFID_IPV6_GTPU_EH_IPV6_TCP, bm);
+ return;
+ case ICE_SW_TUN_IPV6_GTPU_EH_IPV6_UDP:
+ ice_set_bit(ICE_PROFID_IPV6_GTPU_EH_IPV6_UDP, bm);
+ return;
+ case ICE_SW_TUN_IPV6_GTPU_EH_IPV6_TCP:
+ ice_set_bit(ICE_PROFID_IPV6_GTPU_EH_IPV6_TCP, bm);
+ return;
case ICE_SW_TUN_AND_NON_TUN:
case ICE_SW_TUN_AND_NON_TUN_QINQ:
default:
}
/* Look for a recipe which matches our requested fv / mask list */
- *rid = ice_find_recp(hw, lkup_exts, rinfo->tun_type);
+ *rid = ice_find_recp(hw, lkup_exts, rinfo->tun_type, rinfo->priority);
if (*rid < ICE_MAX_NUM_RECIPES)
/* Success if found a recipe that match the existing criteria */
goto err_unroll;
*pkt_len = sizeof(dummy_qinq_pppoe_ipv4_pkt);
*offsets = dummy_qinq_pppoe_ipv4_packet_offsets;
return;
+ } else if (tun_type == ICE_SW_TUN_PPPOE_QINQ && ipv6) {
+ *pkt = dummy_qinq_pppoe_ipv6_packet;
+ *pkt_len = sizeof(dummy_qinq_pppoe_ipv6_packet);
+ *offsets = dummy_qinq_pppoe_packet_offsets;
+ return;
} else if (tun_type == ICE_SW_TUN_PPPOE_QINQ ||
tun_type == ICE_SW_TUN_PPPOE_PAY_QINQ) {
*pkt = dummy_qinq_pppoe_ipv4_pkt;
*offsets = dummy_ipv4_gtp_no_pay_packet_offsets;
return;
} else if (tun_type == ICE_SW_TUN_IPV6_GTPU_NO_PAY) {
- *pkt = dummy_ipv6_gtpu_ipv6_packet;
- *pkt_len = sizeof(dummy_ipv6_gtpu_ipv6_packet);
+ *pkt = dummy_ipv6_gtp_packet;
+ *pkt_len = sizeof(dummy_ipv6_gtp_packet);
*offsets = dummy_ipv6_gtp_no_pay_packet_offsets;
return;
}
return;
}
+ if (tun_type == ICE_SW_TUN_IPV4_GTPU_IPV4 ||
+ tun_type == ICE_SW_TUN_IPV4_GTPU_EH_IPV4) {
+ *pkt = dummy_ipv4_gtpu_ipv4_packet;
+ *pkt_len = sizeof(dummy_ipv4_gtpu_ipv4_packet);
+ *offsets = dummy_ipv4_gtpu_ipv4_packet_offsets;
+ return;
+ }
+
+ if (tun_type == ICE_SW_TUN_IPV4_GTPU_IPV4_UDP ||
+ tun_type == ICE_SW_TUN_IPV4_GTPU_EH_IPV4_UDP) {
+ *pkt = dummy_ipv4_gtpu_ipv4_udp_packet;
+ *pkt_len = sizeof(dummy_ipv4_gtpu_ipv4_udp_packet);
+ *offsets = dummy_ipv4_gtpu_ipv4_udp_packet_offsets;
+ return;
+ }
+
+ if (tun_type == ICE_SW_TUN_IPV4_GTPU_IPV4_TCP ||
+ tun_type == ICE_SW_TUN_IPV4_GTPU_EH_IPV4_TCP) {
+ *pkt = dummy_ipv4_gtpu_ipv4_tcp_packet;
+ *pkt_len = sizeof(dummy_ipv4_gtpu_ipv4_tcp_packet);
+ *offsets = dummy_ipv4_gtpu_ipv4_tcp_packet_offsets;
+ return;
+ }
+
+ if (tun_type == ICE_SW_TUN_IPV4_GTPU_IPV6 ||
+ tun_type == ICE_SW_TUN_IPV4_GTPU_EH_IPV6) {
+ *pkt = dummy_ipv4_gtpu_ipv6_packet;
+ *pkt_len = sizeof(dummy_ipv4_gtpu_ipv6_packet);
+ *offsets = dummy_ipv4_gtpu_ipv6_packet_offsets;
+ return;
+ }
+
+ if (tun_type == ICE_SW_TUN_IPV4_GTPU_IPV6_UDP ||
+ tun_type == ICE_SW_TUN_IPV4_GTPU_EH_IPV6_UDP) {
+ *pkt = dummy_ipv4_gtpu_ipv6_udp_packet;
+ *pkt_len = sizeof(dummy_ipv4_gtpu_ipv6_udp_packet);
+ *offsets = dummy_ipv4_gtpu_ipv6_udp_packet_offsets;
+ return;
+ }
+
+ if (tun_type == ICE_SW_TUN_IPV4_GTPU_IPV6_TCP ||
+ tun_type == ICE_SW_TUN_IPV4_GTPU_EH_IPV6_TCP) {
+ *pkt = dummy_ipv4_gtpu_ipv6_tcp_packet;
+ *pkt_len = sizeof(dummy_ipv4_gtpu_ipv6_tcp_packet);
+ *offsets = dummy_ipv4_gtpu_ipv6_tcp_packet_offsets;
+ return;
+ }
+
+ if (tun_type == ICE_SW_TUN_IPV6_GTPU_IPV4 ||
+ tun_type == ICE_SW_TUN_IPV6_GTPU_EH_IPV4) {
+ *pkt = dummy_ipv6_gtpu_ipv4_packet;
+ *pkt_len = sizeof(dummy_ipv6_gtpu_ipv4_packet);
+ *offsets = dummy_ipv6_gtpu_ipv4_packet_offsets;
+ return;
+ }
+
+ if (tun_type == ICE_SW_TUN_IPV6_GTPU_IPV4_UDP ||
+ tun_type == ICE_SW_TUN_IPV6_GTPU_EH_IPV4_UDP) {
+ *pkt = dummy_ipv6_gtpu_ipv4_udp_packet;
+ *pkt_len = sizeof(dummy_ipv6_gtpu_ipv4_udp_packet);
+ *offsets = dummy_ipv6_gtpu_ipv4_udp_packet_offsets;
+ return;
+ }
+
+ if (tun_type == ICE_SW_TUN_IPV6_GTPU_IPV4_TCP ||
+ tun_type == ICE_SW_TUN_IPV6_GTPU_EH_IPV4_TCP) {
+ *pkt = dummy_ipv6_gtpu_ipv4_tcp_packet;
+ *pkt_len = sizeof(dummy_ipv6_gtpu_ipv4_tcp_packet);
+ *offsets = dummy_ipv6_gtpu_ipv4_tcp_packet_offsets;
+ return;
+ }
+
+ if (tun_type == ICE_SW_TUN_IPV6_GTPU_IPV6 ||
+ tun_type == ICE_SW_TUN_IPV6_GTPU_EH_IPV6) {
+ *pkt = dummy_ipv6_gtpu_ipv6_packet;
+ *pkt_len = sizeof(dummy_ipv6_gtpu_ipv6_packet);
+ *offsets = dummy_ipv6_gtpu_ipv6_packet_offsets;
+ return;
+ }
+
+ if (tun_type == ICE_SW_TUN_IPV6_GTPU_IPV6_UDP ||
+ tun_type == ICE_SW_TUN_IPV6_GTPU_EH_IPV6_UDP) {
+ *pkt = dummy_ipv6_gtpu_ipv6_udp_packet;
+ *pkt_len = sizeof(dummy_ipv6_gtpu_ipv6_udp_packet);
+ *offsets = dummy_ipv6_gtpu_ipv6_udp_packet_offsets;
+ return;
+ }
+
+ if (tun_type == ICE_SW_TUN_IPV6_GTPU_IPV6_TCP ||
+ tun_type == ICE_SW_TUN_IPV6_GTPU_EH_IPV6_TCP) {
+ *pkt = dummy_ipv6_gtpu_ipv6_tcp_packet;
+ *pkt_len = sizeof(dummy_ipv6_gtpu_ipv6_tcp_packet);
+ *offsets = dummy_ipv6_gtpu_ipv6_tcp_packet_offsets;
+ return;
+ }
+
if (tun_type == ICE_SW_TUN_PPPOE && ipv6) {
*pkt = dummy_pppoe_ipv6_packet;
*pkt_len = sizeof(dummy_pppoe_ipv6_packet);
return;
}
- /* Support GTP tunnel + L3 */
- if (tun_type == ICE_SW_TUN_IPV4_GTPU_IPV4) {
- *pkt = dummy_ipv4_gtpu_ipv4_packet;
- *pkt_len = sizeof(dummy_ipv4_gtpu_ipv4_packet);
- *offsets = dummy_ipv4_gtpu_ipv4_packet_offsets;
- return;
- }
- if (tun_type == ICE_SW_TUN_IPV4_GTPU_IPV6) {
- *pkt = dummy_ipv4_gtpu_ipv6_packet;
- *pkt_len = sizeof(dummy_ipv4_gtpu_ipv6_packet);
- *offsets = dummy_ipv4_gtpu_ipv6_packet_offsets;
- return;
- }
- if (tun_type == ICE_SW_TUN_IPV6_GTPU_IPV4) {
- *pkt = dummy_ipv6_gtpu_ipv4_packet;
- *pkt_len = sizeof(dummy_ipv6_gtpu_ipv4_packet);
- *offsets = dummy_ipv6_gtpu_ipv4_packet_offsets;
- return;
- }
- if (tun_type == ICE_SW_TUN_IPV6_GTPU_IPV6) {
- *pkt = dummy_ipv6_gtpu_ipv6_packet;
- *pkt_len = sizeof(dummy_ipv6_gtpu_ipv6_packet);
- *offsets = dummy_ipv6_gtpu_ipv6_packet_offsets;
- return;
- }
-
if (tun_type == ICE_ALL_TUNNELS) {
*pkt = dummy_gre_udp_packet;
*pkt_len = sizeof(dummy_gre_udp_packet);
break;
case ICE_VLAN_OFOS:
case ICE_VLAN_EX:
+ case ICE_VLAN_IN:
len = sizeof(struct ice_vlan_hdr);
break;
case ICE_IPV4_OFOS:
if (status)
return status;
- rid = ice_find_recp(hw, &lkup_exts, rinfo->tun_type);
+ rid = ice_find_recp(hw, &lkup_exts, rinfo->tun_type, rinfo->priority);
/* If did not find a recipe that match the existing criteria */
if (rid == ICE_MAX_NUM_RECIPES)
return ICE_ERR_PARAM;
}
/**
- * ice_rem_adv_for_vsi - removes existing advanced switch rules for a
+ * ice_rem_adv_rule_for_vsi - removes existing advanced switch rules for a
* given VSI handle
* @hw: pointer to the hardware structure
* @vsi_handle: VSI handle for which we are supposed to remove all the rules.
}
/**
- * ice_rm_all_sw_replay_rule - helper function to delete filter replay rules
+ * ice_rm_sw_replay_rule_info - helper function to delete filter replay rules
* @hw: pointer to the HW struct
* @sw: pointer to switch info struct for which function removes filters
*