From: Chenmin Sun Date: Tue, 21 Jan 2020 11:56:53 +0000 (+0800) Subject: net/ice: add outer IPv4 matching for GTP-U flow X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=1bfc89ec1e47e0f91a62ed8f9465e020c3732bba;p=dpdk.git net/ice: add outer IPv4 matching for GTP-U flow This patch adds the capability of matching the outer IPv4 headers for GTPU flows. Fixes: efc16c621415 ("net/ice: support flow director GTPU tunnel") Cc: stable@dpdk.org Signed-off-by: Chenmin Sun Acked-by: Qi Zhang Acked-by: Xiaolong Ye --- diff --git a/drivers/net/ice/base/ice_fdir.c b/drivers/net/ice/base/ice_fdir.c index 20d64f8612..56c1c1c845 100644 --- a/drivers/net/ice/base/ice_fdir.c +++ b/drivers/net/ice/base/ice_fdir.c @@ -804,6 +804,10 @@ ice_fdir_get_gen_prgm_pkt(struct ice_hw *hw, struct ice_fdir_fltr *input, case ICE_FLTR_PTYPE_NONF_IPV4_GTPU_IPV4_TCP: case ICE_FLTR_PTYPE_NONF_IPV4_GTPU_IPV4_ICMP: case ICE_FLTR_PTYPE_NONF_IPV4_GTPU_IPV4_OTHER: + ice_pkt_insert_u32(loc, ICE_IPV4_SRC_ADDR_OFFSET, + input->ip.v4.src_ip); + ice_pkt_insert_u32(loc, ICE_IPV4_DST_ADDR_OFFSET, + input->ip.v4.dst_ip); ice_pkt_insert_u32(loc, ICE_IPV4_GTPU_TEID_OFFSET, input->gtpu_data.teid); ice_pkt_insert_u6_qfi(loc, ICE_IPV4_GTPU_QFI_OFFSET, diff --git a/drivers/net/ice/ice_fdir_filter.c b/drivers/net/ice/ice_fdir_filter.c index 2d8cdadf59..79e4d2edf8 100644 --- a/drivers/net/ice/ice_fdir_filter.c +++ b/drivers/net/ice/ice_fdir_filter.c @@ -68,9 +68,10 @@ ICE_INSET_TUN_SCTP_SRC_PORT | ICE_INSET_TUN_SCTP_DST_PORT) #define ICE_FDIR_INSET_GTPU (\ - ICE_INSET_GTPU_TEID) + ICE_INSET_IPV4_SRC | ICE_INSET_IPV4_DST | ICE_INSET_GTPU_TEID) #define ICE_FDIR_INSET_GTPU_EH (\ + ICE_INSET_IPV4_SRC | ICE_INSET_IPV4_DST | \ ICE_INSET_GTPU_TEID | ICE_INSET_GTPU_QFI) static struct ice_pattern_match_item ice_fdir_pattern_os[] = {