app/testpmd: support tunneled TSO in checksum engine
authorJianfeng Tan <jianfeng.tan@intel.com>
Mon, 26 Sep 2016 13:48:34 +0000 (13:48 +0000)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Sun, 9 Oct 2016 21:19:45 +0000 (23:19 +0200)
commit0f62d63593ed28fc1490d8773de7d2c0e0384044
tree1e77805b7bcadef2de7e67fd10881b85c05a8e5f
parentc59faf3fe8fe6dbd99e8cd9d703839728264c5ae
app/testpmd: support tunneled TSO in checksum 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 <konstantin.ananyev@intel.com>
Signed-off-by: Zhe Tao <zhe.tao@intel.com>
Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
app/test-pmd/cmdline.c
app/test-pmd/csumonly.c
app/test-pmd/testpmd.h