]> git.baikalelectronics.ru Git - kernel.git/commit
igbvf: Add support for generic Tx checksums
authorAlexander Duyck <aduyck@mirantis.com>
Wed, 13 Jan 2016 15:31:30 +0000 (07:31 -0800)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Wed, 24 Feb 2016 23:42:33 +0000 (15:42 -0800)
commitc655f0a266d3dbd0e171e4748f2f53d57fe5f0b9
tree57e9f09cc08447edea878227fc570a808c16d921
parente52cbc9984a924dee3b23fae6204b7db188ebc67
igbvf: Add support for generic Tx checksums

This patch adds support for generic Tx checksums to the igbvf 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: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/igbvf/netdev.c
drivers/net/ethernet/intel/igbvf/vf.h