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.pa...@intel.com> Signed-off-by: Qi Zhang <qi.z.zh...@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(-) diff --git a/drivers/net/ice/base/ice_protocol_type.h b/drivers/net/ice/base/ice_protocol_type.h index d078061afb..8c9d098e22 100644 --- a/drivers/net/ice/base/ice_protocol_type.h +++ b/drivers/net/ice/base/ice_protocol_type.h @@ -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 */ }; diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c index a567b6de81..45f83cd10c 100644 --- a/drivers/net/ice/base/ice_switch.c +++ b/drivers/net/ice/base/ice_switch.c @@ -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; -- 2.26.2