app/test: fix IPv6 header initialization
authorLance Richardson <lance.richardson@broadcom.com>
Fri, 26 Mar 2021 16:37:32 +0000 (12:37 -0400)
committerDavid Marchand <david.marchand@redhat.com>
Mon, 5 Jul 2021 09:30:58 +0000 (11:30 +0200)
commita906371d2758df7260640873d93f888724759448
tree590f9edf46844aee9e270050486387be1b3b567d
parentfc5bffb8b5ba17c110b8c3c35c6090e3345ad000
app/test: fix IPv6 header initialization

Fix two issues found when writing PMD unit tests for HW ptype and
L4 checksum offload:

   - The version field in the IPv6 header was being set to zero,
     which prevented hardware from recognizing it as IPv6. The
     IP version field is now set to six.
   - The payload_len field was being initialized using host byte
     order, which (among other things) resulted in incorrect L4
     checksum computation. The payload_len field is now set using
     network (big-endian) byte order.

Fixes: 92073ef961ee ("bond: unit tests")
Cc: stable@dpdk.org
Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
app/test/packet_burst_generator.c