From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1982AA0524; Tue, 13 Apr 2021 16:28:31 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8BC8F161098; Tue, 13 Apr 2021 16:27:22 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id E1815161098 for ; Tue, 13 Apr 2021 16:27:20 +0200 (CEST) IronPort-SDR: nZhEzvj553DOQQvXNpQ7uzMO5NUYe6XVT34lqBVVj7JDDDg1imjjqCMqoOM18VtotIci13Aotm tm7fgxa05LbQ== X-IronPort-AV: E=McAfee;i="6200,9189,9953"; a="214904328" X-IronPort-AV: E=Sophos;i="5.82,219,1613462400"; d="scan'208";a="214904328" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Apr 2021 07:27:20 -0700 IronPort-SDR: axwcpuD7+NlhHMH0BLRQ1f4+1PQHmjLj4Ol4CvJr8VNoiuMmLQkXGaGx35+kAWozom8NfPn2tE EnQNelMMALmw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,219,1613462400"; d="scan'208";a="417875285" Received: from dpdk51.sh.intel.com ([10.67.111.142]) by fmsmga008.fm.intel.com with ESMTP; 13 Apr 2021 07:27:19 -0700 From: Qi Zhang To: qiming.yang@intel.com Cc: dev@dpdk.org, ferruh.yigit@intel.com, Qi Zhang , Kiran Patil Date: Tue, 13 Apr 2021 22:30:38 +0800 Message-Id: <20210413143038.2621294-15-qi.z.zhang@intel.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210413143038.2621294-1-qi.z.zhang@intel.com> References: <20210329141411.2395069-1-qi.z.zhang@intel.com> <20210413143038.2621294-1-qi.z.zhang@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v3 14/14] net/ice/base: allow support for GTP-U filter using only inner protocols X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" 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 Signed-off-by: Qi Zhang Acked-by: Qiming Yang --- 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