Skip to contentSkip to conversation

gro: add UDP GRO and VXLAN UDP GRO support

PATCH Superseded [email protected] 1 participant 3 messages Sep 1, 2020 Arm/Amlogic Meson SoC support

v2 of 7 Superseded Latest is v7 →

lore
Share & tools
lore
#0 lore raw

v2 cover gro: add UDP GRO and VXLAN UDP GRO support

From: Yi Yang <[email protected]>

In case that UFO or GSO is enabled, GRO is very necessary, especially for UDP, it is more so. Many NICs can't support VXLAN UDP UFO/USO and VLAN UFO/USO, so UDP performance improvement depends on GSO and GRO to a great extent.

This patch series added VLAN UDP GRO and VXLAN UDP GRO support.

Yi Yang (2):
gro: add UDP GRO support
gro: add VXLAN UDP GRO support

 lib/librte_gro/Makefile         |   2 +
 lib/librte_gro/gro_udp4.c       | 442 ++++++++++++++++++++++++++++++++
 lib/librte_gro/gro_udp4.h       | 296 +++++++++++++++++++++
 lib/librte_gro/gro_vxlan_udp4.c | 556 ++++++++++++++++++++++++++++++++++++++++
 lib/librte_gro/gro_vxlan_udp4.h | 152 +++++++++++
 lib/librte_gro/meson.build      |   2 +-
 lib/librte_gro/rte_gro.c        | 192 +++++++++++---
 lib/librte_gro/rte_gro.h        |   8 +-
 8 files changed, 1616 insertions(+), 34 deletions(-)
 create mode 100644 lib/librte_gro/gro_udp4.c
 create mode 100644 lib/librte_gro/gro_udp4.h
 create mode 100644 lib/librte_gro/gro_vxlan_udp4.c
 create mode 100644 lib/librte_gro/gro_vxlan_udp4.h
Signature · 1 line
1.8.3.1
#1 lore raw

PATCH v2 1/2 gro: add UDP GRO support

From: Yi Yang <[email protected]>

UDP GRO can help improve VM-to-VM UDP performance when VM is enabled UFO or GSO, GRO must be supported if GSO or UFO is enabled, otherwise, performance gain will be hurt.

With this enabled in DPDK, OVS DPDK can leverage it to improve VM-to-VM UDP performance, this will make sure IP fragments will be reassembled once it is received from physical NIC. It is very helpful in OVS DPDK VLAN TSO case.

---
 lib/librte_gro/Makefile    |   1 +
 lib/librte_gro/gro_udp4.c  | 442 +++++++++++++++++++++++++++++++++++++++++++++
 lib/librte_gro/gro_udp4.h  | 296 ++++++++++++++++++++++++++++++
 lib/librte_gro/meson.build |   2 +-
 lib/librte_gro/rte_gro.c   | 129 +++++++++----
 lib/librte_gro/rte_gro.h   |   5 +-
 6 files changed, 841 insertions(+), 34 deletions(-)
 create mode 100644 lib/librte_gro/gro_udp4.c
 create mode 100644 lib/librte_gro/gro_udp4.h
lib/librte_gro/Makefile +1 -0
index e848687..41ec29e 100644
@@ -15,6 +15,7 @@ EXPORT_MAP := rte_gro_version.map
 # source files
 SRCS-$(CONFIG_RTE_LIBRTE_GRO) += rte_gro.c
 SRCS-$(CONFIG_RTE_LIBRTE_GRO) += gro_tcp4.c
+SRCS-$(CONFIG_RTE_LIBRTE_GRO) += gro_udp4.c
 SRCS-$(CONFIG_RTE_LIBRTE_GRO) += gro_vxlan_tcp4.c
 
 # install this header file
lib/librte_gro/gro_udp4.c new file +442 -0

442 lines not on this page · raw message

lib/librte_gro/gro_udp4.h new file +296 -0

296 lines not on this page · raw message

lib/librte_gro/meson.build +1 -1
index 501668c..0d18dc2 100644
@@ -1,6 +1,6 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017 Intel Corporation
 
-sources = files('rte_gro.c', 'gro_tcp4.c', 'gro_vxlan_tcp4.c')
+sources = files('rte_gro.c', 'gro_tcp4.c', 'gro_udp4.c', 'gro_vxlan_tcp4.c')
 headers = files('rte_gro.h')
 deps += ['ethdev']
lib/librte_gro/rte_gro.c +97 -32

258 lines not on this page · raw message

lib/librte_gro/rte_gro.h +4 -1
index 8d781b5..470f3ed 100644
@@ -31,7 +31,10 @@
 /**< TCP/IPv4 GRO flag */
 #define RTE_GRO_IPV4_VXLAN_TCP_IPV4_INDEX 1
 #define RTE_GRO_IPV4_VXLAN_TCP_IPV4 (1ULL << RTE_GRO_IPV4_VXLAN_TCP_IPV4_INDEX)
-/**< VxLAN GRO flag. */
+/**< VxLAN TCP/IPv4 GRO flag. */
+#define RTE_GRO_UDP_IPV4_INDEX 2
+#define RTE_GRO_UDP_IPV4 (1ULL << RTE_GRO_UDP_IPV4_INDEX)
+/**< UDP/IPv4 GRO flag */
 
 /**
  * Structure used to create GRO context objects or used to pass
Signature · 1 line
1.8.3.1
#2 lore raw

PATCH v2 2/2 gro: add VXLAN UDP GRO support

In reply to [email protected]

From: Yi Yang <[email protected]>

VXLAN UDP GRO can help improve VM-to-VM UDP performance when VM is enabled UFO or GSO, GRO must be supported if GSO or UFO is enabled, otherwise, performance gain will be hurt.

With this enabled in DPDK, OVS DPDK can leverage it to improve VM-to-VM UDP performance, this will make sure IP fragments will be reassembled once it is received from physical NIC. It is very helpful in OVS DPDK VXLAN TSO case.

---
 lib/librte_gro/Makefile         |   1 +
 lib/librte_gro/gro_vxlan_udp4.c | 556 ++++++++++++++++++++++++++++++++++++++++
 lib/librte_gro/gro_vxlan_udp4.h | 152 +++++++++++
 lib/librte_gro/meson.build      |   2 +-
 lib/librte_gro/rte_gro.c        |  75 +++++-
 lib/librte_gro/rte_gro.h        |   3 +
 6 files changed, 782 insertions(+), 7 deletions(-)
 create mode 100644 lib/librte_gro/gro_vxlan_udp4.c
 create mode 100644 lib/librte_gro/gro_vxlan_udp4.h
lib/librte_gro/Makefile +1 -0
index 41ec29e..30dd8c7 100644
@@ -17,6 +17,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_GRO) += rte_gro.c
 SRCS-$(CONFIG_RTE_LIBRTE_GRO) += gro_tcp4.c
 SRCS-$(CONFIG_RTE_LIBRTE_GRO) += gro_udp4.c
 SRCS-$(CONFIG_RTE_LIBRTE_GRO) += gro_vxlan_tcp4.c
+SRCS-$(CONFIG_RTE_LIBRTE_GRO) += gro_vxlan_udp4.c
 
 # install this header file
 SYMLINK-$(CONFIG_RTE_LIBRTE_GRO)-include += rte_gro.h
lib/librte_gro/gro_vxlan_udp4.c new file +556 -0

556 lines not on this page · raw message

lib/librte_gro/gro_vxlan_udp4.h new file +152 -0

152 lines not on this page · raw message

lib/librte_gro/meson.build +1 -1
index 0d18dc2..ea8b45c 100644
@@ -1,6 +1,6 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017 Intel Corporation
 
-sources = files('rte_gro.c', 'gro_tcp4.c', 'gro_udp4.c', 'gro_vxlan_tcp4.c')
+sources = files('rte_gro.c', 'gro_tcp4.c', 'gro_udp4.c', 'gro_vxlan_tcp4.c', 'gro_vxlan_udp4.c')
 headers = files('rte_gro.h')
 deps += ['ethdev']
lib/librte_gro/rte_gro.c +69 -6

164 lines not on this page · raw message

lib/librte_gro/rte_gro.h +3 -0
index 470f3ed..9f9ed49 100644
@@ -35,6 +35,9 @@
 #define RTE_GRO_UDP_IPV4_INDEX 2
 #define RTE_GRO_UDP_IPV4 (1ULL << RTE_GRO_UDP_IPV4_INDEX)
 /**< UDP/IPv4 GRO flag */
+#define RTE_GRO_IPV4_VXLAN_UDP_IPV4_INDEX 3
+#define RTE_GRO_IPV4_VXLAN_UDP_IPV4 (1ULL << RTE_GRO_IPV4_VXLAN_UDP_IPV4_INDEX)
+/**< VxLAN UDP/IPv4 GRO flag. */
 
 /**
  * Structure used to create GRO context objects or used to pass
Signature · 1 line
1.8.3.1