net: fix how L4 checksum choice is tested
net: fix how L4 checksum choice is tested

The API to prepare checksum offloads mistreats L4
checksum type enum values as self-contained flags.

Turning these flag checks into enum checks causes
warnings by GCC about possibly uninitialised IPv4
header pointer. The issue was found to show up in
the case of GCC versions 4.8.5 and 5.4.0, however,
it might be the case for a wider variety of other
versions. Initialise the pointer upon declaration.
and explain the reason behind this in the comment.

Fixes: 4fb7e803eb1a ("ethdev: add Tx preparation")
Cc: stable@dpdk.org

Signed-off-by: Ivan Malov <436a2feb05eb79a6862681e66bd0193220e8fb2d@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <ac94ab2a8fe9a9a087f6e24dcbc16626b52c07e8@solarflare.com>
Acked-by: Stephen Hemminger <06fa905d7f2aaced6dc72e9511c71a2a51e8aead@networkplumber.org>
Acked-by: Konstantin Ananyev <cbd5212b59ab42a210d72992d23a3aa17cfd3eaf@intel.com>

john-mcnamara-intel/dpdk,john-mcnamara-intel/dpdk,john-mcnamara-intel/dpdk,john-mcnamara-intel/dpdk