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 AFC66A0508; Wed, 13 Apr 2022 11:13:05 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 48DA142835; Wed, 13 Apr 2022 11:12:23 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id E7ADC4068B for ; Wed, 13 Apr 2022 11:12:16 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1649841137; x=1681377137; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=z/7XmDGmm/vYYV9DYQCl99wkfRfZy2l0IrhTmuLzWN4=; b=JaSy1t1KvQXF7IwYbNv2HKwdYNNOT/pSZFIFrqVl+FC2o5bmNmw4XOpE Sr7VBiMGQyK6QdCwZmW/AVroTZCVdmazh8U1t28GduR/EbeHZnNRwJva2 7UtBM+Rw1ImLLswg1HZWLXrdHOScrDE+kAkTcScvsPx9zzXd6/09o6m5l pQemi+pWeOpwOabaradd8l1v4JiXy75K0L/lK+0oPKN5G8fPUQiKfHzRt vldAyTZaSini1a4pVGWmBY+Hx8CnZlJl9u2GiDLzWdjmIRfIwRatGrGi0 KNXtstdtBXhWSAVQXaRy3zESsi7bkpwmXtCpaU3WXDfj43Yj43vnXR/dX w==; X-IronPort-AV: E=McAfee;i="6400,9594,10315"; a="262058383" X-IronPort-AV: E=Sophos;i="5.90,256,1643702400"; d="scan'208";a="262058383" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Apr 2022 02:12:09 -0700 X-IronPort-AV: E=Sophos;i="5.90,256,1643702400"; d="scan'208";a="552122834" Received: from intel-cd-odc-kevin.cd.intel.com ([10.240.178.195]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Apr 2022 02:12:07 -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 v3 11/22] net/ice: support IPv6 NVGRE tunnel Date: Wed, 13 Apr 2022 17:10:19 +0000 Message-Id: <20220413171030.2231163-12-kevinx.liu@intel.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20220413171030.2231163-1-kevinx.liu@intel.com> References: <20220413160932.2074781-1-kevinx.liu@intel.com> <20220413171030.2231163-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