DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 0/2] support GTP-U Tx offload on FVL and CVL
@ 2020-11-25  9:32 Murphy Yang
  2020-11-25  9:32 ` [dpdk-dev] [PATCH 1/2] net/i40e: support GTP checksum offload Murphy Yang
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Murphy Yang @ 2020-11-25  9:32 UTC (permalink / raw)
  To: dev
  Cc: qiming.yang, stevex.yang, beilei.xing, jia.guo, wenzhuo.lu, Murphy Yang

Support outer L3 and inner L3 + L4 Tx checksum offload for GTP-U packets
that contain extension header on FVL.
Support outer L3 + L4 and inner L3 + L4 Rx and Tx checksum offload for
GTP-U packets that contain extension header on CVL.

Murphy Yang (2):
  net/i40e: support GTP checksum offload
  app/testpmd: support GTP-U extension packet checksum offload

 app/test-pmd/csumonly.c      | 26 +++++++++++++++++++++++---
 drivers/net/i40e/i40e_rxtx.c |  1 +
 2 files changed, 24 insertions(+), 3 deletions(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [dpdk-dev] [PATCH 1/2] net/i40e: support GTP checksum offload
  2020-11-25  9:32 [dpdk-dev] [PATCH 0/2] support GTP-U Tx offload on FVL and CVL Murphy Yang
@ 2020-11-25  9:32 ` Murphy Yang
  2020-12-02  8:06   ` Guo, Jia
  2020-11-25  9:32 ` [dpdk-dev] [PATCH 2/2] app/testpmd: support GTP-U extension packet " Murphy Yang
  2020-12-02  7:58 ` [dpdk-dev] [PATCH 0/2] support GTP-U Tx offload on FVL and CVL Guo, Jia
  2 siblings, 1 reply; 5+ messages in thread
From: Murphy Yang @ 2020-11-25  9:32 UTC (permalink / raw)
  To: dev
  Cc: qiming.yang, stevex.yang, beilei.xing, jia.guo, wenzhuo.lu, Murphy Yang

To support Tx side offload on GTP tunneling packet, driver should
set correct tunneling parameters of 'L4TUNT'.

Signed-off-by: Murphy Yang <murphyx.yang@intel.com>
---
 drivers/net/i40e/i40e_rxtx.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
index 5df9a9df56..6b64a03d16 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -233,6 +233,7 @@ i40e_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 |= I40E_TXD_CTX_UDP_TUNNELING;
 		break;
-- 
2.17.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [dpdk-dev] [PATCH 2/2] app/testpmd: support GTP-U extension packet checksum offload
  2020-11-25  9:32 [dpdk-dev] [PATCH 0/2] support GTP-U Tx offload on FVL and CVL Murphy Yang
  2020-11-25  9:32 ` [dpdk-dev] [PATCH 1/2] net/i40e: support GTP checksum offload Murphy Yang
@ 2020-11-25  9:32 ` Murphy Yang
  2020-12-02  7:58 ` [dpdk-dev] [PATCH 0/2] support GTP-U Tx offload on FVL and CVL Guo, Jia
  2 siblings, 0 replies; 5+ messages in thread
From: Murphy Yang @ 2020-11-25  9:32 UTC (permalink / raw)
  To: dev
  Cc: qiming.yang, stevex.yang, beilei.xing, jia.guo, wenzhuo.lu, Murphy Yang

To enable Tx side offload on GTP-U packets that contain extension header,
testpmd should set 'info->l2_len' correctly, this value should contain UDP
header length, GTP-U header length and GTP-U extension header length.

Signed-off-by: Murphy Yang <murphyx.yang@intel.com>
---
 app/test-pmd/csumonly.c | 26 +++++++++++++++++++++++---
 1 file changed, 23 insertions(+), 3 deletions(-)

diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c
index d813d4fae0..1faeacd809 100644
--- a/app/test-pmd/csumonly.c
+++ b/app/test-pmd/csumonly.c
@@ -218,14 +218,32 @@ parse_gtp(struct rte_udp_hdr *udp_hdr,
 	gtp_hdr = (struct rte_gtp_hdr *)((char *)udp_hdr +
 		  sizeof(struct rte_udp_hdr));
 
+	/* Calculate the gtp_len*/
+	if (gtp_hdr->gtp_hdr_info & 0x7)
+		gtp_len = gtp_len + 4;
+
+	if (gtp_hdr->gtp_hdr_info & 0x4) {
+		/*Assuming one extension gtp header*/
+		uint16_t gtp_extension_len = 0;
+		uint8_t *gtp_extension_hdr = NULL;
+		uint8_t gtp_NEHT = 0;
+		do {
+			gtp_extension_hdr = (uint8_t *)((uint8_t *)gtp_hdr +
+					     gtp_len);
+			gtp_extension_len = *gtp_extension_hdr * 4;
+			gtp_len = gtp_len + gtp_extension_len;
+			gtp_NEHT = *(gtp_extension_hdr +
+				      gtp_extension_len - 1);
+		} while (gtp_NEHT);
+	}
+
 	/*
 	 * Check message type. If message type is 0xff, it is
 	 * a GTP data packet. If not, it is a GTP control packet
 	 */
 	if (gtp_hdr->msg_type == 0xff) {
 		ip_ver = *(uint8_t *)((char *)udp_hdr +
-			 sizeof(struct rte_udp_hdr) +
-			 sizeof(struct rte_gtp_hdr));
+			 sizeof(struct rte_udp_hdr) +  gtp_len);
 		ip_ver = (ip_ver) & 0xf0;
 
 		if (ip_ver == RTE_GTP_TYPE_IPV4) {
@@ -233,20 +251,22 @@ parse_gtp(struct rte_udp_hdr *udp_hdr,
 				   gtp_len);
 			info->ethertype = _htons(RTE_ETHER_TYPE_IPV4);
 			parse_ipv4(ipv4_hdr, info);
+			info->l2_len = (uint8_t *)ipv4_hdr - (uint8_t *)udp_hdr;
 		} else if (ip_ver == RTE_GTP_TYPE_IPV6) {
 			ipv6_hdr = (struct rte_ipv6_hdr *)((char *)gtp_hdr +
 				   gtp_len);
 			info->ethertype = _htons(RTE_ETHER_TYPE_IPV6);
 			parse_ipv6(ipv6_hdr, info);
+			info->l2_len = (uint8_t *)ipv6_hdr - (uint8_t *)udp_hdr;
 		}
 	} else {
 		info->ethertype = 0;
 		info->l4_len = 0;
 		info->l3_len = 0;
 		info->l4_proto = 0;
+		info->l2_len += RTE_ETHER_GTP_HLEN;
 	}
 
-	info->l2_len += RTE_ETHER_GTP_HLEN;
 }
 
 /* Parse a vxlan header */
-- 
2.17.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH 0/2] support GTP-U Tx offload on FVL and CVL
  2020-11-25  9:32 [dpdk-dev] [PATCH 0/2] support GTP-U Tx offload on FVL and CVL Murphy Yang
  2020-11-25  9:32 ` [dpdk-dev] [PATCH 1/2] net/i40e: support GTP checksum offload Murphy Yang
  2020-11-25  9:32 ` [dpdk-dev] [PATCH 2/2] app/testpmd: support GTP-U extension packet " Murphy Yang
@ 2020-12-02  7:58 ` Guo, Jia
  2 siblings, 0 replies; 5+ messages in thread
From: Guo, Jia @ 2020-12-02  7:58 UTC (permalink / raw)
  To: Yang, MurphyX, dev
  Cc: Yang, Qiming, Yang, SteveX, Xing, Beilei, Lu, Wenzhuo, Yang, MurphyX

Hi, murphy

> -----Original Message-----
> From: Murphy Yang <murphyx.yang@intel.com>
> Sent: Wednesday, November 25, 2020 5:32 PM
> To: dev@dpdk.org
> Cc: Yang, Qiming <qiming.yang@intel.com>; Yang, SteveX
> <stevex.yang@intel.com>; Xing, Beilei <beilei.xing@intel.com>; Guo, Jia
> <jia.guo@intel.com>; Lu, Wenzhuo <wenzhuo.lu@intel.com>; Yang,
> MurphyX <murphyx.yang@intel.com>
> Subject: [PATCH 0/2] support GTP-U Tx offload on FVL and CVL

Where is the patch that enable the offload for CVL?

> 
> Support outer L3 and inner L3 + L4 Tx checksum offload for GTP-U packets
> that contain extension header on FVL.
> Support outer L3 + L4 and inner L3 + L4 Rx and Tx checksum offload for GTP-U
> packets that contain extension header on CVL.
> 
> Murphy Yang (2):
>   net/i40e: support GTP checksum offload
>   app/testpmd: support GTP-U extension packet checksum offload
> 
>  app/test-pmd/csumonly.c      | 26 +++++++++++++++++++++++---
>  drivers/net/i40e/i40e_rxtx.c |  1 +
>  2 files changed, 24 insertions(+), 3 deletions(-)
> 
> --
> 2.17.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH 1/2] net/i40e: support GTP checksum offload
  2020-11-25  9:32 ` [dpdk-dev] [PATCH 1/2] net/i40e: support GTP checksum offload Murphy Yang
@ 2020-12-02  8:06   ` Guo, Jia
  0 siblings, 0 replies; 5+ messages in thread
From: Guo, Jia @ 2020-12-02  8:06 UTC (permalink / raw)
  To: Yang, MurphyX, dev
  Cc: Yang, Qiming, Yang, SteveX, Xing, Beilei, Lu, Wenzhuo, Yang, MurphyX

Acked-by: Jeff Guo <jia.guo@intel.com>

> -----Original Message-----
> From: Murphy Yang <murphyx.yang@intel.com>
> Sent: Wednesday, November 25, 2020 5:32 PM
> To: dev@dpdk.org
> Cc: Yang, Qiming <qiming.yang@intel.com>; Yang, SteveX
> <stevex.yang@intel.com>; Xing, Beilei <beilei.xing@intel.com>; Guo, Jia
> <jia.guo@intel.com>; Lu, Wenzhuo <wenzhuo.lu@intel.com>; Yang,
> MurphyX <murphyx.yang@intel.com>
> Subject: [PATCH 1/2] net/i40e: support GTP checksum offload
> 
> To support Tx side offload on GTP tunneling packet, driver should set correct
> tunneling parameters of 'L4TUNT'.
> 
> Signed-off-by: Murphy Yang <murphyx.yang@intel.com>
> ---
>  drivers/net/i40e/i40e_rxtx.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c index
> 5df9a9df56..6b64a03d16 100644
> --- a/drivers/net/i40e/i40e_rxtx.c
> +++ b/drivers/net/i40e/i40e_rxtx.c
> @@ -233,6 +233,7 @@ i40e_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 |= I40E_TXD_CTX_UDP_TUNNELING;
>  		break;
> --
> 2.17.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-12-02  8:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-25  9:32 [dpdk-dev] [PATCH 0/2] support GTP-U Tx offload on FVL and CVL Murphy Yang
2020-11-25  9:32 ` [dpdk-dev] [PATCH 1/2] net/i40e: support GTP checksum offload Murphy Yang
2020-12-02  8:06   ` Guo, Jia
2020-11-25  9:32 ` [dpdk-dev] [PATCH 2/2] app/testpmd: support GTP-U extension packet " Murphy Yang
2020-12-02  7:58 ` [dpdk-dev] [PATCH 0/2] support GTP-U Tx offload on FVL and CVL Guo, Jia

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git