android_kernel_xiaomi_sm8450/drivers/net
Joel Stanley 828309eee5 net: ftgmac100: Disable hardware checksum on AST2600
[ Upstream commit 6fd45e79e8b93b8d22fb8fe22c32fbad7e9190bd ]

The AST2600 when using the i210 NIC over NC-SI has been observed to
produce incorrect checksum results with specific MTU values. This was
first observed when sending data across a long distance set of networks.

On a local network, the following test was performed using a 1MB file of
random data.

On the receiver run this script:

 #!/bin/bash
 while [ 1 ]; do
        # Zero the stats
        nstat -r  > /dev/null
        nc -l 9899 > test-file
        # Check for checksum errors
        TcpInCsumErrors=$(nstat | grep TcpInCsumErrors)
        if [ -z "$TcpInCsumErrors" ]; then
                echo No TcpInCsumErrors
        else
                echo TcpInCsumErrors = $TcpInCsumErrors
        fi
 done

On an AST2600 system:

 # nc <IP of  receiver host> 9899 < test-file

The test was repeated with various MTU values:

 # ip link set mtu 1410 dev eth0

The observed results:

 1500 - good
 1434 - bad
 1400 - good
 1410 - bad
 1420 - good

The test was repeated after disabling tx checksumming:

 # ethtool -K eth0 tx-checksumming off

And all MTU values tested resulted in transfers without error.

An issue with the driver cannot be ruled out, however there has been no
bug discovered so far.

David has done the work to take the original bug report of slow data
transfer between long distance connections and triaged it down to this
test case.

The vendor suspects this this is a hardware issue when using NC-SI. The
fixes line refers to the patch that introduced AST2600 support.

Reported-by: David Wilder <wilder@us.ibm.com>
Reviewed-by: Dylan Hung <dylan_hung@aspeedtech.com>
Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-06-06 08:42:40 +02:00
..
appletalk net: appletalk: cops: Fix data race in cops_probe1 2021-06-16 12:01:37 +02:00
arcnet net: arcnet: com20020: Fix null-ptr-deref in com20020pci_probe() 2022-03-08 19:09:35 +01:00
bonding bonding: fix data-races around agg_select_timer 2022-02-23 12:01:02 +01:00
caif net: caif: fix memory leak in ldisc_open 2021-06-30 08:47:21 -04:00
can can: grcan: only use the NAPI poll budget for RX 2022-05-12 12:25:36 +02:00
dsa net: dsa: bcm_sf2: Fix Wake-on-LAN with mac_link_down() 2022-05-18 10:23:44 +02:00
ethernet net: ftgmac100: Disable hardware checksum on AST2600 2022-06-06 08:42:40 +02:00
fddi net: fddi: fix UAF in fza_probe 2021-07-25 14:36:20 +02:00
fjes fjes: Check for error irq 2021-12-29 12:25:57 +01:00
hamradio hamradio: remove needs_free_netdev to avoid UAF 2022-04-20 09:23:09 +02:00
hippi drivers: net: hippi: Fix deadlock in rr_close() 2022-05-09 09:05:06 +02:00
hyperv hv_netvsc: Add check for kvmalloc_array 2022-03-23 09:13:28 +01:00
ieee802154 net: ieee802154: ca8210: Fix lifs/sifs periods 2022-02-23 12:01:02 +01:00
ipa net: ipa: record proper RX transaction count 2022-05-25 09:17:57 +02:00
ipvlan
mdio net: mdio: Alphabetically sort header inclusion 2022-04-20 09:23:12 +02:00
netdevsim netdevsim: Zero-initialize memory for new map's value in function nsim_bpf_map_alloc 2021-12-22 09:30:55 +01:00
pcs
phy net: phy: Fix race condition on link status change 2022-05-18 10:23:48 +02:00
plip
ppp ppp: ensure minimum packet size in ppp_write() 2022-01-27 10:54:01 +01:00
slip drivers: net: slip: fix NPD bug in sl_tx_timeout() 2022-04-20 09:23:24 +02:00
team team: protect features update by RCU to avoid deadlock 2021-02-03 23:28:51 +01:00
usb net: usb: aqc111: Fix out-of-bounds accesses in RX fixup 2022-04-20 09:23:23 +02:00
vmxnet3 net: vmxnet3: fix possible NULL pointer dereference in vmxnet3_rq_cleanup() 2022-05-25 09:17:58 +02:00
wan net: lapbether: Prevent racing when checking whether the netif is running 2021-05-14 09:50:29 +02:00
wimax staging: wimax/i2400m: fix byte-order issue 2021-05-11 14:47:16 +02:00
wireguard lib/crypto: blake2s: move hmac construction into wireguard 2022-05-30 09:33:26 +02:00
wireless mac80211_hwsim: call ieee80211_tx_prepare_skb under RCU protection 2022-05-18 10:23:43 +02:00
xen-netback Revert "xen-netback: Check for hotplug-status existence before watching" 2022-03-16 14:16:00 +01:00
bareudp.c bareudp: use ipv6_mod_enabled to check if IPv6 enabled 2022-04-08 14:40:22 +02:00
dummy.c
eql.c
geneve.c net: geneve: modify IP header check in geneve6_xmit_skb and geneve_xmit_skb 2021-05-14 09:50:43 +02:00
gtp.c net: icmp: pass zeroed opts from icmp{,v6}_ndo_send before sending 2021-03-04 11:38:46 +01:00
ifb.c ifb: fix building without CONFIG_NET_CLS_ACT 2021-11-18 14:03:49 +01:00
Kconfig lib/crypto: blake2s: include as built-in 2022-05-30 09:33:26 +02:00
LICENSE.SRC
loopback.c
macsec.c net: macsec: Verify that send_sci is on when setting Tx sci explicitly 2022-02-08 18:30:38 +01:00
macvlan.c
macvtap.c macvtap: advertise link netns via netlink 2022-04-13 21:00:59 +02:00
Makefile
mdio.c
mii.c
net_failover.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
Space.c
sungem_phy.c
tap.c tuntap: add sanity checks about msg_controllen in sendmsg 2022-04-13 21:00:59 +02:00
thunderbolt.c
tun.c tuntap: add sanity checks about msg_controllen in sendmsg 2022-04-13 21:00:59 +02:00
veth.c veth: Ensure eth header is in skb's linear part 2022-04-20 09:23:11 +02:00
virtio_net.c virtio-net: use NETIF_F_GRO_HW instead of NETIF_F_LRO 2021-08-26 08:35:48 -04:00
vrf.c vrf: don't run conntrack on vrf with !dflt qdisc 2021-12-14 11:32:36 +01:00
vsockmon.c
vxlan.c vxlan: fix error return code in vxlan_fdb_append 2022-04-27 13:53:53 +02:00
xen-netfront.c xen/netfront: react properly to failing gnttab_end_foreign_access_ref() 2022-03-11 12:11:55 +01:00