DPDK patches and discussions
 help / color / mirror / Atom feed
From: Beilei Xing <beilei.xing@intel.com>
To: jingjing.wu@intel.com
Cc: dev@dpdk.org
Subject: [dpdk-dev] [PATCH 1/7] net/i40e: support RSS for GTP-C and GTP-U
Date: Fri, 25 Aug 2017 15:50:24 +0800	[thread overview]
Message-ID: <1503647430-93905-2-git-send-email-beilei.xing@intel.com> (raw)
In-Reply-To: <1503647430-93905-1-git-send-email-beilei.xing@intel.com>

GTP-C and GTP-U are supported by new profile.
Add new PCTYPE and enable RSS for GTP-C and GTP-U.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c | 14 ++++++++++++++
 drivers/net/i40e/i40e_ethdev.h | 10 +++++++++-
 2 files changed, 23 insertions(+), 1 deletion(-)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 4a2e3f2..7c9e5af 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -197,6 +197,8 @@
 #define I40E_REG_INSET_TUNNEL_L4_UDP_DST_PORT    0x0000000000100000ULL
 /* UDP Tunneling ID, NVGRE/GRE key */
 #define I40E_REG_INSET_TUNNEL_ID                 0x00000000000C0000ULL
+/* GTP TEID */
+#define I40E_REG_INSET_GTP_TEID                  0x0000000000020000ULL
 /* Last ether type */
 #define I40E_REG_INSET_LAST_ETHER_TYPE           0x0000000000004000ULL
 /* Tunneling outer destination IPv4 address */
@@ -6760,6 +6762,11 @@ i40e_hw_rss_hash_set(struct i40e_pf *pf, struct rte_eth_rss_conf *rss_conf)
 	else
 		hena &= ~I40E_RSS_HENA_ALL;
 	hena |= i40e_config_hena(rss_hf, hw->mac.type);
+
+	/* Enable GTP-C/U by default */
+	hena |= 1ULL << I40E_FILTER_PCTYPE_GTPC;
+	hena |= 1ULL << I40E_FILTER_PCTYPE_GTPU;
+
 	i40e_write_rx_ctl(hw, I40E_PFQF_HENA(0), (uint32_t)hena);
 	i40e_write_rx_ctl(hw, I40E_PFQF_HENA(1), (uint32_t)(hena >> 32));
 	I40E_WRITE_FLUSH(hw);
@@ -8123,6 +8130,12 @@ i40e_get_valid_input_set(enum i40e_filter_pctype pctype,
 			I40E_INSET_VLAN_OUTER | I40E_INSET_VLAN_INNER |
 			I40E_INSET_VLAN_TUNNEL | I40E_INSET_LAST_ETHER_TYPE |
 			I40E_INSET_FLEX_PAYLOAD,
+		[I40E_FILTER_PCTYPE_GTPC] =
+			I40E_INSET_GTP_TEID | I40E_INSET_IPV4_SRC |
+			I40E_INSET_IPV4_DST,
+		[I40E_FILTER_PCTYPE_GTPU] =
+			I40E_INSET_GTP_TEID | I40E_INSET_IPV4_SRC |
+			I40E_INSET_IPV4_DST,
 	};
 
 	/**
@@ -8449,6 +8462,7 @@ i40e_translate_input_set_reg(enum i40e_mac_type type, uint64_t input)
 		{I40E_INSET_FLEX_PAYLOAD_W6, I40E_REG_INSET_FLEX_PAYLOAD_WORD6},
 		{I40E_INSET_FLEX_PAYLOAD_W7, I40E_REG_INSET_FLEX_PAYLOAD_WORD7},
 		{I40E_INSET_FLEX_PAYLOAD_W8, I40E_REG_INSET_FLEX_PAYLOAD_WORD8},
+		{I40E_INSET_GTP_TEID, I40E_REG_INSET_GTP_TEID},
 	};
 
     /* some different registers map in x722*/
diff --git a/drivers/net/i40e/i40e_ethdev.h b/drivers/net/i40e/i40e_ethdev.h
index 48abc05..ab2a5cd 100644
--- a/drivers/net/i40e/i40e_ethdev.h
+++ b/drivers/net/i40e/i40e_ethdev.h
@@ -119,6 +119,10 @@ enum i40e_flxpld_layer_idx {
 #define I40E_FDIR_MAX_FLEX_LEN      16 /* len in bytes of flex payload */
 #define I40E_INSET_MASK_NUM_REG     2  /* number of input set mask registers */
 
+/* New PCTYE for GTP-C and GTP-U */
+#define I40E_FILTER_PCTYPE_GTPC		23
+#define I40E_FILTER_PCTYPE_GTPU		24
+
 /* i40e flags */
 #define I40E_FLAG_RSS                   (1ULL << 0)
 #define I40E_FLAG_DCB                   (1ULL << 1)
@@ -234,6 +238,8 @@ enum i40e_flxpld_layer_idx {
 #define I40E_INSET_TUNNEL_DST_PORT       0x0000001000000000ULL
 #define I40E_INSET_TUNNEL_ID             0x0000002000000000ULL
 
+#define I40E_INSET_GTP_TEID              0x0000004000000000ULL
+
 /* bit 48 ~ bit 55 */
 #define I40E_INSET_LAST_ETHER_TYPE 0x0001000000000000ULL
 
@@ -1131,7 +1137,9 @@ i40e_calc_itr_interval(int16_t interval)
 	(pctype) == I40E_FILTER_PCTYPE_NONF_IPV6_TCP || \
 	(pctype) == I40E_FILTER_PCTYPE_NONF_IPV6_SCTP || \
 	(pctype) == I40E_FILTER_PCTYPE_NONF_IPV6_OTHER || \
-	(pctype) == I40E_FILTER_PCTYPE_L2_PAYLOAD)
+	(pctype) == I40E_FILTER_PCTYPE_L2_PAYLOAD || \
+	(pctype) == I40E_FILTER_PCTYPE_GTPC || \
+	(pctype) == I40E_FILTER_PCTYPE_GTPU)
 
 #define I40E_PHY_TYPE_SUPPORT_40G(phy_type) \
 	(((phy_type) & I40E_CAP_PHY_TYPE_40GBASE_KR4) || \
-- 
2.5.5

  reply	other threads:[~2017-08-25  7:51 UTC|newest]

Thread overview: 116+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-25  7:50 [dpdk-dev] [PATCH 0/7] GTP enabling Beilei Xing
2017-08-25  7:50 ` Beilei Xing [this message]
2017-09-07 11:20   ` [dpdk-dev] [PATCH v2 0/6] GPT-C and GTP-U enabling Beilei Xing
2017-09-07 11:20     ` [dpdk-dev] [PATCH v2 1/6] net/i40e: support RSS for GTP-C and GTP-U Beilei Xing
2017-09-18 14:17       ` Bruce Richardson
2017-09-18 14:21         ` Bruce Richardson
2017-09-07 11:20     ` [dpdk-dev] [PATCH v2 2/6] ethdev: add GTPC and GTPU items Beilei Xing
2017-09-07 12:19       ` Adrien Mazarguil
2017-09-12  6:40         ` Xing, Beilei
2017-09-12 10:46           ` Adrien Mazarguil
2017-09-13  3:09             ` Xing, Beilei
2017-09-07 11:21     ` [dpdk-dev] [PATCH v2 3/6] net/i40e: finish integration FDIR with generic flow API Beilei Xing
2017-09-07 11:21     ` [dpdk-dev] [PATCH v2 4/6] net/i40e: add FDIR support for GTP-C and GTP-U Beilei Xing
2017-09-07 11:21     ` [dpdk-dev] [PATCH v2 5/6] net/i40e: add cloud filter parsing function for GTP Beilei Xing
2017-09-07 11:21     ` [dpdk-dev] [PATCH v2 6/6] net/i40e: enable cloud filter for GTP-C and GTP-U Beilei Xing
2017-09-22 22:35     ` [dpdk-dev] [PATCH v3 0/8] GPT-C and GTP-U enabling Beilei Xing
2017-09-22 22:35       ` [dpdk-dev] [PATCH v3 1/8] mbuf: support GTP in software packet type parser Beilei Xing
2017-09-25  9:21         ` Olivier MATZ
2017-09-28  2:17         ` [dpdk-dev] [PATCH v4 0/8] GPT-C and GTP-U enabling Beilei Xing
2017-09-28  2:17           ` [dpdk-dev] [PATCH v4 1/8] mbuf: support GTP in software packet type parser Beilei Xing
2017-09-28  2:17           ` [dpdk-dev] [PATCH v4 2/8] net/i40e: update ptype and pctype info Beilei Xing
2017-09-28  2:17           ` [dpdk-dev] [PATCH v4 3/8] net/i40e: support RSS for new pctype Beilei Xing
2017-09-28  2:17           ` [dpdk-dev] [PATCH v4 4/8] ethdev: add GTP items to support flow API Beilei Xing
2017-09-28  2:17           ` [dpdk-dev] [PATCH v4 5/8] net/i40e: finish integration FDIR with generic " Beilei Xing
2017-09-28  2:17           ` [dpdk-dev] [PATCH v4 6/8] net/i40e: add FDIR support for GTP-C and GTP-U Beilei Xing
2017-09-28  2:17           ` [dpdk-dev] [PATCH v4 7/8] net/i40e: add cloud filter parsing function for GTP Beilei Xing
2017-09-28  2:17           ` [dpdk-dev] [PATCH v4 8/8] net/i40e: enable cloud filter for GTP-C and GTP-U Beilei Xing
2017-09-28  8:13           ` [dpdk-dev] [PATCH v5 0/8] GPT-C and GTP-U enabling Beilei Xing
2017-09-28  8:13             ` [dpdk-dev] [PATCH v5 1/8] mbuf: support GTP in software packet type parser Beilei Xing
2017-09-28  8:13             ` [dpdk-dev] [PATCH v5 2/8] net/i40e: update ptype and pctype info Beilei Xing
2017-09-28  8:13             ` [dpdk-dev] [PATCH v5 3/8] net/i40e: support RSS for new pctype Beilei Xing
2017-09-28  8:13             ` [dpdk-dev] [PATCH v5 4/8] ethdev: add GTP items to support flow API Beilei Xing
2017-09-28 13:43               ` Sean Harte
2017-09-29  2:12                 ` Xing, Beilei
2017-09-28  8:13             ` [dpdk-dev] [PATCH v5 5/8] net/i40e: finish integration FDIR with generic " Beilei Xing
2017-09-28  8:13             ` [dpdk-dev] [PATCH v5 6/8] net/i40e: add FDIR support for GTP-C and GTP-U Beilei Xing
2017-09-28  8:13             ` [dpdk-dev] [PATCH v5 7/8] net/i40e: add cloud filter parsing function for GTP Beilei Xing
2017-09-28  8:13             ` [dpdk-dev] [PATCH v5 8/8] net/i40e: enable cloud filter for GTP-C and GTP-U Beilei Xing
2017-09-29  5:18           ` [dpdk-dev] [PATCH v6 0/8] GPT-C and GTP-U enabling Beilei Xing
2017-09-29  5:18             ` [dpdk-dev] [PATCH v6 1/8] mbuf: support GTP in software packet type parser Beilei Xing
2017-09-29  8:15               ` Sean Harte
2017-09-29  8:41                 ` Xing, Beilei
2017-09-29  5:18             ` [dpdk-dev] [PATCH v6 2/8] net/i40e: update ptype and pctype info Beilei Xing
2017-09-29 13:22               ` Wu, Jingjing
2017-09-29 13:24                 ` Xing, Beilei
2017-09-29  5:18             ` [dpdk-dev] [PATCH v6 3/8] net/i40e: support RSS for new pctype Beilei Xing
2017-09-29 13:24               ` Wu, Jingjing
2017-09-29  5:18             ` [dpdk-dev] [PATCH v6 4/8] ethdev: add GTP items to support flow API Beilei Xing
2017-09-29  8:15               ` Sean Harte
2017-09-29  8:54                 ` Xing, Beilei
2017-09-29  9:29                   ` Sean Harte
2017-09-29  9:37                     ` Xing, Beilei
2017-10-02 12:27                     ` Adrien Mazarguil
2017-10-03  8:56                       ` Sean Harte
2017-10-05  8:06                         ` Wu, Jingjing
2017-10-05  8:30                           ` Adrien Mazarguil
2017-10-05  8:39                             ` Wu, Jingjing
2017-09-29  5:18             ` [dpdk-dev] [PATCH v6 5/8] net/i40e: finish integration FDIR with generic " Beilei Xing
2017-09-29 13:28               ` Wu, Jingjing
2017-09-29  5:19             ` [dpdk-dev] [PATCH v6 6/8] net/i40e: add FDIR support for GTP-C and GTP-U Beilei Xing
2017-09-29  8:15               ` Sean Harte
2017-09-29  9:33                 ` Xing, Beilei
2017-09-29 10:09                   ` Sean Harte
2017-09-29 11:30                     ` Xing, Beilei
2017-09-29 11:39                       ` Xing, Beilei
2017-09-29 13:14                     ` Xing, Beilei
2017-09-29 15:15                     ` Xing, Beilei
2017-09-29  5:19             ` [dpdk-dev] [PATCH v6 7/8] net/i40e: add cloud filter parsing function for GTP Beilei Xing
2017-09-29  5:19             ` [dpdk-dev] [PATCH v6 8/8] net/i40e: enable cloud filter for GTP-C and GTP-U Beilei Xing
2017-09-29 15:50             ` [dpdk-dev] [PATCH v7 0/8] net/i40e: GPT-C and GTP-U enabling Beilei Xing
2017-09-29 15:50               ` [dpdk-dev] [PATCH v7 1/8] mbuf: support GTP in software packet type parser Beilei Xing
2017-09-29 15:50               ` [dpdk-dev] [PATCH v7 2/8] net/i40e: update ptype and pctype info Beilei Xing
2017-10-05  2:51                 ` Wu, Jingjing
2017-09-29 15:50               ` [dpdk-dev] [PATCH v7 3/8] net/i40e: support RSS for new pctype Beilei Xing
2017-09-29 15:50               ` [dpdk-dev] [PATCH v7 4/8] ethdev: add GTP items to support flow API Beilei Xing
2017-10-05  8:01                 ` Wu, Jingjing
2017-09-29 15:50               ` [dpdk-dev] [PATCH v7 5/8] net/i40e: finish integration FDIR with generic " Beilei Xing
2017-10-05  2:52                 ` Wu, Jingjing
2017-09-29 15:50               ` [dpdk-dev] [PATCH v7 6/8] net/i40e: add FDIR support for GTP-C and GTP-U Beilei Xing
2017-10-05  3:09                 ` Wu, Jingjing
2017-09-29 15:50               ` [dpdk-dev] [PATCH v7 7/8] net/i40e: add cloud filter parsing function for GTP Beilei Xing
2017-10-05  3:13                 ` Wu, Jingjing
2017-09-29 15:50               ` [dpdk-dev] [PATCH v7 8/8] net/i40e: enable cloud filter for GTP-C and GTP-U Beilei Xing
2017-10-05  8:03                 ` Wu, Jingjing
2017-10-04 22:43               ` [dpdk-dev] [PATCH v7 0/8] net/i40e: GPT-C and GTP-U enabling Ferruh Yigit
2017-10-05  8:14               ` [dpdk-dev] [PATCH v8 0/7] " Beilei Xing
2017-10-05  8:14                 ` [dpdk-dev] [PATCH v8 1/7] mbuf: support GTP in software packet type parser Beilei Xing
2017-10-05 11:50                   ` Sean Harte
2017-10-05  8:14                 ` [dpdk-dev] [PATCH v8 2/7] net/i40e: update ptype and pctype info Beilei Xing
2017-10-05  8:14                 ` [dpdk-dev] [PATCH v8 3/7] ethdev: add GTP items to support flow API Beilei Xing
2017-10-05 11:50                   ` Sean Harte
2017-10-05  8:14                 ` [dpdk-dev] [PATCH v8 4/7] net/i40e: finish integration FDIR with generic " Beilei Xing
2017-10-05  8:14                 ` [dpdk-dev] [PATCH v8 5/7] net/i40e: add FDIR support for GTP-C and GTP-U Beilei Xing
2017-10-05 11:50                   ` Sean Harte
2017-10-05  8:14                 ` [dpdk-dev] [PATCH v8 6/7] net/i40e: add cloud filter parsing function for GTP Beilei Xing
2017-10-05  8:14                 ` [dpdk-dev] [PATCH v8 7/7] net/i40e: enable cloud filter for GTP-C and GTP-U Beilei Xing
2017-10-05  8:23                 ` [dpdk-dev] [PATCH v8 0/7] net/i40e: GPT-C and GTP-U enabling Wu, Jingjing
2017-10-05 21:13                 ` Ferruh Yigit
2017-09-22 22:35       ` [dpdk-dev] [PATCH v3 2/8] net/i40e: update ptype and pctype info Beilei Xing
2017-09-23  2:58         ` Wu, Jingjing
2017-09-22 22:35       ` [dpdk-dev] [PATCH v3 3/8] net/i40e: support RSS for new pctype Beilei Xing
2017-09-22 22:35       ` [dpdk-dev] [PATCH v3 4/8] ethdev: add GTP items to support flow API Beilei Xing
2017-09-22 13:39         ` Adrien Mazarguil
2017-09-22 22:35       ` [dpdk-dev] [PATCH v3 5/8] net/i40e: finish integration FDIR with generic " Beilei Xing
2017-09-22 22:35       ` [dpdk-dev] [PATCH v3 6/8] net/i40e: add FDIR support for GTP-C and GTP-U Beilei Xing
2017-09-22 22:35       ` [dpdk-dev] [PATCH v3 7/8] net/i40e: add cloud filter parsing function for GTP Beilei Xing
2017-09-22 22:35       ` [dpdk-dev] [PATCH v3 8/8] net/i40e: enable cloud filter for GTP-C and GTP-U Beilei Xing
2017-08-25  7:50 ` [dpdk-dev] [PATCH 2/7] ethdev: add GTP item Beilei Xing
2017-09-06 16:02   ` Adrien Mazarguil
2017-09-07  6:31     ` Xing, Beilei
2017-08-25  7:50 ` [dpdk-dev] [PATCH 3/7] app/testpmd: add GTP fields to flow command Beilei Xing
2017-09-06 16:03   ` Adrien Mazarguil
2017-08-25  7:50 ` [dpdk-dev] [PATCH 4/7] net/i40e: finish integration FDIR with generic flow API Beilei Xing
2017-08-25  7:50 ` [dpdk-dev] [PATCH 5/7] net/i40e: add FDIR support for GTP-C and GTP-U Beilei Xing
2017-08-25  7:50 ` [dpdk-dev] [PATCH 6/7] net/i40e: add cloud filter parsing function for GTP Beilei Xing
2017-08-25  7:50 ` [dpdk-dev] [PATCH 7/7] net/i40e: enable cloud filter for GTP-C and GTP-U Beilei Xing

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=1503647430-93905-2-git-send-email-beilei.xing@intel.com \
    --to=beilei.xing@intel.com \
    --cc=dev@dpdk.org \
    --cc=jingjing.wu@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).