OpenCloudOS-Kernel/drivers/net/ethernet/mellanox/mlx4
Kevin(Yudong) Yang 00ff801bb8 net/mlx4_en: update moderation when config reset
This patch fixes a bug that the moderation config will not be
applied when calling mlx4_en_reset_config. For example, when
turning on rx timestamping, mlx4_en_reset_config() will be called,
causing the NIC to forget previous moderation config.

This fix is in phase with a previous fix:
commit 79c54b6bbf ("net/mlx4_en: Fix TX moderation info loss
after set_ringparam is called")

Tested: Before this patch, on a host with NIC using mlx4, run
netserver and stream TCP to the host at full utilization.
$ sar -I SUM 1
                 INTR    intr/s
14:03:56          sum  48758.00

After rx hwtstamp is enabled:
$ sar -I SUM 1
14:10:38          sum 317771.00
We see the moderation is not working properly and issued 7x more
interrupts.

After the patch, and turned on rx hwtstamp, the rate of interrupts
is as expected:
$ sar -I SUM 1
14:52:11          sum  49332.00

Fixes: 79c54b6bbf ("net/mlx4_en: Fix TX moderation info loss after set_ringparam is called")
Signed-off-by: Kevin(Yudong) Yang <yyd@google.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Neal Cardwell <ncardwell@google.com>
CC: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-03-05 12:42:31 -08:00
..
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile
alloc.c mellanox: Switch to bitmap_zalloc() 2019-03-04 10:19:33 -08:00
catas.c mlx4: Split restart_one into two functions 2019-09-13 22:11:14 +02:00
cmd.c drivers: Remove explicit invocations of mmiowb() 2019-04-08 12:01:02 +01:00
cq.c net/mlx4: simplify the return expression of mlx4_init_cq_table() 2020-12-09 19:20:46 -08:00
crdump.c net/mlx4_core: Add missing iounmap() in error path 2020-04-25 20:43:56 -07:00
en_clock.c
en_cq.c net/mlx4: Use effective interrupt affinity 2020-12-15 16:19:33 +01:00
en_dcb_nl.c
en_ethtool.c net/mlx4_en: update moderation when config reset 2021-03-05 12:42:31 -08:00
en_main.c
en_netdev.c net/mlx4_en: update moderation when config reset 2021-03-05 12:42:31 -08:00
en_port.c
en_port.h
en_resources.c
en_rx.c net, xdp: Introduce xdp_prepare_buff utility routine 2021-01-08 13:39:24 -08:00
en_selftest.c
en_tx.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-12-11 22:29:38 -08:00
eq.c net: mlx: convert tasklets to use new tasklet_setup() API 2020-09-14 13:02:37 -07:00
fw.c net/mlx4_core: Fix init_hca fields offset 2020-11-18 17:46:20 -08:00
fw.h net/mlx4_core: Fix init_hca fields offset 2020-11-18 17:46:20 -08:00
fw_qos.c
fw_qos.h net/mlx4: Cleanup kernel-doc warnings 2020-11-05 12:09:30 -08:00
icm.c net/mlx4: replace pci_{,un}map_sg with dma_{,un}map_sg 2019-01-07 05:14:17 -08:00
icm.h net/mlx4: Get rid of page operation after dma_alloc_coherent 2019-01-07 05:14:17 -08:00
intf.c
main.c devlink: Add devlink reload limit option 2020-10-09 12:06:52 -07:00
mcg.c net/mlx4: Use fallthrough pseudo-keyword 2020-07-27 13:14:10 -07:00
mlx4.h net: mlx: convert tasklets to use new tasklet_setup() API 2020-09-14 13:02:37 -07:00
mlx4_en.h net/mlx4_en: update moderation when config reset 2021-03-05 12:42:31 -08:00
mlx4_stats.h net/mlx4_en: Remove unused performance counters 2020-11-20 10:59:39 -08:00
mr.c net: ethernet: mlx4: Fix memory allocation in mlx4_buddy_init() 2020-09-01 13:13:15 -07:00
pd.c
port.c net/mlx4_en: ethtool, Remove unsupported SFP EEPROM high pages query 2019-05-20 11:33:57 -07:00
profile.c
qp.c
reset.c
resource_tracker.c net/mlx4_core: Add missed mlx4_free_cmd_mailbox() 2021-02-22 19:08:33 -08:00
sense.c
srq.c net/mlx4: simplify the return expression of mlx4_init_srq_table() 2020-12-10 13:00:51 -08:00