linux_dsm_epyc7002/drivers/net/ethernet/hisilicon/hns
Salil 862b3d2090 net: hns: Fix to conditionally convey RX checksum flag to stack
This patch introduces the RX checksum function to check the
status of the hardware calculated checksum and its error and
appropriately convey status to the upper stack in skb->ip_summed
field.

In hardware, we only support checksum for the following
protocols:
1) IPv4,
2) TCP(over IPv4 or IPv6),
3) UDP(over IPv4 or IPv6),
4) SCTP(over IPv4 or IPv6)
but we support many L3(IPv4, IPv6, MPLS, PPPoE etc) and
L4(TCP, UDP, GRE, SCTP, IGMP, ICMP etc.) protocols.

Hardware limitation:
Our present hardware RX Descriptor lacks L3/L4 checksum
"Status & Error" bit (which usually can be used to indicate whether
checksum was calculated by the hardware and if there was any error
encountered during checksum calculation).

Software workaround:
We do get info within the RX descriptor about the kind of
L3/L4 protocol coming in the packet and the error status. These
errors might not just be checksum errors but could be related to
version, length of IPv4, UDP, TCP etc.
Because there is no-way of knowing if it is a L3/L4 error due
to bad checksum or any other L3/L4 error, we will not (cannot)
convey hardware checksum status(CHECKSUM_UNNECESSARY) for such
cases to upper stack and will not maintain the RX L3/L4 checksum
counters as well.

Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-12-06 11:41:57 -05:00
..
hnae.c net: hns: fix device reference leaks 2016-11-07 13:17:30 -05:00
hnae.h net: hns: Fix to conditionally convey RX checksum flag to stack 2016-12-06 11:41:57 -05:00
hns_ae_adapt.c net: hns: add the support to add/remove the ucast entry to/from table 2016-11-10 11:45:37 -05:00
hns_dsaf_gmac.c net: hns: modify ethtool statistics value error 2016-11-10 11:45:37 -05:00
hns_dsaf_gmac.h
hns_dsaf_mac.c net: hns: add the support to add/remove the ucast entry to/from table 2016-11-10 11:45:37 -05:00
hns_dsaf_mac.h net: hns: add the support to add/remove the ucast entry to/from table 2016-11-10 11:45:37 -05:00
hns_dsaf_main.c net: hns: add the support to add/remove the ucast entry to/from table 2016-11-10 11:45:37 -05:00
hns_dsaf_main.h net: hns: add the support to add/remove the ucast entry to/from table 2016-11-10 11:45:37 -05:00
hns_dsaf_misc.c net: hns: fix to intimate the link-status change by adding LF/RF method 2016-11-10 11:45:37 -05:00
hns_dsaf_misc.h net: hns: Add support of ACPI to HNS driver RoCE Reset function 2016-08-25 10:05:10 -04:00
hns_dsaf_ppe.c net: hns: dereference ppe_cb->ppe_common_cb if it is non-null 2016-08-26 11:44:56 -07:00
hns_dsaf_ppe.h net: hns: separate debug dsaf device from service dsaf device 2016-04-26 01:09:17 -04:00
hns_dsaf_rcb.c net: hns: bug fix about setting coalsecs-usecs to 0 2016-10-03 11:40:57 -04:00
hns_dsaf_rcb.h net: hns: change the default coalesce usecs 2016-06-21 04:51:56 -04:00
hns_dsaf_reg.h net: hns: fix to intimate the link-status change by adding LF/RF method 2016-11-10 11:45:37 -05:00
hns_dsaf_xgmac.c net: hns: fix to intimate the link-status change by adding LF/RF method 2016-11-10 11:45:37 -05:00
hns_dsaf_xgmac.h net: hns: fix to intimate the link-status change by adding LF/RF method 2016-11-10 11:45:37 -05:00
hns_enet.c net: hns: Fix to conditionally convey RX checksum flag to stack 2016-12-06 11:41:57 -05:00
hns_enet.h net: ethernet: hisilicon: hns: use phydev from struct net_device 2016-09-22 02:11:40 -04:00
hns_ethtool.c net: hns: bug fix about restart auto-negotiation 2016-11-10 11:45:37 -05:00
Makefile net: add Hisilicon Network Subsystem basic ethernet support 2015-09-20 21:42:58 -07:00