Re: [PATCH v5 3/3] app/testpmd: support tunneled TSO in csum fwd engine
From: Ananyev, Konstantin <hidden>
Date: 2016-09-27 17:25:59
-----Original Message-----
From: Tan, Jianfeng
Sent: Monday, September 26, 2016 2:49 PM
To: dev@dpdk.org
Cc: Ananyev, Konstantin <redacted>; Wu, Jingjing <redacted>; Tan, Jianfeng
[off-list ref]; Zhe Tao [off-list ref]
Subject: [PATCH v5 3/3] app/testpmd: support tunneled TSO in csum fwd engine
Add a new command "tunnel_tso set <tso_segsz> <port>" to enable
segmentation offload and set MSS to tso_segsz. Another command,
"tunnel_tso show <port>" is added to show tunneled packet MSS.
Result 0 means tunnel_tso is disabled.
The original commands, "tso set <tso_segsz> <port>" and "tso show
<port>" are only reponsible for non-tunneled packets. And the new
commands are for tunneled packets.
Below conditions are needed to make it work:
a. tunnel TSO is supported by the NIC;
b. "csum parse_tunnel" must be set so that tunneled pkts are
recognized;
c. for tunneled pkts with outer L3 is IPv4, "csum set outer-ip"
must be set to hw, because after tso, total_len of outer IP
header is changed, and the checksum of outer IP header calculated
by sw should be wrong; that is not necessary for IPv6 tunneled
pkts because there's no checksum field to be filled anymore.
Suggested-by: Konstantin Ananyev <redacted>
Signed-off-by: Zhe Tao <redacted>
Signed-off-by: Jianfeng Tan <redacted>
---
v5:
-- Instead of reuse original tso command, add a new command for
tunneled tso;
-- Fix a implicit conversion from long -> int bug, as the parameter
of process_outer_cksums() in previous version.
app/test-pmd/cmdline.c | 132 +++++++++++++++++++++++++++++++++++++++++++++---
app/test-pmd/csumonly.c | 69 ++++++++++++++++++-------
app/test-pmd/testpmd.h | 3 +-
3 files changed, 179 insertions(+), 25 deletions(-)Acked-by: Konstantin Ananyev <redacted>