On 9/18/2020 3:17 PM, Ophir Munk wrote:
From: Ophir Munk <ophi...@mellanox.com>
GENEVE is a widely used tunneling protocol in modern Virtualized
Networks. testpmd already supports parsing of several tunneling
protocols including VXLAN, VXLAN-GPE, GRE. This commit adds GENEVE
parsing of inner protocols (IPv4-0x0800, IPv6-0x86dd, Ethernet-0x6558)
based on IETF draft-ietf-nvo3-geneve-09. GENEVE is considered more
flexible than the other protocols. In terms of protocol format GENEVE
header has a variable length options as opposed to other tunneling
protocols which have a fixed header size.
Signed-off-by: Ophir Munk <ophi...@mellanox.com>
---
app/test-pmd/csumonly.c | 70 ++++++++++++++++++++++++++++++++++++++++++++-
app/test-pmd/testpmd.h | 1 +
lib/librte_net/meson.build | 3 +-
lib/librte_net/rte_geneve.h | 66 ++++++++++++++++++++++++++++++++++++++++++
4 files changed, 138 insertions(+), 2 deletions(-)
create mode 100644 lib/librte_net/rte_geneve.h
diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c
index 7ece398..a9f33c6 100644
--- a/app/test-pmd/csumonly.c
+++ b/app/test-pmd/csumonly.c
@@ -43,6 +43,7 @@
#include <rte_flow.h>
#include <rte_gro.h>
#include <rte_gso.h>
+#include <rte_geneve.h>
#include "testpmd.h"
@@ -63,6 +64,7 @@
#endif
uint16_t vxlan_gpe_udp_port = 4790;
+uint16_t geneve_udp_port = RTE_GENEVE_DEFAULT_PORT;
There is a testpmd command to configure the NIC for GENEVE port,
"port config (port_id) udp_tunnel_port add|rm vxlan|geneve|vxlan-gpe (udp_port)"
You are adding support to testpmd to parse the GENEVE packets, but I think these
two commads should be consistent.
What do you think "port config N add geneve X" update the 'geneve_udp_port=X"?
<...>
@@ -865,9 +925,17 @@ pkt_burst_checksum_forward(struct fwd_stream *fs)
}
parse_vxlan(udp_hdr, &info,
m->packet_type);
- if (info.is_tunnel)
+ if (info.is_tunnel) {
tx_ol_flags |=
PKT_TX_TUNNEL_VXLAN;
+ goto tunnel_update;
+ }
+ parse_geneve(udp_hdr, &info);
+ if (info.is_tunnel) {
+ tx_ol_flags |=
+ PKT_TX_TUNNEL_GENEVE;
+ goto tunnel_update;
+ }
Can you please update the "csum parse-tunnel" documentation to mention "geneve"
protocol?