linux_dsm_epyc7002/drivers/net/ethernet
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
..
3com
8390 SPDX update for 5.2-rc6 2019-06-21 09:58:42 -07:00
adaptec
aeroflex
agere
alacritech treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 235 2019-06-19 17:09:07 +02:00
allwinner Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-07-08 19:48:57 -07:00
alteon
altera
amazon Revert "net: ena: ethtool: add extra properties retrieval via get_priv_flags" 2019-06-26 09:07:39 -07:00
amd treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
apm
apple
aquantia Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-06-27 21:06:39 -07:00
arc treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
atheros ag71xx: fix return value check in ag71xx_probe() 2019-07-18 20:33:48 -07:00
aurora
broadcom bnxt_en: Fix VNIC accounting when enabling aRFS on 57500 chips. 2019-07-18 16:33:27 -07:00
brocade
cadence Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-07-08 19:48:57 -07:00
calxeda net/ethernet: using dev_get_drvdata directly 2019-07-05 15:25:04 -07:00
cavium liquidio: Replace vmalloc + memset with vzalloc 2019-07-18 11:54:29 -07:00
chelsio ethernet: remove redundant memset 2019-07-15 11:06:27 -07:00
cirrus
cisco
cortina
davicom
dec
dlink
emulex be2net: Signal that the device cannot transmit during reconfiguration 2019-07-16 12:41:37 -07:00
ezchip
faraday
freescale ethernet: remove redundant memset 2019-07-15 11:06:27 -07:00
fujitsu
google gve: replace kfree with kvfree 2019-07-18 16:31:27 -07:00
hisilicon Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-07-13 15:57:37 -07:00
hp
huawei hinic: add fw version query 2019-07-07 22:15:12 -07:00
i825xx treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
ibm
intel docs: driver-model: move it to the driver-api book 2019-07-15 11:03:02 -03:00
marvell ethernet: remove redundant memset 2019-07-15 11:06:27 -07:00
mediatek net: ethernet: mediatek: mtk_eth_soc: Add of_node_put() before goto 2019-07-16 12:38:37 -07:00
mellanox net/mlx5e: Prevent encap flow counter update async to user query 2019-07-25 13:31:00 -07:00
micrel treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
microchip treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
moxa
mscc net: ethernet: mscc: ocelot_board: Add of_node_put() before return 2019-07-16 12:38:17 -07:00
myricom
natsemi
neterion ethernet: remove redundant memset 2019-07-15 11:06:27 -07:00
netronome nfp: flower: ensure ip protocol is specified for L4 matches 2019-07-12 15:31:55 -07:00
ni net: nixge: Fix misuse of strlcpy 2019-07-07 19:23:05 -07:00
nuvoton
nvidia
nxp
oki-semi
packetengines
pasemi net: pasemi: fix an use-after-free in pasemi_mac_phy_init() 2019-07-08 16:33:02 -07:00
qlogic ethernet: remove redundant memset 2019-07-15 11:06:27 -07:00
qualcomm
rdc
realtek r8169: fix issue with confused RX unit after PHY power-down on RTL8411b 2019-07-13 19:25:53 -07:00
renesas
rocker
samsung treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
seeq treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
sfc sfc: Remove 'PCIE error reporting unavailable' 2019-07-08 12:16:48 -07:00
sgi
silan
sis sis900: correct a few typos 2019-07-14 12:22:11 -07:00
smsc
socionext net: netsec: remove static declaration for netsec_set_tx_de() 2019-07-09 14:46:40 -07:00
stmicro net: stmmac: Fix misuses of GENMASK macro 2019-07-11 14:30:07 -07:00
sun net: ethernet: sun: remove redundant assignment to variable err 2019-07-04 12:12:13 -07:00
synopsys
tehuti
ti net: ethernet: ti: cpsw: Add of_node_put() before return and break 2019-07-16 12:37:30 -07:00
toshiba Driver Core and debugfs changes for 5.3-rc1 2019-07-12 12:24:03 -07:00
tundra
via
wiznet
xilinx net: axienet: fix a potential double free in axienet_probe() 2019-07-08 16:28:32 -07:00
xircom
xscale
dnet.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
dnet.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
ec_bhf.c
ethoc.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
fealnx.c
jme.c ethernet: remove redundant memset 2019-07-15 11:06:27 -07:00
jme.h
Kconfig gve: Add basic driver framework for Compute Engine Virtual NIC 2019-07-01 19:36:35 -07:00
korina.c
lantiq_etop.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 234 2019-06-19 17:09:07 +02:00
lantiq_xrx200.c
Makefile gve: Add basic driver framework for Compute Engine Virtual NIC 2019-07-01 19:36:35 -07:00
netx-eth.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 234 2019-06-19 17:09:07 +02:00