]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
ixgbevf: Add support for generic Tx checksums
authorAlexander Duyck <aduyck@mirantis.com>
Wed, 13 Jan 2016 15:31:17 +0000 (07:31 -0800)
committerTim Gardner <tim.gardner@canonical.com>
Fri, 16 Sep 2016 17:08:45 +0000 (11:08 -0600)
commit308fa9bded982719127d9e7acf468cfe41c2b05b
tree8c2071da6df8ef65fcb8cf957e72aad37720a4f0
parentc7463e6ed8e618eef3dd2c8ffbead0ac862d6975
ixgbevf: Add support for generic Tx checksums

BugLink: http://bugs.launchpad.net/bugs/1616677
This patch adds support for generic Tx checksums to the ixgbevf driver.  It
turns out this is actually pretty easy after going over the datasheet as we
were doing a number of steps we didn't need to.

In order to perform a Tx checksum for an L4 header we need to fill in the
following fields in the Tx descriptor:
  MACLEN (maximum of 127), retrieved from:
skb_network_offset()
  IPLEN  (maximum of 511), retrieved from:
skb_checksum_start_offset() - skb_network_offset()
  TUCMD.L4T indicates offset and if checksum or crc32c, based on:
skb->csum_offset

The added advantage to doing this is that we can support inner checksum
offloads for tunnels and MPLS while still being able to transparently
insert VLAN tags.

I also took the opportunity to clean-up many of the feature flag
configuration bits to make them a bit more consistent between drivers.  In
the case of the VF drivers this meant adding support for SCTP CRCs, and
inner checksum offloads for MPLS and various tunnel types.

Signed-off-by: Alexander Duyck <aduyck@mirantis.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
(cherry picked from commit cb2b3edbece804d9836647c1ca51282ad384d425)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Acked-by: Brad Figg <brad.figg@canonical.com>
Acked-by: Kamal Mostafa <kamal@canonical.com>
drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c