linux_dsm_epyc7002/drivers/net
Ariel Levkovich 90bb769291 net/mlx5e: Prevent encap flow counter update async to user query
This patch prevents a race between user invoked cached counters
query and a neighbor last usage updater.

The cached flow counter stats can be queried by calling
"mlx5_fc_query_cached" which provides the number of bytes and
packets that passed via this flow since the last time this counter
was queried.
It does so by reducting the last saved stats from the current, cached
stats and then updating the last saved stats with the cached stats.
It also provide the lastuse value for that flow.

Since "mlx5e_tc_update_neigh_used_value" needs to retrieve the
last usage time of encapsulation flows, it calls the flow counter
query method periodically and async to user queries of the flow counter
using cls_flower.
This call is causing the driver to update the last reported bytes and
packets from the cache and therefore, future user queries of the flow
stats will return lower than expected number for bytes and packets
since the last saved stats in the driver was updated async to the last
saved stats in cls_flower.

This causes wrong stats presentation of encapsulation flows to user.

Since the neighbor usage updater only needs the lastuse stats from the
cached counter, the fix is to use a dedicated lastuse query call that
returns the lastuse value without synching between the cached stats and
the last saved stats.

Fixes: f6dfb4c3f2 ("net/mlx5e: Update neighbour 'used' state using HW flow rules counters")
Signed-off-by: Ariel Levkovich <lariel@mellanox.com>
Reviewed-by: Roi Dayan <roid@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
2019-07-25 13:31:00 -07:00
..
appletalk
arcnet
bonding Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-07-08 19:48:57 -07:00
caif caif-hsi: fix possible deadlock in cfhsi_exit_module() 2019-07-17 11:58:56 -07:00
can net/can: using dev_get_drvdata directly 2019-07-05 15:24:41 -07:00
dsa net: dsa: qca8k: replace legacy gpio include 2019-07-12 15:38:07 -07:00
ethernet net/mlx5e: Prevent encap flow counter update async to user query 2019-07-25 13:31:00 -07:00
fddi The main MIPS changes for a pretty light v5.3 cycle, including: 2019-07-17 09:42:03 -07:00
fjes fjes: no need to check return value of debugfs_create functions 2019-06-22 16:43:08 -07:00
hamradio
hippi hippi: Remove call to memset after pci_alloc_consistent 2019-07-15 11:06:27 -07:00
hyperv hv_netvsc: Set probe mode to sync 2019-06-14 19:47:05 -07:00
ieee802154
ipvlan
netdevsim drivers: net: use flow block API 2019-07-09 14:38:50 -07:00
phy net: phy: make exported variables non-static 2019-07-12 15:26:29 -07:00
plip
ppp ppp: mppe: Revert "ppp: mppe: Add softdep to arc4" 2019-07-12 22:58:49 -07:00
slip
team Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-06-27 21:06:39 -07:00
usb usb: qmi_wwan: add D-Link DWM-222 A2 device ID 2019-07-18 16:34:33 -07:00
vmxnet3 vmxnet3: Remove call to memset after dma_alloc_coherent 2019-07-15 11:06:27 -07:00
wan Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-06-17 20:20:36 -07:00
wimax
wireless Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-07-19 10:06:06 -07:00
xen-netback
dummy.c
eql.c
geneve.c SPDX update for 5.2-rc6 2019-06-21 09:58:42 -07:00
gtp.c gtp: add missing gtp_encap_disable_sock() in gtp_encap_enable() 2019-07-07 18:42:48 -07:00
ifb.c
Kconfig
LICENSE.SRC
loopback.c loopback: fix lockdep splat 2019-07-03 11:24:38 -07:00
macsec.c macsec: fix checksumming after decryption 2019-07-02 14:12:29 -07:00
macvlan.c
macvtap.c
Makefile
mdio.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
mii.c
net_failover.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
Space.c
sungem_phy.c
tap.c coallocate socket_wq with socket itself 2019-07-08 19:25:19 -07:00
thunderbolt.c
tun.c coallocate socket_wq with socket itself 2019-07-08 19:25:19 -07:00
veth.c veth: Support bulk XDP_TX 2019-06-25 14:26:54 +02:00
virtio_net.c virtio_net: enable napi_tx by default 2019-06-14 19:34:27 -07:00
vrf.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-06-27 21:06:39 -07:00
vsockmon.c
vxlan.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-07-08 19:48:57 -07:00
xen-netfront.c