From: Qi Zhang Date: Tue, 10 Aug 2021 02:51:31 +0000 (+0800) Subject: net/ice/base: support flow director for GTPU EH inner IPv6 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=64d0083d34e5ed82f4170cc1b0ac62f3934bae68;p=dpdk.git net/ice/base: support flow director for GTPU EH inner IPv6 Support FDIR filtering for IPV4_GTPU_EH_IPV6 with inner IPV6/UDP/TCP fields matching. Signed-off-by: Junfeng Guo Signed-off-by: Qi Zhang Acked-by: Junfeng Guo --- diff --git a/drivers/net/ice/base/ice_fdir.c b/drivers/net/ice/base/ice_fdir.c index e5ad0f298b..ae512e5695 100644 --- a/drivers/net/ice/base/ice_fdir.c +++ b/drivers/net/ice/base/ice_fdir.c @@ -97,6 +97,54 @@ static const u8 ice_fdir_tcp4_gtpu4_pkt[] = { 0x00, 0x00, 0x00, 0x00, }; +static const u8 ice_fdir_ipv6_gtpu4_pkt[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x45, 0x00, + 0x00, 0x4c, 0x00, 0x01, 0x00, 0x00, 0x40, 0x11, + 0x7c, 0x9e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x08, 0x68, 0x08, 0x68, 0x00, 0x38, + 0x24, 0x42, 0x30, 0xff, 0x00, 0x28, 0x00, 0x00, + 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x3b, 0x40, 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, 0x00, 0x00, +}; + +static const u8 ice_fdir_udp6_gtpu4_pkt[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x45, 0x00, + 0x00, 0x54, 0x00, 0x01, 0x00, 0x00, 0x40, 0x11, + 0x7c, 0x96, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x08, 0x68, 0x08, 0x68, 0x00, 0x40, + 0x4e, 0x3d, 0x30, 0xff, 0x00, 0x30, 0x00, 0x00, + 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x08, + 0x11, 0x40, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, + 0xff, 0xdc, 0x00, 0x00, +}; + +static const u8 ice_fdir_tcp6_gtpu4_pkt[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x45, 0x00, + 0x00, 0x62, 0x00, 0x01, 0x00, 0x00, 0x40, 0x11, + 0x7c, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x08, 0x68, 0x08, 0x68, 0x00, 0x4e, + 0x59, 0x08, 0x30, 0xff, 0x00, 0x3e, 0x00, 0x00, + 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x16, + 0x06, 0x40, 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, 0x00, 0x14, 0x00, 0x50, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x02, + 0x20, 0x00, 0x8f, 0x7b, 0x00, 0x00, 0x00, 0x00, +}; + static const u8 ice_fdir_ipv4_gtpu4_eh_pkt[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x45, 0x00, @@ -140,6 +188,57 @@ static const u8 ice_fdir_tcp4_gtpu4_eh_pkt[] = { 0x00, 0x00, 0x00, 0x00, }; +static const u8 ice_fdir_ipv6_gtpu4_eh_pkt[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x45, 0x00, + 0x00, 0x56, 0x00, 0x01, 0x00, 0x00, 0x40, 0x11, + 0x7c, 0x94, 0x7f, 0x00, 0x00, 0x01, 0x7f, 0x00, + 0x00, 0x01, 0x08, 0x68, 0x08, 0x68, 0x00, 0x42, + 0x1e, 0x9d, 0x34, 0xff, 0x00, 0x32, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x85, 0x01, 0x00, + 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x02, + 0x3b, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x00, +}; + +static const u8 ice_fdir_udp6_gtpu4_eh_pkt[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x45, 0x00, + 0x00, 0x5e, 0x00, 0x01, 0x00, 0x00, 0x40, 0x11, + 0x7c, 0x8c, 0x7f, 0x00, 0x00, 0x01, 0x7f, 0x00, + 0x00, 0x01, 0x08, 0x68, 0x08, 0x68, 0x00, 0x4a, + 0x48, 0x9a, 0x34, 0xff, 0x00, 0x3a, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x85, 0x01, 0x00, + 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x0a, + 0x11, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, + 0xff, 0xd8, 0x00, 0x00, +}; + +static const u8 ice_fdir_tcp6_gtpu4_eh_pkt[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x45, 0x00, + 0x00, 0x6a, 0x00, 0x01, 0x00, 0x00, 0x40, 0x11, + 0x7c, 0x80, 0x7f, 0x00, 0x00, 0x01, 0x7f, 0x00, + 0x00, 0x01, 0x08, 0x68, 0x08, 0x68, 0x00, 0x56, + 0x53, 0x6b, 0x34, 0xff, 0x00, 0x46, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x85, 0x01, 0x00, + 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x16, + 0x06, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x02, + 0x20, 0x00, 0x8f, 0xdf, 0x00, 0x00, 0x00, 0x00, +}; + static const u8 ice_fdir_ipv4_gtpu4_eh_dw_pkt[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x45, 0x00, @@ -183,6 +282,57 @@ static const u8 ice_fdir_tcp4_gtpu4_eh_dw_pkt[] = { 0x00, 0x00, 0x00, 0x00, }; +static const u8 ice_fdir_ipv6_gtpu4_eh_dw_pkt[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x45, 0x00, + 0x00, 0x56, 0x00, 0x01, 0x00, 0x00, 0x40, 0x11, + 0x7c, 0x94, 0x7f, 0x00, 0x00, 0x01, 0x7f, 0x00, + 0x00, 0x01, 0x08, 0x68, 0x08, 0x68, 0x00, 0x42, + 0x1e, 0x9d, 0x34, 0xff, 0x00, 0x32, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x85, 0x01, 0x00, + 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x02, + 0x3b, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x00, +}; + +static const u8 ice_fdir_udp6_gtpu4_eh_dw_pkt[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x45, 0x00, + 0x00, 0x5e, 0x00, 0x01, 0x00, 0x00, 0x40, 0x11, + 0x7c, 0x8c, 0x7f, 0x00, 0x00, 0x01, 0x7f, 0x00, + 0x00, 0x01, 0x08, 0x68, 0x08, 0x68, 0x00, 0x4a, + 0x48, 0x9a, 0x34, 0xff, 0x00, 0x3a, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x85, 0x01, 0x00, + 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x0a, + 0x11, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, + 0xff, 0xd8, 0x00, 0x00, +}; + +static const u8 ice_fdir_tcp6_gtpu4_eh_dw_pkt[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x45, 0x00, + 0x00, 0x6a, 0x00, 0x01, 0x00, 0x00, 0x40, 0x11, + 0x7c, 0x80, 0x7f, 0x00, 0x00, 0x01, 0x7f, 0x00, + 0x00, 0x01, 0x08, 0x68, 0x08, 0x68, 0x00, 0x56, + 0x53, 0x6b, 0x34, 0xff, 0x00, 0x46, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x85, 0x01, 0x00, + 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x16, + 0x06, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x02, + 0x20, 0x00, 0x8f, 0xdf, 0x00, 0x00, 0x00, 0x00, +}; + static const u8 ice_fdir_ipv4_gtpu4_eh_up_pkt[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x45, 0x00, @@ -226,67 +376,70 @@ static const u8 ice_fdir_tcp4_gtpu4_eh_up_pkt[] = { 0x00, 0x00, 0x00, 0x00, }; -static const u8 ice_fdir_icmp4_gtpu4_pkt[] = { +static const u8 ice_fdir_ipv6_gtpu4_eh_up_pkt[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x45, 0x00, - 0x00, 0x4c, 0x00, 0x00, 0x40, 0x00, 0x40, 0x11, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x08, 0x68, 0x08, 0x68, 0x00, 0x00, - 0x00, 0x00, 0x34, 0xff, 0x00, 0x28, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x85, 0x02, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x45, 0x00, - 0x00, 0x1c, 0x00, 0x00, 0x40, 0x00, 0x40, 0x01, + 0x00, 0x56, 0x00, 0x01, 0x00, 0x00, 0x40, 0x11, + 0x7c, 0x94, 0x7f, 0x00, 0x00, 0x01, 0x7f, 0x00, + 0x00, 0x01, 0x08, 0x68, 0x08, 0x68, 0x00, 0x42, + 0x1e, 0x8d, 0x34, 0xff, 0x00, 0x32, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x85, 0x01, 0x10, + 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x02, + 0x3b, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, + 0x00, 0x01, 0x00, 0x00, }; -static const u8 ice_fdir_ipv6_gtpu4_pkt[] = { +static const u8 ice_fdir_udp6_gtpu4_eh_up_pkt[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x45, 0x00, - 0x00, 0x4c, 0x00, 0x01, 0x00, 0x00, 0x40, 0x11, - 0x7c, 0x9e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x08, 0x68, 0x08, 0x68, 0x00, 0x38, - 0x24, 0x42, 0x30, 0xff, 0x00, 0x28, 0x00, 0x00, - 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x3b, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x5e, 0x00, 0x01, 0x00, 0x00, 0x40, 0x11, + 0x7c, 0x8c, 0x7f, 0x00, 0x00, 0x01, 0x7f, 0x00, + 0x00, 0x01, 0x08, 0x68, 0x08, 0x68, 0x00, 0x4a, + 0x48, 0x8a, 0x34, 0xff, 0x00, 0x3a, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x85, 0x01, 0x10, + 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x0a, + 0x11, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, + 0xff, 0xd8, 0x00, 0x00, }; -static const u8 ice_fdir_udp6_gtpu4_pkt[] = { +static const u8 ice_fdir_tcp6_gtpu4_eh_up_pkt[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x45, 0x00, - 0x00, 0x54, 0x00, 0x01, 0x00, 0x00, 0x40, 0x11, - 0x7c, 0x96, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x08, 0x68, 0x08, 0x68, 0x00, 0x40, - 0x4e, 0x3d, 0x30, 0xff, 0x00, 0x30, 0x00, 0x00, - 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x08, - 0x11, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x6a, 0x00, 0x01, 0x00, 0x00, 0x40, 0x11, + 0x7c, 0x80, 0x7f, 0x00, 0x00, 0x01, 0x7f, 0x00, + 0x00, 0x01, 0x08, 0x68, 0x08, 0x68, 0x00, 0x56, + 0x53, 0x5b, 0x34, 0xff, 0x00, 0x46, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x85, 0x01, 0x10, + 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x16, + 0x06, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, - 0xff, 0xdc, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x02, + 0x20, 0x00, 0x8f, 0xdf, 0x00, 0x00, 0x00, 0x00, }; -static const u8 ice_fdir_tcp6_gtpu4_pkt[] = { +static const u8 ice_fdir_icmp4_gtpu4_pkt[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x45, 0x00, - 0x00, 0x62, 0x00, 0x01, 0x00, 0x00, 0x40, 0x11, - 0x7c, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x08, 0x68, 0x08, 0x68, 0x00, 0x4e, - 0x59, 0x08, 0x30, 0xff, 0x00, 0x3e, 0x00, 0x00, - 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x16, - 0x06, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x4c, 0x00, 0x00, 0x40, 0x00, 0x40, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x08, 0x68, 0x08, 0x68, 0x00, 0x00, + 0x00, 0x00, 0x34, 0xff, 0x00, 0x28, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x85, 0x02, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x45, 0x00, + 0x00, 0x1c, 0x00, 0x00, 0x40, 0x00, 0x40, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x14, 0x00, 0x50, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x02, - 0x20, 0x00, 0x8f, 0x7b, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, }; static const u8 ice_fdir_ipv6_gtpu6_pkt[] = { @@ -971,6 +1124,27 @@ static const struct ice_fdir_base_pkt ice_fdir_pkt[] = { sizeof(ice_fdir_tcp4_gtpu4_pkt), ice_fdir_tcp4_gtpu4_pkt, }, + { + ICE_FLTR_PTYPE_NONF_IPV4_GTPU_IPV6, + sizeof(ice_fdir_ipv6_gtpu4_pkt), + ice_fdir_ipv6_gtpu4_pkt, + sizeof(ice_fdir_ipv6_gtpu4_pkt), + ice_fdir_ipv6_gtpu4_pkt, + }, + { + ICE_FLTR_PTYPE_NONF_IPV4_GTPU_IPV6_UDP, + sizeof(ice_fdir_udp6_gtpu4_pkt), + ice_fdir_udp6_gtpu4_pkt, + sizeof(ice_fdir_udp6_gtpu4_pkt), + ice_fdir_udp6_gtpu4_pkt, + }, + { + ICE_FLTR_PTYPE_NONF_IPV4_GTPU_IPV6_TCP, + sizeof(ice_fdir_tcp6_gtpu4_pkt), + ice_fdir_tcp6_gtpu4_pkt, + sizeof(ice_fdir_tcp6_gtpu4_pkt), + ice_fdir_tcp6_gtpu4_pkt, + }, { ICE_FLTR_PTYPE_NONF_IPV4_GTPU_EH_IPV4, sizeof(ice_fdir_ipv4_gtpu4_eh_pkt), @@ -992,6 +1166,27 @@ static const struct ice_fdir_base_pkt ice_fdir_pkt[] = { sizeof(ice_fdir_tcp4_gtpu4_eh_pkt), ice_fdir_tcp4_gtpu4_eh_pkt, }, + { + ICE_FLTR_PTYPE_NONF_IPV4_GTPU_EH_IPV6, + sizeof(ice_fdir_ipv6_gtpu4_eh_pkt), + ice_fdir_ipv6_gtpu4_eh_pkt, + sizeof(ice_fdir_ipv6_gtpu4_eh_pkt), + ice_fdir_ipv6_gtpu4_eh_pkt, + }, + { + ICE_FLTR_PTYPE_NONF_IPV4_GTPU_EH_IPV6_UDP, + sizeof(ice_fdir_udp6_gtpu4_eh_pkt), + ice_fdir_udp6_gtpu4_eh_pkt, + sizeof(ice_fdir_udp6_gtpu4_eh_pkt), + ice_fdir_udp6_gtpu4_eh_pkt, + }, + { + ICE_FLTR_PTYPE_NONF_IPV4_GTPU_EH_IPV6_TCP, + sizeof(ice_fdir_tcp6_gtpu4_eh_pkt), + ice_fdir_tcp6_gtpu4_eh_pkt, + sizeof(ice_fdir_tcp6_gtpu4_eh_pkt), + ice_fdir_tcp6_gtpu4_eh_pkt, + }, { ICE_FLTR_PTYPE_NONF_IPV4_GTPU_EH_DW_IPV4, sizeof(ice_fdir_ipv4_gtpu4_eh_dw_pkt), @@ -1013,6 +1208,27 @@ static const struct ice_fdir_base_pkt ice_fdir_pkt[] = { sizeof(ice_fdir_tcp4_gtpu4_eh_dw_pkt), ice_fdir_tcp4_gtpu4_eh_dw_pkt, }, + { + ICE_FLTR_PTYPE_NONF_IPV4_GTPU_EH_DW_IPV6, + sizeof(ice_fdir_ipv6_gtpu4_eh_dw_pkt), + ice_fdir_ipv6_gtpu4_eh_dw_pkt, + sizeof(ice_fdir_ipv6_gtpu4_eh_dw_pkt), + ice_fdir_ipv6_gtpu4_eh_dw_pkt, + }, + { + ICE_FLTR_PTYPE_NONF_IPV4_GTPU_EH_DW_IPV6_UDP, + sizeof(ice_fdir_udp6_gtpu4_eh_dw_pkt), + ice_fdir_udp6_gtpu4_eh_dw_pkt, + sizeof(ice_fdir_udp6_gtpu4_eh_dw_pkt), + ice_fdir_udp6_gtpu4_eh_dw_pkt, + }, + { + ICE_FLTR_PTYPE_NONF_IPV4_GTPU_EH_DW_IPV6_TCP, + sizeof(ice_fdir_tcp6_gtpu4_eh_dw_pkt), + ice_fdir_tcp6_gtpu4_eh_dw_pkt, + sizeof(ice_fdir_tcp6_gtpu4_eh_dw_pkt), + ice_fdir_tcp6_gtpu4_eh_dw_pkt, + }, { ICE_FLTR_PTYPE_NONF_IPV4_GTPU_EH_UP_IPV4, sizeof(ice_fdir_ipv4_gtpu4_eh_up_pkt), @@ -1034,6 +1250,27 @@ static const struct ice_fdir_base_pkt ice_fdir_pkt[] = { sizeof(ice_fdir_tcp4_gtpu4_eh_up_pkt), ice_fdir_tcp4_gtpu4_eh_up_pkt, }, + { + ICE_FLTR_PTYPE_NONF_IPV4_GTPU_EH_UP_IPV6, + sizeof(ice_fdir_ipv6_gtpu4_eh_up_pkt), + ice_fdir_ipv6_gtpu4_eh_up_pkt, + sizeof(ice_fdir_ipv6_gtpu4_eh_up_pkt), + ice_fdir_ipv6_gtpu4_eh_up_pkt, + }, + { + ICE_FLTR_PTYPE_NONF_IPV4_GTPU_EH_UP_IPV6_UDP, + sizeof(ice_fdir_udp6_gtpu4_eh_up_pkt), + ice_fdir_udp6_gtpu4_eh_up_pkt, + sizeof(ice_fdir_udp6_gtpu4_eh_up_pkt), + ice_fdir_udp6_gtpu4_eh_up_pkt, + }, + { + ICE_FLTR_PTYPE_NONF_IPV4_GTPU_EH_UP_IPV6_TCP, + sizeof(ice_fdir_tcp6_gtpu4_eh_up_pkt), + ice_fdir_tcp6_gtpu4_eh_up_pkt, + sizeof(ice_fdir_tcp6_gtpu4_eh_up_pkt), + ice_fdir_tcp6_gtpu4_eh_up_pkt, + }, { ICE_FLTR_PTYPE_NONF_IPV4_GTPU_IPV4_ICMP, sizeof(ice_fdir_icmp4_gtpu4_pkt), @@ -1048,27 +1285,6 @@ static const struct ice_fdir_base_pkt ice_fdir_pkt[] = { sizeof(ice_fdir_ipv4_gtpu4_pkt), ice_fdir_ipv4_gtpu4_pkt, }, - { - ICE_FLTR_PTYPE_NONF_IPV4_GTPU_IPV6, - sizeof(ice_fdir_ipv6_gtpu4_pkt), - ice_fdir_ipv6_gtpu4_pkt, - sizeof(ice_fdir_ipv6_gtpu4_pkt), - ice_fdir_ipv6_gtpu4_pkt, - }, - { - ICE_FLTR_PTYPE_NONF_IPV4_GTPU_IPV6_UDP, - sizeof(ice_fdir_udp6_gtpu4_pkt), - ice_fdir_udp6_gtpu4_pkt, - sizeof(ice_fdir_udp6_gtpu4_pkt), - ice_fdir_udp6_gtpu4_pkt, - }, - { - ICE_FLTR_PTYPE_NONF_IPV4_GTPU_IPV6_TCP, - sizeof(ice_fdir_tcp6_gtpu4_pkt), - ice_fdir_tcp6_gtpu4_pkt, - sizeof(ice_fdir_tcp6_gtpu4_pkt), - ice_fdir_tcp6_gtpu4_pkt, - }, { ICE_FLTR_PTYPE_NONF_IPV6_GTPU, sizeof(ice_fdir_ipv6_gtpu6_pkt), @@ -1777,12 +1993,21 @@ ice_fdir_get_gen_prgm_pkt(struct ice_hw *hw, struct ice_fdir_fltr *input, case ICE_FLTR_PTYPE_NONF_IPV4_GTPU_EH_IPV4: case ICE_FLTR_PTYPE_NONF_IPV4_GTPU_EH_IPV4_UDP: case ICE_FLTR_PTYPE_NONF_IPV4_GTPU_EH_IPV4_TCP: + case ICE_FLTR_PTYPE_NONF_IPV4_GTPU_EH_IPV6: + case ICE_FLTR_PTYPE_NONF_IPV4_GTPU_EH_IPV6_UDP: + case ICE_FLTR_PTYPE_NONF_IPV4_GTPU_EH_IPV6_TCP: case ICE_FLTR_PTYPE_NONF_IPV4_GTPU_EH_DW_IPV4: case ICE_FLTR_PTYPE_NONF_IPV4_GTPU_EH_DW_IPV4_UDP: case ICE_FLTR_PTYPE_NONF_IPV4_GTPU_EH_DW_IPV4_TCP: + case ICE_FLTR_PTYPE_NONF_IPV4_GTPU_EH_DW_IPV6: + case ICE_FLTR_PTYPE_NONF_IPV4_GTPU_EH_DW_IPV6_UDP: + case ICE_FLTR_PTYPE_NONF_IPV4_GTPU_EH_DW_IPV6_TCP: case ICE_FLTR_PTYPE_NONF_IPV4_GTPU_EH_UP_IPV4: case ICE_FLTR_PTYPE_NONF_IPV4_GTPU_EH_UP_IPV4_UDP: case ICE_FLTR_PTYPE_NONF_IPV4_GTPU_EH_UP_IPV4_TCP: + case ICE_FLTR_PTYPE_NONF_IPV4_GTPU_EH_UP_IPV6: + case ICE_FLTR_PTYPE_NONF_IPV4_GTPU_EH_UP_IPV6_UDP: + case ICE_FLTR_PTYPE_NONF_IPV4_GTPU_EH_UP_IPV6_TCP: ice_memcpy(pkt, ice_fdir_pkt[idx].tun_pkt, ice_fdir_pkt[idx].tun_pkt_len, ICE_NONDMA_TO_NONDMA); @@ -2055,6 +2280,9 @@ ice_fdir_get_gen_prgm_pkt(struct ice_hw *hw, struct ice_fdir_fltr *input, ice_pkt_insert_u8(loc, ICE_IPV4_NO_MAC_TTL_OFFSET, input->ip.v4.ttl); break; case ICE_FLTR_PTYPE_NONF_IPV4_GTPU_IPV6: + case ICE_FLTR_PTYPE_NONF_IPV4_GTPU_EH_IPV6: + case ICE_FLTR_PTYPE_NONF_IPV4_GTPU_EH_DW_IPV6: + case ICE_FLTR_PTYPE_NONF_IPV4_GTPU_EH_UP_IPV6: ice_pkt_insert_ipv6_addr(loc, ICE_IPV6_NO_MAC_DST_ADDR_OFFSET, input->ip.v6.src_ip); ice_pkt_insert_ipv6_addr(loc, ICE_IPV6_NO_MAC_SRC_ADDR_OFFSET, @@ -2065,6 +2293,9 @@ ice_fdir_get_gen_prgm_pkt(struct ice_hw *hw, struct ice_fdir_fltr *input, input->ip.v6.proto); break; case ICE_FLTR_PTYPE_NONF_IPV4_GTPU_IPV6_UDP: + case ICE_FLTR_PTYPE_NONF_IPV4_GTPU_EH_IPV6_UDP: + case ICE_FLTR_PTYPE_NONF_IPV4_GTPU_EH_DW_IPV6_UDP: + case ICE_FLTR_PTYPE_NONF_IPV4_GTPU_EH_UP_IPV6_UDP: ice_pkt_insert_ipv6_addr(loc, ICE_IPV6_NO_MAC_DST_ADDR_OFFSET, input->ip.v6.src_ip); ice_pkt_insert_ipv6_addr(loc, ICE_IPV6_NO_MAC_SRC_ADDR_OFFSET, @@ -2077,6 +2308,9 @@ ice_fdir_get_gen_prgm_pkt(struct ice_hw *hw, struct ice_fdir_fltr *input, ice_pkt_insert_u8(loc, ICE_IPV6_NO_MAC_HLIM_OFFSET, input->ip.v6.hlim); break; case ICE_FLTR_PTYPE_NONF_IPV4_GTPU_IPV6_TCP: + case ICE_FLTR_PTYPE_NONF_IPV4_GTPU_EH_IPV6_TCP: + case ICE_FLTR_PTYPE_NONF_IPV4_GTPU_EH_DW_IPV6_TCP: + case ICE_FLTR_PTYPE_NONF_IPV4_GTPU_EH_UP_IPV6_TCP: ice_pkt_insert_ipv6_addr(loc, ICE_IPV6_NO_MAC_DST_ADDR_OFFSET, input->ip.v6.src_ip); ice_pkt_insert_ipv6_addr(loc, ICE_IPV6_NO_MAC_SRC_ADDR_OFFSET, diff --git a/drivers/net/ice/base/ice_type.h b/drivers/net/ice/base/ice_type.h index f7aa5f6139..b76404f085 100644 --- a/drivers/net/ice/base/ice_type.h +++ b/drivers/net/ice/base/ice_type.h @@ -306,28 +306,37 @@ enum ice_fltr_ptype { ICE_FLTR_PTYPE_NONF_IPV4_SCTP, ICE_FLTR_PTYPE_NONF_IPV4_OTHER, ICE_FLTR_PTYPE_NONF_IPV4_GTPU, - ICE_FLTR_PTYPE_NONF_IPV4_GTPU_EH, - ICE_FLTR_PTYPE_NONF_IPV4_GTPU_EH_DW, - ICE_FLTR_PTYPE_NONF_IPV4_GTPU_EH_UP, - ICE_FLTR_PTYPE_NONF_IPV6_GTPU, - ICE_FLTR_PTYPE_NONF_IPV6_GTPU_EH, - ICE_FLTR_PTYPE_NONF_IPV6_GTPU_EH_DW, - ICE_FLTR_PTYPE_NONF_IPV6_GTPU_EH_UP, ICE_FLTR_PTYPE_NONF_IPV4_GTPU_IPV4, ICE_FLTR_PTYPE_NONF_IPV4_GTPU_IPV4_UDP, ICE_FLTR_PTYPE_NONF_IPV4_GTPU_IPV4_TCP, ICE_FLTR_PTYPE_NONF_IPV4_GTPU_IPV6, ICE_FLTR_PTYPE_NONF_IPV4_GTPU_IPV6_UDP, ICE_FLTR_PTYPE_NONF_IPV4_GTPU_IPV6_TCP, + ICE_FLTR_PTYPE_NONF_IPV4_GTPU_EH, ICE_FLTR_PTYPE_NONF_IPV4_GTPU_EH_IPV4, ICE_FLTR_PTYPE_NONF_IPV4_GTPU_EH_IPV4_UDP, ICE_FLTR_PTYPE_NONF_IPV4_GTPU_EH_IPV4_TCP, + ICE_FLTR_PTYPE_NONF_IPV4_GTPU_EH_IPV6, + ICE_FLTR_PTYPE_NONF_IPV4_GTPU_EH_IPV6_UDP, + ICE_FLTR_PTYPE_NONF_IPV4_GTPU_EH_IPV6_TCP, + ICE_FLTR_PTYPE_NONF_IPV4_GTPU_EH_DW, ICE_FLTR_PTYPE_NONF_IPV4_GTPU_EH_DW_IPV4, ICE_FLTR_PTYPE_NONF_IPV4_GTPU_EH_DW_IPV4_UDP, ICE_FLTR_PTYPE_NONF_IPV4_GTPU_EH_DW_IPV4_TCP, + ICE_FLTR_PTYPE_NONF_IPV4_GTPU_EH_DW_IPV6, + ICE_FLTR_PTYPE_NONF_IPV4_GTPU_EH_DW_IPV6_UDP, + ICE_FLTR_PTYPE_NONF_IPV4_GTPU_EH_DW_IPV6_TCP, + ICE_FLTR_PTYPE_NONF_IPV4_GTPU_EH_UP, ICE_FLTR_PTYPE_NONF_IPV4_GTPU_EH_UP_IPV4, ICE_FLTR_PTYPE_NONF_IPV4_GTPU_EH_UP_IPV4_UDP, ICE_FLTR_PTYPE_NONF_IPV4_GTPU_EH_UP_IPV4_TCP, + ICE_FLTR_PTYPE_NONF_IPV4_GTPU_EH_UP_IPV6, + ICE_FLTR_PTYPE_NONF_IPV4_GTPU_EH_UP_IPV6_UDP, + ICE_FLTR_PTYPE_NONF_IPV4_GTPU_EH_UP_IPV6_TCP, + ICE_FLTR_PTYPE_NONF_IPV6_GTPU, + ICE_FLTR_PTYPE_NONF_IPV6_GTPU_EH, + ICE_FLTR_PTYPE_NONF_IPV6_GTPU_EH_DW, + ICE_FLTR_PTYPE_NONF_IPV6_GTPU_EH_UP, ICE_FLTR_PTYPE_NONF_IPV4_GTPU_IPV4_ICMP, ICE_FLTR_PTYPE_NONF_IPV4_GTPU_IPV4_OTHER, ICE_FLTR_PTYPE_NONF_IPV6_GTPU_IPV6_OTHER,