]> git.baikalelectronics.ru Git - kernel.git/commit
sfc: process RX event inner checksum flags
authorJon Cooper <jcooper@solarflare.com>
Wed, 8 Feb 2017 16:50:40 +0000 (16:50 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 9 Feb 2017 21:47:53 +0000 (16:47 -0500)
commit8a1700bcc62c90ea4e07e449ed9c596d4bf94604
tree73becaf6025a2abe25fb9978b75131ea72bd5c26
parent1a0666e837d7879e4b6d9449b8364f147b9dc8cc
sfc: process RX event inner checksum flags

Add support for RX checksum offload of encapsulated packets. This
 essentially just means paying attention to the inner checksum flags
 in the RX event, and if *either* checksum flag indicates a fail then
 don't tell the kernel that checksum offload was successful.
Also, count these checksum errors and export the counts to ethtool -S.

Test the most common "good" case of RX events with a single bitmask
 instead of a series of ifs.  Move the more specific error checking
 in to a separate function for clarity, and don't use unlikely() there
 since we know at least one of the bits is bad.

Signed-off-by: Edward Cree <ecree@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/sfc/bitfield.h
drivers/net/ethernet/sfc/ef10.c
drivers/net/ethernet/sfc/ethtool.c
drivers/net/ethernet/sfc/net_driver.h