From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 70302A04C1; Wed, 20 Nov 2019 06:45:22 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 95E891BE86; Wed, 20 Nov 2019 06:45:12 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id C02951BC25 for ; Wed, 20 Nov 2019 06:45:10 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Nov 2019 21:45:10 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,220,1571727600"; d="scan'208";a="200602463" Received: from dpdk-yahui-skylake.sh.intel.com ([10.67.119.16]) by orsmga008.jf.intel.com with ESMTP; 19 Nov 2019 21:45:08 -0800 From: Yahui Cao To: Qiming Yang , Wenzhuo Lu Cc: dev@dpdk.org, Qi Zhang , Yahui Cao , Xiaolong Ye , Ying A Wang , Simei Su , Chenmin Sun Date: Wed, 20 Nov 2019 21:28:36 +0800 Message-Id: <20191120132836.75142-3-yahui.cao@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191120132836.75142-1-yahui.cao@intel.com> References: <20191120132836.75142-1-yahui.cao@intel.com> Subject: [dpdk-dev] [PATCH 2/2] net/ice: fix FDIR support for GTPU without extension header X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Add FDIR support for normal GTP-U packet, which doesn't contain GTP_PSC extension header. Fixes: efc16c621415 ("net/ice: support flow director GTPU tunnel") Cc: yahui.cao@intel.com Signed-off-by: Yahui Cao --- drivers/net/ice/ice_fdir_filter.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/net/ice/ice_fdir_filter.c b/drivers/net/ice/ice_fdir_filter.c index 9e251cee5..7214380ea 100644 --- a/drivers/net/ice/ice_fdir_filter.c +++ b/drivers/net/ice/ice_fdir_filter.c @@ -68,6 +68,9 @@ ICE_INSET_TUN_SCTP_SRC_PORT | ICE_INSET_TUN_SCTP_DST_PORT) #define ICE_FDIR_INSET_GTPU_IPV4 (\ + ICE_INSET_GTPU_TEID) + +#define ICE_FDIR_INSET_GTPU_EH_IPV4 (\ ICE_INSET_GTPU_TEID | ICE_INSET_GTPU_QFI) static struct ice_pattern_match_item ice_fdir_pattern_os[] = { @@ -123,6 +126,8 @@ static struct ice_pattern_match_item ice_fdir_pattern_comms[] = { {pattern_eth_ipv4_udp_vxlan_eth_ipv4_sctp, ICE_FDIR_INSET_VXLAN_IPV4_SCTP, ICE_INSET_NONE}, {pattern_eth_ipv4_gtpu_ipv4, ICE_FDIR_INSET_GTPU_IPV4, ICE_INSET_NONE}, + {pattern_eth_ipv4_gtpu_eh_ipv4, + ICE_FDIR_INSET_GTPU_EH_IPV4, ICE_INSET_NONE}, }; static struct ice_flow_parser ice_fdir_parser_os; @@ -837,6 +842,7 @@ ice_fdir_input_set_conf(struct ice_pf *pf, enum ice_fltr_ptype flow, case ICE_FLTR_PTYPE_NONF_IPV4_GTPU_IPV4_ICMP: case ICE_FLTR_PTYPE_NONF_IPV4_GTPU_IPV4_OTHER: ICE_FLOW_SET_HDRS(seg, ICE_FLOW_SEG_HDR_GTPU_EH | + ICE_FLOW_SEG_HDR_GTPU_IP | ICE_FLOW_SEG_HDR_IPV4); break; default: @@ -1733,6 +1739,8 @@ ice_fdir_parse_pattern(__rte_unused struct ice_adapter *ad, filter->input.gtpu_data.teid = gtp_spec->teid; } + + tunnel_type = ICE_FDIR_TUNNEL_TYPE_GTPU; break; case RTE_FLOW_ITEM_TYPE_GTP_PSC: gtp_psc_spec = item->spec; @@ -1745,8 +1753,6 @@ ice_fdir_parse_pattern(__rte_unused struct ice_adapter *ad, filter->input.gtpu_data.qfi = gtp_psc_spec->qfi; } - - tunnel_type = ICE_FDIR_TUNNEL_TYPE_GTPU; break; default: rte_flow_error_set(error, EINVAL, -- 2.17.1