[v1,1/2] lib/mbuf: add GTP tunnel type flag

Message ID 9f054f84c5ae5cb871d86ace17f7c3ca658fb890.1568968178.git.ting.xu@intel.com (mailing list archive)
State Changes Requested, archived
Delegated to: Ferruh Yigit
Headers
Series net/ice: enable GTP checksum offload |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/iol-dpdk_compile success Compile Testing PASS
ci/iol-dpdk_compile_spdk success Compile Testing PASS
ci/iol-dpdk_compile_ovs success Compile Testing PASS
ci/intel-Performance success Performance Testing PASS
ci/mellanox-Performance success Performance Testing PASS

Commit Message

Xu, Ting Sept. 20, 2019, 8:36 a.m. UTC
  Add GTP tunnel type flag in mbuf for future use in GTP
checksum offload.

Signed-off-by: Ting Xu <ting.xu@intel.com>
---
 lib/librte_mbuf/rte_mbuf.h | 2 ++
 1 file changed, 2 insertions(+)
  

Comments

Olivier Matz Oct. 18, 2019, 8:38 a.m. UTC | #1
Hi,

On Fri, Sep 20, 2019 at 08:36:23AM +0000, Ting Xu wrote:
> Add GTP tunnel type flag in mbuf for future use in GTP
> checksum offload.
> 
> Signed-off-by: Ting Xu <ting.xu@intel.com>
> ---
>  lib/librte_mbuf/rte_mbuf.h | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h
> index 98225ec80..0a5d67d9a 100644
> --- a/lib/librte_mbuf/rte_mbuf.h
> +++ b/lib/librte_mbuf/rte_mbuf.h
> @@ -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
  
Xu, Ting Oct. 21, 2019, 2:38 a.m. UTC | #2
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:olivier.matz@6wind.com] 
Sent: Friday, October 18, 2019 4:38 PM
To: Xu, Ting <ting.xu@intel.com>
Cc: dev@dpdk.org; Lu, Wenzhuo <wenzhuo.lu@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>; Ye, Xiaolong <xiaolong.ye@intel.com>; Yang, Qiming <qiming.yang@intel.com>; Mcnamara, John <john.mcnamara@intel.com>; Kovacevic, Marko <marko.kovacevic@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>
Subject: Re: [PATCH v1 1/2] lib/mbuf: add GTP tunnel type flag

Hi,

On Fri, Sep 20, 2019 at 08:36:23AM +0000, Ting Xu wrote:
> Add GTP tunnel type flag in mbuf for future use in GTP checksum 
> offload.
> 
> Signed-off-by: Ting Xu <ting.xu@intel.com>
> ---
>  lib/librte_mbuf/rte_mbuf.h | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h 
> index 98225ec80..0a5d67d9a 100644
> --- a/lib/librte_mbuf/rte_mbuf.h
> +++ b/lib/librte_mbuf/rte_mbuf.h
> @@ -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
  

Patch

diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h
index 98225ec80..0a5d67d9a 100644
--- a/lib/librte_mbuf/rte_mbuf.h
+++ b/lib/librte_mbuf/rte_mbuf.h
@@ -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.