summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTing Xu <ting.xu@intel.com>2019-10-21 10:00:00 +0000
committerFerruh Yigit <ferruh.yigit@intel.com>2019-10-23 16:43:10 +0200
commitd892768c6de0fa2ee11798ff0c309f7e32a51d1f (patch)
tree7acf5763d41bef219587131b5615af9c47153ee3
parent8b79b0363032a09bc0b6878f6aaa011df73b91a3 (diff)
downloaddpdk-d892768c6de0fa2ee11798ff0c309f7e32a51d1f.zip
dpdk-d892768c6de0fa2ee11798ff0c309f7e32a51d1f.tar.gz
dpdk-d892768c6de0fa2ee11798ff0c309f7e32a51d1f.tar.xz
mbuf: add GTP tunnel type
Add GTP tunnel type flag in mbuf for future use in GTP Tx checksum offload. Signed-off-by: Ting Xu <ting.xu@intel.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
-rw-r--r--lib/librte_mbuf/rte_mbuf.c2
-rw-r--r--lib/librte_mbuf/rte_mbuf.h2
2 files changed, 4 insertions, 0 deletions
diff --git a/lib/librte_mbuf/rte_mbuf.c b/lib/librte_mbuf/rte_mbuf.c
index b0d292c..8c51dc1 100644
--- a/lib/librte_mbuf/rte_mbuf.c
+++ b/lib/librte_mbuf/rte_mbuf.c
@@ -657,6 +657,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";
@@ -693,6 +694,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 },
diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h
index b1a92b1..db24cd0 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.