net/ena: calculate partial checksum if DF bit is disabled
authorMichal Krawczyk <mk@semihalf.com>
Mon, 10 Apr 2017 14:28:11 +0000 (16:28 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 19 Apr 2017 13:37:37 +0000 (15:37 +0200)
commitbc5ef57d43c5f4ea423734b2aeae070ae19dd91f
tree8a00ca16515257ea4e6dc2a999f6d6267cf956cb
parent2732e07ad1e54c648c8ca5bc6965af5bf607ba10
net/ena: calculate partial checksum if DF bit is disabled

When TSO is disabled we still have to calculate partial checksum if DF bit
if turned off. This is caused by firmware bug.

First of all, we must make sure that we are dealing with IPV4 packet.
If not, we will just skip further checking of this packet and move to
the next one.

If application will not set m2_len field, we assume we that it was Ethernet
frame because we have to look inside the packet to check for the DF flag.
To make it work properly, PMD is assuming that before sending
packet application called function rte_eth_tx_prepare().

Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Jakub Palider <jpalider@gmail.com>
Acked-by: Jan Medala <jan.medala@outlook.com>
drivers/net/ena/ena_ethdev.c