linux_dsm_epyc7002/drivers/net/ethernet
Sergei Shtylyov f8e022db50 sh_eth: RX checksum offload support
Add support for the RX checksum offload. This is enabled by default and
may be disabled and re-enabled using 'ethtool':

# ethtool -K eth0 rx off
# ethtool -K eth0 rx on

Some Ether MACs provide a simple checksumming scheme which appears to be
completely compatible with CHECKSUM_COMPLETE: sum of all packet data after
the L2 header is appended to packet data; this may be trivially read by
the driver and used to update the skb accordingly. The same checksumming
scheme is implemented in the EtherAVB MACs and now supported by the 'ravb'
driver.

In terms of performance, throughput is close to gigabit line rate with the
RX checksum offload both enabled and disabled.  The 'perf' output, however,
appears to indicate that significantly less time is spent in do_csum() --
this is as expected.

Test results with RX checksum offload enabled:

~/netperf-2.2pl4# perf record -a ./netperf -t TCP_MAERTS -H 192.168.2.4
TCP MAERTS TEST to 192.168.2.4
Recv   Send    Send
Socket Socket  Message  Elapsed
Size   Size    Size     Time     Throughput
bytes  bytes   bytes    secs.    10^6bits/sec

131072  16384  16384    10.01     933.93
[ perf record: Woken up 8 times to write data ]
[ perf record: Captured and wrote 1.955 MB perf.data (41940 samples) ]
~/netperf-2.2pl4# perf report
Samples: 41K of event 'cycles:ppp', Event count (approx.): 9915302763
Overhead  Command          Shared Object             Symbol
   9.44%  netperf          [kernel.kallsyms]         [k] __arch_copy_to_user
   7.75%  swapper          [kernel.kallsyms]         [k] _raw_spin_unlock_irq
   6.31%  swapper          [kernel.kallsyms]         [k] default_idle_call
   5.89%  swapper          [kernel.kallsyms]         [k] arch_cpu_idle
   4.37%  swapper          [kernel.kallsyms]         [k] tick_nohz_idle_exit
   4.02%  netperf          [kernel.kallsyms]         [k] _raw_spin_unlock_irq
   2.52%  netperf          [kernel.kallsyms]         [k] preempt_count_sub
   1.81%  netperf          [kernel.kallsyms]         [k] tcp_recvmsg
   1.80%  netperf          [kernel.kallsyms]         [k] _raw_spin_unlock_irqres
   1.78%  netperf          [kernel.kallsyms]         [k] preempt_count_add
   1.36%  netperf          [kernel.kallsyms]         [k] __tcp_transmit_skb
   1.20%  netperf          [kernel.kallsyms]         [k] __local_bh_enable_ip
   1.10%  netperf          [kernel.kallsyms]         [k] sh_eth_start_xmit

Test results with RX checksum offload disabled:

~/netperf-2.2pl4# perf record -a ./netperf -t TCP_MAERTS -H 192.168.2.4
TCP MAERTS TEST to 192.168.2.4
Recv   Send    Send
Socket Socket  Message  Elapsed
Size   Size    Size     Time     Throughput
bytes  bytes   bytes    secs.    10^6bits/sec
131072  16384  16384    10.01     932.04
[ perf record: Woken up 14 times to write data ]
[ perf record: Captured and wrote 3.642 MB perf.data (78817 samples) ]
~/netperf-2.2pl4# perf report
Samples: 78K of event 'cycles:ppp', Event count (approx.): 18091442796
Overhead  Command          Shared Object       Symbol
   7.00%  swapper          [kernel.kallsyms]   [k] do_csum
   3.94%  swapper          [kernel.kallsyms]   [k] sh_eth_poll
   3.83%  ksoftirqd/0      [kernel.kallsyms]   [k] do_csum
   3.23%  swapper          [kernel.kallsyms]   [k] _raw_spin_unlock_irq
   2.87%  netperf          [kernel.kallsyms]   [k] __arch_copy_to_user
   2.86%  swapper          [kernel.kallsyms]   [k] arch_cpu_idle
   2.13%  swapper          [kernel.kallsyms]   [k] default_idle_call
   2.12%  ksoftirqd/0      [kernel.kallsyms]   [k] sh_eth_poll
   2.02%  swapper          [kernel.kallsyms]   [k] _raw_spin_unlock_irqrestore
   1.84%  swapper          [kernel.kallsyms]   [k] __softirqentry_text_start
   1.64%  swapper          [kernel.kallsyms]   [k] tick_nohz_idle_exit
   1.53%  netperf          [kernel.kallsyms]   [k] _raw_spin_unlock_irq
   1.32%  netperf          [kernel.kallsyms]   [k] preempt_count_sub
   1.27%  swapper          [kernel.kallsyms]   [k] __pi___inval_dcache_area
   1.22%  swapper          [kernel.kallsyms]   [k] check_preemption_disabled
   1.01%  ksoftirqd/0      [kernel.kallsyms]   [k] _raw_spin_unlock_irqrestore

The above results collected on the R-Car V3H Starter Kit board.

Based on the commit 4d86d38186 ("ravb: RX checksum offload")...

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-02-04 13:31:00 -08:00
..
3com net: 3c509: mark expected switch fall-throughs 2019-01-23 09:06:36 -08:00
8390
adaptec
aeroflex cross-tree: phase out dma_zalloc_coherent() 2019-01-08 07:58:37 -05:00
agere
alacritech cross-tree: phase out dma_zalloc_coherent() 2019-01-08 07:58:37 -05:00
allwinner
alteon net: alteon: replace dev_kfree_skb_irq by dev_consume_skb_irq 2019-01-28 23:09:19 -08:00
altera net: altera_tse: fix msgdma_tx_completion on non-zero fill_level case 2019-01-27 10:39:07 -08:00
amazon cross-tree: phase out dma_zalloc_coherent() 2019-01-08 07:58:37 -05:00
amd Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-01-29 21:18:54 -08:00
apm cross-tree: phase out dma_zalloc_coherent() 2019-01-08 07:58:37 -05:00
apple net: apple: replace dev_kfree_skb_irq by dev_consume_skb_irq for drop profiles 2019-01-28 23:09:19 -08:00
aquantia
arc
atheros atheros: atl2: fix an indentaion issue on a return statement 2019-02-02 20:14:39 -08:00
aurora
broadcom bnxt_en: Add bnxt_en initial port params table and register it 2019-01-29 22:13:09 -08:00
brocade bna: fix indentation issue on call to bfa_ioc_pf_failed 2019-02-02 20:14:38 -08:00
cadence net: macb: Apply RXUBR workaround only to versions with errata 2019-01-29 09:41:04 -08:00
calxeda
cavium liquidio: fix the validation of rx checksum status from NIC hardware 2019-01-28 23:13:37 -08:00
chelsio cxgb4/cxgb4vf: Program hash region for {t4/t4vf}_change_mac() 2019-02-03 11:08:36 -08:00
cirrus
cisco
cortina
davicom davicom: Annotate implicit fall through in dm9000_set_io 2019-01-17 15:08:17 -08:00
dec tulip: eeprom: use struct_size() in kmalloc() 2019-02-01 15:12:29 -08:00
dlink
emulex benet: remove broken and unused macro 2019-01-28 10:56:01 -08:00
ezchip
faraday cross-tree: phase out dma_zalloc_coherent() 2019-01-08 07:58:37 -05:00
freescale enetc: include linux/vmalloc.h for vzalloc etc 2019-01-28 22:43:34 -08:00
fujitsu
hisilicon net: hns3: MAC table entry count function increases operation 0 value protection measures 2019-02-02 08:24:09 -08:00
hp
huawei hinic: Add pci device ids 2019-01-22 14:54:08 -08:00
i825xx net: i825xx: replace dev_kfree_skb_irq by dev_consume_skb_irq for drop profiles 2019-01-28 10:53:28 -08:00
ibm ibmveth: Do not process frames after calling napi_reschedule 2019-01-24 22:48:15 -08:00
intel i40e: clean up several indentation issues 2019-01-22 08:42:03 -08:00
marvell Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-01-16 05:13:36 +12:00
mediatek net: ethernet: mediatek: support MT7621 SoC ethernet hardware 2019-01-30 14:26:07 -08:00
mellanox net: devlink: report cell size of shared buffers 2019-02-03 11:25:34 -08:00
micrel
microchip lan743x: Provide Read/Write Access to on chip OTP 2019-01-26 09:35:21 -08:00
moxa
mscc net: Add extack argument to ndo_fdb_add() 2019-01-17 15:18:47 -08:00
myricom cross-tree: phase out dma_zalloc_coherent() 2019-01-08 07:58:37 -05:00
natsemi
neterion net: vxge: fix indentation issue 2019-01-18 14:02:32 -08:00
netronome net: devlink: report cell size of shared buffers 2019-02-03 11:25:34 -08:00
ni net: nixge: Separate ctrl and dma resources 2019-02-02 20:09:22 -08:00
nuvoton w90p910_ether: remove incorrect __init annotation 2018-12-14 14:42:51 -08:00
nvidia
nxp
oki-semi cross-tree: phase out dma_zalloc_coherent() 2019-01-08 07:58:37 -05:00
packetengines
pasemi cross-tree: phase out dma_zalloc_coherent() 2019-01-08 07:58:37 -05:00
qlogic Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-01-29 21:18:54 -08:00
qualcomm cross-tree: phase out dma_zalloc_coherent() 2019-01-08 07:58:37 -05:00
rdc
realtek r8169: remove rtl_wol_pll_power_down 2019-02-02 19:45:36 -08:00
renesas sh_eth: RX checksum offload support 2019-02-04 13:31:00 -08:00
rocker switchdev: Add extack argument to call_switchdev_notifiers() 2019-01-17 15:18:47 -08:00
samsung cross-tree: phase out dma_zalloc_coherent() 2019-01-08 07:58:37 -05:00
seeq
sfc Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-01-27 10:43:17 -08:00
sgi cross-tree: phase out dma_zalloc_coherent() 2019-01-08 07:58:37 -05:00
silan
sis
smsc Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2018-12-27 13:04:52 -08:00
socionext cross-tree: phase out dma_zalloc_coherent() 2019-01-08 07:58:37 -05:00
stmicro Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-01-29 21:18:54 -08:00
sun Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-01-27 10:43:17 -08:00
synopsys
tehuti
ti Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-01-29 21:18:54 -08:00
toshiba
tundra cross-tree: phase out dma_zalloc_coherent() 2019-01-08 07:58:37 -05:00
via
wiznet
xilinx cross-tree: phase out dma_zalloc_coherent() 2019-01-08 07:58:37 -05:00
xircom
xscale
dnet.c
dnet.h
ec_bhf.c
ethoc.c
fealnx.c
jme.c net: jme: fix indentation issues 2019-01-18 14:02:55 -08:00
jme.h
Kconfig
korina.c
lantiq_etop.c
lantiq_xrx200.c
Makefile
netx-eth.c