From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 0B5CF3B5 for ; Wed, 22 Mar 2017 10:32:13 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=intel; t=1490175134; x=1521711134; h=from:to:cc:subject:date:message-id; bh=0eBqSYfbHpqggESSpQg6lhUss6JJ8S8vQMMKE0xCPh4=; b=VibKwn9rlNL5hkzA73zFcEbVOzHbpgrksEWdWNaxGI2UbfFGfmDXqQfB AtqUVApAclxAaQzWEI+fCFSt+FeGSQ==; Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Mar 2017 02:32:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,204,1486454400"; d="scan'208";a="79751593" Received: from unknown (HELO localhost.localdomain.sh.intel.com) ([10.239.128.234]) by fmsmga006.fm.intel.com with ESMTP; 22 Mar 2017 02:32:12 -0700 From: Jiayu Hu To: dev@dpdk.org Cc: yuanhan.liu@linux.intel.com, Jiayu Hu Date: Wed, 22 Mar 2017 17:32:15 +0800 Message-Id: <1490175137-108413-1-git-send-email-jiayu.hu@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [dpdk-dev] [PATCH 0/2] lib: add TCP IPv4 GRO support X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Mar 2017 09:32:14 -0000 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