[v3,14/14] net/ice/base: allow support for GTP-U filter using only inner protocols
Checks
Commit Message
Adds a support for switch filter: GTP-U using just inner fields.
If user doesn't specify outer protocol and its fields but wants to
add switch filter for GTP-U using inner protocols and related fields
such as inner L3 and/or inner L4, this patch enables such filtering.
Signed-off-by: Kiran Patil <kiran.patil@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
---
drivers/net/ice/base/ice_protocol_type.h | 2 ++
drivers/net/ice/base/ice_switch.c | 6 ++++--
2 files changed, 6 insertions(+), 2 deletions(-)
@@ -110,6 +110,8 @@ enum ice_sw_tunnel_type {
ICE_SW_TUN_IPV4_GTPU_IPV6,
ICE_SW_TUN_IPV6_GTPU_IPV4,
ICE_SW_TUN_IPV6_GTPU_IPV6,
+ ICE_SW_TUN_GTP_IPV4,
+ ICE_SW_TUN_GTP_IPV6,
ICE_ALL_TUNNELS /* All tunnel types including NVGRE */
};
@@ -7980,13 +7980,15 @@ ice_find_dummy_packet(struct ice_adv_lkup_elem *lkups, u16 lkups_cnt,
}
/* Support GTP tunnel + L3 */
- if (tun_type == ICE_SW_TUN_IPV4_GTPU_IPV4) {
+ if (tun_type == ICE_SW_TUN_IPV4_GTPU_IPV4 ||
+ tun_type == ICE_SW_TUN_GTP_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) {
+ if (tun_type == ICE_SW_TUN_IPV4_GTPU_IPV6 ||
+ tun_type == ICE_SW_TUN_GTP_IPV6) {
*pkt = dummy_ipv4_gtpu_ipv6_packet;
*pkt_len = sizeof(dummy_ipv4_gtpu_ipv6_packet);
*offsets = dummy_ipv4_gtpu_ipv6_packet_offsets;