DPDK patches and discussions
 help / color / mirror / Atom feed
From: Qi Zhang <qi.z.zhang@intel.com>
To: qiming.yang@intel.com
Cc: dev@dpdk.org, xiaolong.ye@intel.com,
	Qi Zhang <qi.z.zhang@intel.com>,
	Junfeng Guo <junfeng.guo@intel.com>,
	Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Subject: [dpdk-dev] [PATCH 06/10] net/ice/base: add FD support for GTPU with outer IPv6
Date: Thu, 11 Jun 2020 16:43:26 +0800	[thread overview]
Message-ID: <20200611084330.18301-7-qi.z.zhang@intel.com> (raw)
In-Reply-To: <20200611084330.18301-1-qi.z.zhang@intel.com>

Add FDir support for MAC_IPV6_GTPU type with outer IPv6 address, teid
and qfi fields matching.

Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/base/ice_fdir.c | 36 ++++++++++++++++++++++++++++++++++++
 drivers/net/ice/base/ice_fdir.h |  2 ++
 drivers/net/ice/base/ice_type.h |  1 +
 3 files changed, 39 insertions(+)

diff --git a/drivers/net/ice/base/ice_fdir.c b/drivers/net/ice/base/ice_fdir.c
index ecdebd384..c5a20632c 100644
--- a/drivers/net/ice/base/ice_fdir.c
+++ b/drivers/net/ice/base/ice_fdir.c
@@ -102,6 +102,25 @@ static const u8 ice_fdir_ipv4_gtpu4_pkt[] = {
 	0x00, 0x00,
 };
 
+static const u8 ice_fdir_ipv6_gtpu6_pkt[] = {
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00, 0x86, 0xdd, 0x60, 0x00,
+	0x00, 0x00, 0x00, 0x44, 0x11, 0x40, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x68,
+	0x08, 0x68, 0x00, 0x44, 0x7f, 0xed, 0x34, 0xff,
+	0x00, 0x34, 0x12, 0x34, 0x56, 0x78, 0x00, 0x00,
+	0x00, 0x85, 0x02, 0x00, 0x33, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
+	0x3b, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+	0x00, 0x00,
+};
+
 static const u8 ice_fdir_ipv4_l2tpv3_pkt[] = {
 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 	0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x45, 0x00,
@@ -467,6 +486,13 @@ static const struct ice_fdir_base_pkt ice_fdir_pkt[] = {
 		ice_fdir_ipv4_gtpu4_pkt,
 	},
 	{
+		ICE_FLTR_PTYPE_NONF_IPV6_GTPU_IPV6_OTHER,
+		sizeof(ice_fdir_ipv6_gtpu6_pkt),
+		ice_fdir_ipv6_gtpu6_pkt,
+		sizeof(ice_fdir_ipv6_gtpu6_pkt),
+		ice_fdir_ipv6_gtpu6_pkt,
+	},
+	{
 		ICE_FLTR_PTYPE_NONF_IPV4_L2TPV3,
 		sizeof(ice_fdir_ipv4_l2tpv3_pkt), ice_fdir_ipv4_l2tpv3_pkt,
 		sizeof(ice_fdir_ipv4_l2tpv3_pkt), ice_fdir_ipv4_l2tpv3_pkt,
@@ -1035,6 +1061,16 @@ ice_fdir_get_gen_prgm_pkt(struct ice_hw *hw, struct ice_fdir_fltr *input,
 		ice_pkt_insert_u6_qfi(loc, ICE_IPV4_GTPU_QFI_OFFSET,
 				      input->gtpu_data.qfi);
 		break;
+	case ICE_FLTR_PTYPE_NONF_IPV6_GTPU_IPV6_OTHER:
+		ice_pkt_insert_ipv6_addr(loc, ICE_IPV6_DST_ADDR_OFFSET,
+					 input->ip.v6.src_ip);
+		ice_pkt_insert_ipv6_addr(loc, ICE_IPV6_SRC_ADDR_OFFSET,
+					 input->ip.v6.dst_ip);
+		ice_pkt_insert_u32(loc, ICE_IPV6_GTPU_TEID_OFFSET,
+				   input->gtpu_data.teid);
+		ice_pkt_insert_u6_qfi(loc, ICE_IPV6_GTPU_QFI_OFFSET,
+				      input->gtpu_data.qfi);
+		break;
 	case ICE_FLTR_PTYPE_NONF_IPV4_L2TPV3:
 		ice_pkt_insert_u32(loc, ICE_IPV4_L2TPV3_SESS_ID_OFFSET,
 				   input->l2tpv3_data.session_id);
diff --git a/drivers/net/ice/base/ice_fdir.h b/drivers/net/ice/base/ice_fdir.h
index e4f7b1387..1f31debe6 100644
--- a/drivers/net/ice/base/ice_fdir.h
+++ b/drivers/net/ice/base/ice_fdir.h
@@ -46,6 +46,8 @@
 #define ICE_IPV6_PROTO_OFFSET		20
 #define ICE_IPV4_GTPU_TEID_OFFSET	46
 #define ICE_IPV4_GTPU_QFI_OFFSET	56
+#define ICE_IPV6_GTPU_TEID_OFFSET	66
+#define ICE_IPV6_GTPU_QFI_OFFSET	76
 #define ICE_IPV4_L2TPV3_SESS_ID_OFFSET	34
 #define ICE_IPV6_L2TPV3_SESS_ID_OFFSET	54
 #define ICE_IPV4_ESP_SPI_OFFSET		34
diff --git a/drivers/net/ice/base/ice_type.h b/drivers/net/ice/base/ice_type.h
index 41a1912bf..c13cd7b00 100644
--- a/drivers/net/ice/base/ice_type.h
+++ b/drivers/net/ice/base/ice_type.h
@@ -296,6 +296,7 @@ enum ice_fltr_ptype {
 	ICE_FLTR_PTYPE_NONF_IPV4_GTPU_IPV4_TCP,
 	ICE_FLTR_PTYPE_NONF_IPV4_GTPU_IPV4_ICMP,
 	ICE_FLTR_PTYPE_NONF_IPV4_GTPU_IPV4_OTHER,
+	ICE_FLTR_PTYPE_NONF_IPV6_GTPU_IPV6_OTHER,
 	ICE_FLTR_PTYPE_NONF_IPV4_L2TPV3,
 	ICE_FLTR_PTYPE_NONF_IPV6_L2TPV3,
 	ICE_FLTR_PTYPE_NONF_IPV4_ESP,
-- 
2.13.6


  parent reply	other threads:[~2020-06-11  8:40 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-11  8:43 [dpdk-dev] [PATCH 00/10] net/ice: base code update for 20.08 batch 2 Qi Zhang
2020-06-11  8:43 ` [dpdk-dev] [PATCH 01/10] net/ice/base: adjust profile id map locks Qi Zhang
2020-06-11  8:43 ` [dpdk-dev] [PATCH 02/10] net/ice/base: refactor to avoid need to retry Qi Zhang
2020-06-11  8:43 ` [dpdk-dev] [PATCH 03/10] net/ice/base: add FD support for outer IP of GTPU Qi Zhang
2020-06-11  8:43 ` [dpdk-dev] [PATCH 04/10] net/ice/base: add commands for system diagnostic Qi Zhang
2020-06-11  8:43 ` [dpdk-dev] [PATCH 05/10] net/ice/base: rename misleading variable Qi Zhang
2020-06-11  8:43 ` Qi Zhang [this message]
2020-06-11  8:43 ` [dpdk-dev] [PATCH 07/10] net/ice/base: get tunnel type for recipe Qi Zhang
2020-06-19 14:33   ` Ferruh Yigit
2020-06-11  8:43 ` [dpdk-dev] [PATCH 08/10] net/ice/base: choose TCP dummy packet by protocol Qi Zhang
2020-06-11  8:43 ` [dpdk-dev] [PATCH 09/10] net/ice/base: fix the VSI ID mask to be 10 bit Qi Zhang
2020-06-11  8:43 ` [dpdk-dev] [PATCH 10/10] net/ice/base: replace RSS profile locks Qi Zhang
2020-06-18  6:04 ` [dpdk-dev] [PATCH 00/10] net/ice: base code update for 20.08 batch 2 Yang, Qiming
2020-06-19  4:24   ` Zhang, Qi Z
2020-06-23 10:15     ` Yang, Qiming

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200611084330.18301-7-qi.z.zhang@intel.com \
    --to=qi.z.zhang@intel.com \
    --cc=dev@dpdk.org \
    --cc=junfeng.guo@intel.com \
    --cc=paul.m.stillwell.jr@intel.com \
    --cc=qiming.yang@intel.com \
    --cc=xiaolong.ye@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).