Skip to contentSkip to conversation

net/ice: enable GTP checksum offload

PATCH Superseded Ting Xu 4 participants 12 messages Sep 20, 2019 – Oct 23, 2019 Network drivers

lore
Share & tools
lore

Ting Xu

author
#0 lore raw

cover net/ice: enable GTP checksum offload

In this patchset, minor modifications are made in ice pmd and mbuf to enable GTP tx checksum offload in CVL. Add the GTP tunnel type flag.

Ting Xu (2):
lib/mbuf: add GTP tunnel type flag
net/ice: add GTP type in tunneling parse

 doc/guides/rel_notes/release_19_11.rst | 5 +++++
 drivers/net/ice/ice_rxtx.c             | 1 +
 lib/librte_mbuf/rte_mbuf.h             | 2 ++
 3 files changed, 8 insertions(+)
Signature · 1 line
2.17.1
author
#1 lore raw

PATCH 1/2 lib/mbuf: add GTP tunnel type flag

Add GTP tunnel type flag in mbuf for future use in GTP checksum offload.

---
 lib/librte_mbuf/rte_mbuf.h | 2 ++
 1 file changed, 2 insertions(+)
lib/librte_mbuf/rte_mbuf.h +2 -0
index 98225ec80..0a5d67d9a 100644
@@ -251,6 +251,8 @@ extern "C" {
 /** TX packet with MPLS-in-UDP RFC 7510 header. */
 #define PKT_TX_TUNNEL_MPLSINUDP (0x5ULL << 45)
 #define PKT_TX_TUNNEL_VXLAN_GPE (0x6ULL << 45)
+#define PKT_TX_TUNNEL_GTP       (0x7ULL << 45)
+
 /**
  * Generic IP encapsulated tunnel type, used for TSO and checksum offload.
  * It can be used for tunnels which are not standards or listed above.
Signature · 1 line
2.17.1
#2 lore raw

Re: [dpdk-dev] [PATCH v1 1/2] lib/mbuf: add GTP tunnel type flag

Hi,

Quoted 13 lines · Ting Xu

Add GTP tunnel type flag in mbuf for future use in GTP checksum offload.

---
 lib/librte_mbuf/rte_mbuf.h | 2 ++
 1 file changed, 2 insertions(+)
lib/librte_mbuf/rte_mbuf.h +0 -0
index 98225ec80..0a5d67d9a 100644

lib/librte_mbuf/rte_mbuf.h extern "C" { · line 258

Quoted 8 lines
lib/librte_mbuf/rte_mbuf.h +2 -0
@@ -251,6 +251,8 @@ extern "C" {
 /** TX packet with MPLS-in-UDP RFC 7510 header. */
 #define PKT_TX_TUNNEL_MPLSINUDP (0x5ULL << 45)
 #define PKT_TX_TUNNEL_VXLAN_GPE (0x6ULL << 45)
+#define PKT_TX_TUNNEL_GTP       (0x7ULL << 45)
+
 /**
  * Generic IP encapsulated tunnel type, used for TSO and checksum offload.
  * It can be used for tunnels which are not standards or listed above.

Some updates are missing, for instance in rte_get_tx_ol_flag_name(). Please look what was done for other flags.

Please, can you describe in more details what is expected in the packet header?

Thanks,
Olivier

author
#3 lore raw

Re: [dpdk-dev] [PATCH v1 1/2] lib/mbuf: add GTP tunnel type flag

Hi, Olivier,

Thanks for advice. I will modify codes according to your comments.
As for the packet header, I define a simplified GTP header in patch: app/testpmd: enable GTP header parse and Tx checksum offload, in order to help forward GTP packet in testpmd. I just moved some codes to rte_ether.h according to Ferruh's comments in that patch, which may need your review as well.

Thanks.

-----Original Message-----
From: Olivier Matz [mailto:[email protected]]
Sent: Friday, October 18, 2019 4:38 PM
To: Xu, Ting <[email protected]>
Cc: [email protected]; Lu, Wenzhuo <[email protected]>; Wu, Jingjing <[email protected]>; Ye, Xiaolong <[email protected]>; Yang, Qiming <[email protected]>; Mcnamara, John <[email protected]>; Kovacevic, Marko <[email protected]>; Zhang, Qi Z <[email protected]>
Subject: Re: [PATCH v1 1/2] lib/mbuf: add GTP tunnel type flag

Hi,

Quoted 16 lines · Ting Xu

Add GTP tunnel type flag in mbuf for future use in GTP checksum offload.

---
 lib/librte_mbuf/rte_mbuf.h | 2 ++
 1 file changed, 2 insertions(+)
lib/librte_mbuf/rte_mbuf.h +0 -0
index 98225ec80..0a5d67d9a 100644
@@ -251,6 +251,8 @@ extern "C" {
 /** TX packet with MPLS-in-UDP RFC 7510 header. */  #define 

PKT_TX_TUNNEL_MPLSINUDP (0x5ULL << 45) #define
PKT_TX_TUNNEL_VXLAN_GPE (0x6ULL << 45)

lib/librte_mbuf/rte_mbuf.h extern "C" { · line 258

Quoted 5 lines
lib/librte_mbuf/rte_mbuf.h +2 -0
+#define PKT_TX_TUNNEL_GTP       (0x7ULL << 45)
+
 /**
  * Generic IP encapsulated tunnel type, used for TSO and checksum offload.
  * It can be used for tunnels which are not standards or listed above.

Some updates are missing, for instance in rte_get_tx_ol_flag_name(). Please look what was done for other flags.

Please, can you describe in more details what is expected in the packet header?

Thanks,
Olivier

author
#4 lore raw

v2 cover support GTP Tx checksum offload

In reply to Ting Xu

In this patchset, minor modifications are made in ice pmd and mbuf to support GTP Tx checksum offload in CVL. Add the GTP tunnel type flag in mbuf.

v2: modify codes according to comments. Add flag name in rte_mbuf.c.

Ting Xu (2):
lib/mbuf: add GTP tunnel type flag
net/ice: add GTP tunnel type in tunneling parse

 doc/guides/rel_notes/release_19_11.rst | 1 +
 drivers/net/ice/ice_rxtx.c             | 1 +
 lib/librte_mbuf/rte_mbuf.c             | 2 ++
 lib/librte_mbuf/rte_mbuf.h             | 2 ++
 4 files changed, 6 insertions(+)
Signature · 1 line
2.17.1
author
#5 lore raw

PATCH v2 1/2 lib/mbuf: add GTP tunnel type flag

Add GTP tunnel type flag in mbuf for future use in GTP Tx checksum offload.

---
 lib/librte_mbuf/rte_mbuf.c | 2 ++
 lib/librte_mbuf/rte_mbuf.h | 2 ++
 2 files changed, 4 insertions(+)
lib/librte_mbuf/rte_mbuf.c +2 -0
index 0236fba76..952f3c52c 100644
@@ -591,6 +591,7 @@ const char *rte_get_tx_ol_flag_name(uint64_t mask)
 	case PKT_TX_OUTER_IPV4: return "PKT_TX_OUTER_IPV4";
 	case PKT_TX_OUTER_IPV6: return "PKT_TX_OUTER_IPV6";
 	case PKT_TX_TUNNEL_VXLAN: return "PKT_TX_TUNNEL_VXLAN";
+	case PKT_TX_TUNNEL_GTP: return "PKT_TX_TUNNEL_GTP";
 	case PKT_TX_TUNNEL_GRE: return "PKT_TX_TUNNEL_GRE";
 	case PKT_TX_TUNNEL_IPIP: return "PKT_TX_TUNNEL_IPIP";
 	case PKT_TX_TUNNEL_GENEVE: return "PKT_TX_TUNNEL_GENEVE";
@@ -627,6 +628,7 @@ rte_get_tx_ol_flag_list(uint64_t mask, char *buf, size_t buflen)
 		{ PKT_TX_OUTER_IPV4, PKT_TX_OUTER_IPV4, NULL },
 		{ PKT_TX_OUTER_IPV6, PKT_TX_OUTER_IPV6, NULL },
 		{ PKT_TX_TUNNEL_VXLAN, PKT_TX_TUNNEL_MASK, NULL },
+		{ PKT_TX_TUNNEL_GTP, PKT_TX_TUNNEL_MASK, NULL },
 		{ PKT_TX_TUNNEL_GRE, PKT_TX_TUNNEL_MASK, NULL },
 		{ PKT_TX_TUNNEL_IPIP, PKT_TX_TUNNEL_MASK, NULL },
 		{ PKT_TX_TUNNEL_GENEVE, PKT_TX_TUNNEL_MASK, NULL },
lib/librte_mbuf/rte_mbuf.h +2 -0
index fb0849ac1..ce1e22544 100644
@@ -251,6 +251,8 @@ extern "C" {
 /** TX packet with MPLS-in-UDP RFC 7510 header. */
 #define PKT_TX_TUNNEL_MPLSINUDP (0x5ULL << 45)
 #define PKT_TX_TUNNEL_VXLAN_GPE (0x6ULL << 45)
+#define PKT_TX_TUNNEL_GTP       (0x7ULL << 45)
+
 /**
  * Generic IP encapsulated tunnel type, used for TSO and checksum offload.
  * It can be used for tunnels which are not standards or listed above.
Signature · 1 line
2.17.1
Reviewed-by on v2 1/2
#6 lore raw

Re: [dpdk-dev] [PATCH v2 1/2] lib/mbuf: add GTP tunnel type flag

Quoted 4 lines · Ting Xu

Add GTP tunnel type flag in mbuf for future use in GTP Tx checksum offload.

@Olivier, change looks straightforward and there is a testpmd patch depends this, merging without waiting your ack, please shout if something is wrong.

author
#7 lore raw

PATCH v2 2/2 net/ice: add GTP tunnel type in tunneling parse

In reply to Ting Xu

Add GTP tunnel type in ice pmd tunneling parameters parse to enable Tx checksum offload.

---
 doc/guides/rel_notes/release_19_11.rst | 1 +
 drivers/net/ice/ice_rxtx.c             | 1 +
 2 files changed, 2 insertions(+)
doc/guides/rel_notes/release_19_11.rst +1 -0
index 88086b795..d61604c10 100644
@@ -104,6 +104,7 @@ New Features
   * Generic filter enhancement
     - Supported pipeline mode.
     - Supported new packet type like PPPoE for switch filter.
+  * Added support for GTP Tx checksum offload.
 
 * **Updated iavf PMD.**
 
drivers/net/ice/ice_rxtx.c +1 -0
index d4c801fc8..8d4820d3c 100644
@@ -2163,6 +2163,7 @@ ice_parse_tunneling_params(uint64_t ol_flags,
 		/* for non UDP / GRE tunneling, set to 00b */
 		break;
 	case PKT_TX_TUNNEL_VXLAN:
+	case PKT_TX_TUNNEL_GTP:
 	case PKT_TX_TUNNEL_GENEVE:
 		*cd_tunneling |= ICE_TXD_CTX_UDP_TUNNELING;
 		break;
Signature · 1 line
2.17.1
#9 lore raw

Re: [dpdk-dev] [PATCH v2 0/2] support GTP Tx checksum offload

In reply to Ting Xu
Quoted 10 lines · Ting Xu

In this patchset, minor modifications are made in ice pmd and mbuf to support GTP Tx checksum offload in CVL. Add the GTP tunnel type flag in mbuf.

v2: modify codes according to comments. Add flag name in rte_mbuf.c.

Ting Xu (2):
lib/mbuf: add GTP tunnel type flag
net/ice: add GTP tunnel type in tunneling parse

Series applied to dpdk-next-net/master, thanks.

author
#10 lore raw

PATCH 2/2 net/ice: add GTP type in tunneling parse

In reply to Ting Xu

Add GTP tunnel type in ice pmd tunneling parameters parse to enable checksum offload.

---
 doc/guides/rel_notes/release_19_11.rst | 5 +++++
 drivers/net/ice/ice_rxtx.c             | 1 +
 2 files changed, 6 insertions(+)
doc/guides/rel_notes/release_19_11.rst +5 -0
index 8490d897c..c456b5050 100644
@@ -56,6 +56,11 @@ New Features
      Also, make sure to start the actual text at the margin.
      =========================================================
 
+* **Updated the Intel ice driver.**
+
+  Updated the Intel ice driver with new features and improvements, including:
+
+  * Enabled Tx GTP checksum offload.
 
 Removed Items
 -------------
drivers/net/ice/ice_rxtx.c +1 -0
index 0282b5375..8105ff741 100644
@@ -1764,6 +1764,7 @@ ice_parse_tunneling_params(uint64_t ol_flags,
 		/* for non UDP / GRE tunneling, set to 00b */
 		break;
 	case PKT_TX_TUNNEL_VXLAN:
+	case PKT_TX_TUNNEL_GTP:
 	case PKT_TX_TUNNEL_GENEVE:
 		*cd_tunneling |= ICE_TXD_CTX_UDP_TUNNELING;
 		break;
Signature · 1 line
2.17.1
Acked-by on the v1 series
#11 lore raw
In reply to Ting Xu
Quoted 20 lines

-----Original Message-----
From: Xu, Ting
Sent: Friday, September 20, 2019 4:36 PM
To: [email protected]
Cc: Lu, Wenzhuo <[email protected]>; Wu, Jingjing <[email protected]>; Ye, Xiaolong <[email protected]>; Yang, Qiming <[email protected]>; Mcnamara, John <[email protected]>; Kovacevic, Marko <[email protected]>; [email protected]; Zhang, Qi Z <[email protected]>
Subject: [PATCH v1 0/2] net/ice: enable GTP checksum offload

In this patchset, minor modifications are made in ice pmd and mbuf to enable GTP tx checksum offload in CVL. Add the GTP tunnel type flag.

Ting Xu (2):
lib/mbuf: add GTP tunnel type flag
net/ice: add GTP type in tunneling parse

Quoted 7 lines
 doc/guides/rel_notes/release_19_11.rst | 5 +++++
 drivers/net/ice/ice_rxtx.c             | 1 +
 lib/librte_mbuf/rte_mbuf.h             | 2 ++
 3 files changed, 8 insertions(+)

--
2.17.1