support GTP-U Tx offload on FVL and CVL
cover support GTP-U Tx offload on FVL and 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(-)
Signature · 1 line
2.17.1
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'.
--- drivers/net/i40e/i40e_rxtx.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/i40e/i40e_rxtx.c +1 -0
@@ -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 ;
Signature · 1 line
2.17.1
Re: [dpdk-dev] [PATCH 1/2] net/i40e: support GTP checksum offload
Quoted 32 lines
-----Original Message-----
From: Murphy Yang <[email protected]>
Sent: Wednesday, November 25, 2020 5:32 PM
To: [email protected]
Cc: Yang, Qiming <[email protected]>; Yang, SteveX <[email protected]>; Xing, Beilei <[email protected]>; Guo, Jia <[email protected]>; Lu, Wenzhuo <[email protected]>; Yang, MurphyX <[email protected]>
Subject: [PATCH 1/2] net/i40e: support GTP checksum offloadTo support Tx side offload on GTP tunneling packet, driver should set correct tunneling parameters of 'L4TUNT'.
Signed-off-by Murphy Yang <[email protected]>--- drivers/net/i40e/i40e_rxtx.c | 1 + 1 file changed, 1 insertion(+)drivers/net/i40e/i40e_rxtx.c index renamed from drivers/net/i40e/i40e_rxtx.c +0
-0
5df9a9df56..6b64a03d16100644drivers/net/i40e/i40e_rxtx.c +1
-1@@ -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
PATCH 2/2 app/testpmd: support GTP-U extension packet checksum offload
In reply to Murphy YangTo 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.
--- app/test-pmd/csumonly.c | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-)
app/test-pmd/csumonly.c +23 -3
@@ -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 */
Signature · 1 line
2.17.1
Hi, murphy
Quoted 9 lines
-----Original Message-----
From: Murphy Yang <[email protected]>
Sent: Wednesday, November 25, 2020 5:32 PM
To: [email protected]
Cc: Yang, Qiming <[email protected]>; Yang, SteveX <[email protected]>; Xing, Beilei <[email protected]>; Guo, Jia <[email protected]>; Lu, Wenzhuo <[email protected]>; Yang, MurphyX <[email protected]>
Subject: [PATCH 0/2] support GTP-U Tx offload on FVL and CVL
Where is the patch that enable the offload for CVL?
Quoted 16 lines
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 offloadapp/test-pmd/csumonly.c | 26 +++++++++++++++++++++++--- drivers/net/i40e/i40e_rxtx.c | 1 + 2 files changed, 24 insertions(+), 3 deletions(-)--
2.17.1