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 E7095A0508; Wed, 13 Apr 2022 10:12:27 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 539184282A; Wed, 13 Apr 2022 10:11:24 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id 9AD774282A for ; Wed, 13 Apr 2022 10:11:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1649837483; x=1681373483; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=HGAH1fi4ZYs5JA57wTnOrPNTkUE7AC7qqNIiEoQpqAI=; b=Ub4SQIJ8P4RnkDB9qEoJcvoExqYt2BBHaGbxYIctP2oyUJNbeXR1ogGS M+qEnapXNpqMA+LbqsKGXlSHP4vSPP02ifMBsI/GExEJTZWbcP24wvpNw uQEw6CbwCn5MN8pafifhjadyRHqgBMM2xf1ShKkiTxXPdOEYrsE3JKgcg Ah+EH3sqWOCdfiXb/3COV41Q2gNOtvZr9M1p+ViaclL+CpDXNOitUBb5e gDTLio/inlx0HhF8y4PIb0D2YhRQgSzBKDOrk2LMwYWj7W1RxiZ36bBDN M/tTl1Hsrjd6MuGHf7cJBSbKy00ugZnoAwPnKEba9jIShfTkMeijluhVP A==; X-IronPort-AV: E=McAfee;i="6400,9594,10315"; a="287630034" X-IronPort-AV: E=Sophos;i="5.90,256,1643702400"; d="scan'208";a="287630034" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Apr 2022 01:11:23 -0700 X-IronPort-AV: E=Sophos;i="5.90,256,1643702400"; d="scan'208";a="526847685" Received: from intel-cd-odc-kevin.cd.intel.com ([10.240.178.195]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Apr 2022 01:11:20 -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 v2 16/33] net/ice: support IPv6 NVGRE tunnel Date: Wed, 13 Apr 2022 16:09:15 +0000 Message-Id: <20220413160932.2074781-17-kevinx.liu@intel.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20220413160932.2074781-1-kevinx.liu@intel.com> References: <20220407105706.18889-1-kevinx.liu@intel.com> <20220413160932.2074781-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 e90e109eca..4e9c85aed4 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 ( \ @@ -803,6 +804,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