[dpdk-dev] [PATCH 0/2] lib: add TCP IPv4 GRO support

Jiayu Hu jiayu.hu at intel.com
Wed Mar 22 10:32:15 CET 2017


Generic Receive Offload (GRO) is a widely used SW offloading technique,
which reassemble small packets into large ones, to reduce processing
overheads for upper layer applications in receiving side, like networking
stack. Therefore, we propose to add GRO support in DPDK.

DPDK GRO is implemented as a standalone library, which provides GRO
functions for various of protocols. In the design of DPDK GRO, different
protocols have own reassembly functions. Applications should explicitly
invoke specific reassembly functions according to packet types.

This patchset provides TCP IPv4 GRO reassembly functions, and
demonstrates the usage of these functions in app/testpmd.

We perform two iperf tests (with DPDK GRO and without DPDK GRO) to see
the performance gains from DPDK GRO. Specifically, the experiment
environment is:
	a. Two 10Gbps physical ports (p0 and p1) on one host are linked
	together, and are in two network namespaces (ns1 and ns2);
	b. iperf client runs on p0, which is in charge of sending TCP IPv4
	packets; testpmd runs on p1. Besides, testpmd connects with one
	virtual machine (VM) via vhost-user and virtio-kernel. The VM runs
	iperf server, whose IP is 1.1.2.4;
	c. p0 turns on TSO; VM turns off kernel GRO; testpmd runs in iofwd
	mode;
	d. iperf client and server use the following commands:
	- iperf client: ip netns exec ns1 iperf -c 1.1.2.4 -i2 -t 60 -f g -m
	- iperf server: iperf -s -f g
Two test cases are:
	a. w/o DPDK GRO: disable TCP IPv4 GRO on testpmd
	b. w DPDK GRO: enable TCP IPv4 GRO on testpmd
Test results:
	a. w/o DPDK GRO: 5.5 Gbits/sec
	b. w DPDK GRO: 8.46 Gbits/sec
As we can see, the throughput improvement from DPDK GRO is around 50%.

Jiayu Hu (2):
  lib: add Generic Receive Offload support for TCP IPv4 packets
  app/testpmd: provide TCP IPv4 GRO function in iofwd mode

 app/test-pmd/cmdline.c       |  48 +++++++
 app/test-pmd/config.c        |  59 +++++++++
 app/test-pmd/iofwd.c         |   7 +
 app/test-pmd/testpmd.c       |  10 ++
 app/test-pmd/testpmd.h       |   6 +
 config/common_base           |   5 +
 lib/Makefile                 |   1 +
 lib/librte_gro/Makefile      |  50 +++++++
 lib/librte_gro/rte_gro_tcp.c | 301 +++++++++++++++++++++++++++++++++++++++++++
 lib/librte_gro/rte_gro_tcp.h | 114 ++++++++++++++++
 mk/rte.app.mk                |   1 +
 11 files changed, 602 insertions(+)
 create mode 100644 lib/librte_gro/Makefile
 create mode 100644 lib/librte_gro/rte_gro_tcp.c
 create mode 100644 lib/librte_gro/rte_gro_tcp.h

-- 
2.7.4



More information about the dev mailing list