i40evf: Fix TSO and hw checksums for non-accelerated vlan packets.
i40evf: Fix TSO and hw checksums for non-accelerated vlan packets.

This device claims TSO and checksum support for vlans.  It also
allows a user to control vlan acceleration offloading.  As such,
it is possible to turn off vlan acceleration and configure a vlan
which will continue to support TSO and hw checksums.

In such situation the packet passed down the the device will contain
a vlan header and skb->protocol will be set to ETH_P_8021Q.
The device assumes that skb->protocol contains network protocol
value and uses that value to set up TSO and checksum information.
This results in corrupted frames sent on the wire.

This patch extract the protocol value correctly and corrects TSO
and checksums for non-accelerated traffic.

Fix this by using vlan_get_protocol() helper.

CC: Jeff Kirsher <87e35f5be20bb3e67f4ba6b86f5f6be3085b1b3a@intel.com>
CC: Jesse Brandeburg <e6047e445db6578741afb14ef640164ef6b65e4f@intel.com>
CC: Bruce Allan <9ca9a0356a10eed24a8d9ec38dc19d9cd20ba07b@intel.com>
CC: Carolyn Wyborny <e35dd5c02b168c490ac58c3994dfe3c4e0d9fc66@intel.com>
CC: Don Skidmore <db552506339f77ba9019f0c6d9084f81cf1d1757@intel.com>
CC: Greg Rose <fdff95cc3a51f0ebfc2cd0523e9ef9af6ad07484@intel.com>
CC: Alex Duyck <af56634f9be8457194a3461ec96c497f138af4ff@intel.com>
CC: John Ronciak <93a4f4a4b454e609d2cc85bfaa49283c21159e74@intel.com>
CC: Mitch Williams <acfbed6236bdabd688e979c4a715822951672d73@intel.com>
CC: Linux NICS <30f1c44d86aa994c3fd1b5ab9253322c80c861f9@intel.com>
CC: d413753d4582ef150b9ab8b5e6174ae5c814d0a7@lists.sourceforge.net
Signed-off-by: Vladislav Yasevich <cbd80080413a7dff621bc5de2d3d61903bde20a2@redhat.com>
Signed-off-by: David S. Miller <fe08d3c717adf2ae63592e4c9aec6e3e404d8e3e@davemloft.net>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs