diff options
author | Gatis Peisenieks <gatis@mikrotik.com> | 2021-05-13 14:43:25 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-05-14 01:48:10 +0300 |
commit | b0390009502b0c635f9ddc26a16025268f6c6211 (patch) | |
tree | 08d7790392ba8595228699e1c5e65caddccc1e17 /drivers/net/ethernet/atheros/atl1c/atl1c_main.c | |
parent | 545fa3fb1e84855820a5ed25053d6a5afbd30900 (diff) | |
download | linux-b0390009502b0c635f9ddc26a16025268f6c6211.tar.xz |
atl1c: enable rx csum offload on Mikrotik 10/25G NIC
Mikrotik 10/25G NIC supports hw checksum verification on rx for
IP/IPv6 + TCP/UDP packets. HW checksum offload helps reduce host
cpu load.
This enables the csum offload specifically for Mikrotik 10/25G NIC
as other HW supported by the driver is known to have problems with it.
TCP iperf3 to Threadripper 3960X with NIC improved 16.5 -> 20.0 Gbps
with mtu=1500.
Signed-off-by: Gatis Peisenieks <gatis@mikrotik.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/atheros/atl1c/atl1c_main.c')
-rw-r--r-- | drivers/net/ethernet/atheros/atl1c/atl1c_main.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c index dbafd8118a86..9693da5028cf 100644 --- a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c +++ b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c @@ -1671,6 +1671,11 @@ static irqreturn_t atl1c_intr(int irq, void *data) static inline void atl1c_rx_checksum(struct atl1c_adapter *adapter, struct sk_buff *skb, struct atl1c_recv_ret_status *prrs) { + if (adapter->hw.nic_type == athr_mt) { + if (prrs->word3 & RRS_MT_PROT_ID_TCPUDP) + skb->ip_summed = CHECKSUM_UNNECESSARY; + return; + } /* * The pid field in RRS in not correct sometimes, so we * cannot figure out if the packet is fragmented or not, |