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 E1774A00C3; Tue, 19 Apr 2022 09:48:35 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A4054406A2; Tue, 19 Apr 2022 09:48:07 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id 2F35B406A2 for ; Tue, 19 Apr 2022 09:48:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1650354486; x=1681890486; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=z/7XmDGmm/vYYV9DYQCl99wkfRfZy2l0IrhTmuLzWN4=; b=c9MqQJ1CSr43+NUSKI9TWCHZ3bkuv9r/QYWwtT6Oo0vCKTOqtwVU18ei SylLd/dMOmKvj4HWDvcP5RYrulQoS61Np1SwVl/SEHjsEbPvibPPUqajw fzF3ZI1zogFF0bHnbSIqC09KM7zSEV+t0mHr4tL8scKo+i+TobBpZfCE0 TlLc2ENdjemWmieaKF/hDUpRNAwk9X8NGAI9EYbyOnvr0LQoh7ROnl2Ax 1EmuWn28f8MV3k0f+PGODXP6TiqelUsvg0MQObOam2bWo6RrDFFBYe2Zi 79i3pfC+gC5fWM/114+UyhlMPZF6LnXI7LOcTLwTgKGYD/Sgl46kONdS4 Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10321"; a="244288665" X-IronPort-AV: E=Sophos;i="5.90,272,1643702400"; d="scan'208";a="244288665" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Apr 2022 00:48:05 -0700 X-IronPort-AV: E=Sophos;i="5.90,272,1643702400"; d="scan'208";a="575971804" Received: from intel-cd-odc-kevin.cd.intel.com ([10.240.178.195]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Apr 2022 00:48:02 -0700 From: Kevin Liu To: dev@dpdk.org Cc: qiming.yang@intel.com, qi.z.zhang@intel.com, stevex.yang@intel.com, Alvin Zhang , Junfeng Guo , Kevin Liu Subject: [PATCH v4 11/23] net/ice: support IPv6 NVGRE tunnel Date: Tue, 19 Apr 2022 15:46:02 +0000 Message-Id: <20220419154614.476154-12-kevinx.liu@intel.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20220419154614.476154-1-kevinx.liu@intel.com> References: <20220413171030.2231163-1-kevinx.liu@intel.com> <20220419154614.476154-1-kevinx.liu@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 From: Alvin Zhang Add protocol definition and pattern matching for IPv6 NVGRE tunnel. Signed-off-by: Junfeng Guo Signed-off-by: Alvin Zhang Signed-off-by: Kevin Liu --- drivers/net/ice/ice_switch_filter.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/ice/ice_switch_filter.c b/drivers/net/ice/ice_switch_filter.c index 36c9bffb73..c04547235c 100644 --- a/drivers/net/ice/ice_switch_filter.c +++ b/drivers/net/ice/ice_switch_filter.c @@ -31,6 +31,7 @@ #define ICE_PPP_IPV4_PROTO 0x0021 #define ICE_PPP_IPV6_PROTO 0x0057 #define ICE_IPV4_PROTO_NVGRE 0x002F +#define ICE_IPV6_PROTO_NVGRE 0x002F #define ICE_SW_PRI_BASE 6 #define ICE_SW_INSET_ETHER ( \ @@ -763,6 +764,10 @@ ice_switch_parse_pattern(const struct rte_flow_item pattern[], break; } } + if ((ipv6_spec->hdr.proto & + ipv6_mask->hdr.proto) == + ICE_IPV6_PROTO_NVGRE) + *tun_type = ICE_SW_TUN_AND_NON_TUN; if (ipv6_mask->hdr.proto) *input |= ICE_INSET_IPV6_NEXT_HDR; if (ipv6_mask->hdr.hop_limits) -- 2.33.1