app/testpmd: fix IPv4 checksum
authorGregory Etelson <getelson@nvidia.com>
Mon, 2 Aug 2021 18:13:16 +0000 (21:13 +0300)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 4 Aug 2021 09:45:50 +0000 (11:45 +0200)
commitde73c8ac50681a0b9221407a100a2c578f7e6ad3
tree95583a3e97d21a2e4951e795d3581026b8c5d10b
parente9b3d79b0696cd983ace8e6f65532b240f43a1bb
app/testpmd: fix IPv4 checksum

UDP protocol reserves 0 checksum value for special purposes.
Other protocols, like IPv4, TCP and SCTP must calculate checksum value
in software or offload checksum calculation to hardware.

If IPv4 TX checksum offload was off and header checksum was set to 0,
testpmd csum engine did not calculate checksum value for IPv4, TCP and
SCTP.

The patch always calculates IPv4, TCP and SCTP TX checksums if it is
not offloaded.

Bugzilla ID: 768
Fixes: b2a9e4a855d0 ("app/testpmd: fix Tx checksum calculation for tunnel")
Cc: stable@dpdk.org
Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
app/test-pmd/csumonly.c