app/testpmd: fix IP checksum calculation
authorGeorge Prekas <prekageo@amazon.com>
Thu, 7 Jan 2021 20:42:28 +0000 (14:42 -0600)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 19 Jan 2021 02:30:32 +0000 (03:30 +0100)
commitd841ef857dac00657aeff0a764947e064f86f550
treea2347a4590540a1097538d3895bc9e8b351c9c7f
parent8b428cb5a92efc5da2b48faec47528d06367cf4e
app/testpmd: fix IP checksum calculation

Strict-aliasing rules are violated by cast to uint16_t* in flowgen.c and
the calculated IP checksum is wrong. Use attribute __may_alias__ to fix
the problem.

Fixes: e9e23a617eb8 ("app/testpmd: add flowgen forwarding engine")
Cc: stable@dpdk.org
Signed-off-by: George Prekas <prekageo@amazon.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
app/test-pmd/flowgen.c