linux-uconsole/drivers
Ariel Levkovich 0ccf47265e net/mlx5e: Prevent encap flow counter update async to user query
[ Upstream commit 90bb769291 ]

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-09 17:52:33 +02:00
..
accessibility
acpi ACPI: blacklist: fix clang warning for unused DMI table 2019-08-06 19:06:50 +02:00
amba
android binder: fix possible UAF when freeing buffer 2019-08-04 09:30:53 +02:00
ata libata: don't request sense data on !ZAC ATA devices 2019-07-26 09:14:12 +02:00
atm atm: iphase: Fix Spectre v1 vulnerability 2019-08-09 17:52:29 +02:00
auxdisplay auxdisplay: hd44780: Fix memory leak on ->remove() 2019-04-20 09:15:55 +02:00
base drivers/base: Introduce kill_device() 2019-08-09 17:52:28 +02:00
bcma
block nbd: replace kill_bdev() with __invalidate_device() again 2019-08-06 19:06:55 +02:00
bluetooth Bluetooth: hci_uart: check for missing tty operations 2019-08-04 09:30:55 +02:00
bus
cdrom cdrom: Fix race condition in cdrom_sysctl_register 2019-04-05 22:33:10 +02:00
char hpet: Fix division by zero in hpet_time_div() 2019-07-31 07:27:10 +02:00
clk clk: sprd: Add check for return value of sprd_clk_regmap_init() 2019-08-06 19:06:49 +02:00
clocksource clocksource/drivers/exynos_mct: Increase priority over ARM arch timer 2019-07-26 09:14:12 +02:00
connector connector: fix unsafe usage of ->real_parent 2019-03-19 13:12:38 +01:00
cpufreq cpufreq: kirkwood: fix possible object reference leak 2019-05-31 06:46:24 -07:00
cpuidle
crypto crypto: caam - limit output IV to CBC to work around CTR mode DMA issue 2019-07-26 09:14:29 +02:00
dax mm/huge_memory: fix vmf_insert_pfn_{pmd, pud}() crash, handle unaligned addresses 2019-05-22 07:37:40 +02:00
dca
devfreq
dio
dma dmaengine: rcar-dmac: Reject zero-length slave DMA requests 2019-08-06 19:06:48 +02:00
dma-buf dma-buf: Discard old fence_excl on retrying get_fences_rcu for realloc 2019-07-28 08:29:28 +02:00
edac EDAC: Fix global-out-of-bounds write when setting edac_mc_poll_msec 2019-07-26 09:14:13 +02:00
eisa
extcon extcon: arizona: Disable mic detect if running when driver is removed 2019-05-31 06:46:23 -07:00
firewire
firmware firmware/psci: psci_checker: Park kthreads before stopping them 2019-08-06 19:06:48 +02:00
fmc
fpga fpga-manager: altera-ps-spi: Fix build error 2019-07-31 07:27:10 +02:00
fsi
gnss gnss: sirf: fix premature wakeup interrupt enable 2019-03-10 07:17:21 +01:00
gpio gpiolib: fix incorrect IRQ requesting of an active-low lineevent 2019-08-06 19:06:54 +02:00
gpu drm/i915/gvt: fix incorrect cache entry for guest page mapping 2019-08-06 19:06:56 +02:00
hid HID: Add quirk for HP X1200 PIXART OEM mouse 2019-08-09 17:52:29 +02:00
hsi
hv Drivers: hv: vmbus: Remove the undesired put_cpu_ptr() in hv_synic_cleanup() 2019-05-10 17:54:04 +02:00
hwmon hwmon: (pmbus/core) Treat parameters as paged if on multiple pages 2019-06-25 11:35:59 +08:00
hwspinlock
hwtracing intel_th: msu: Fix single mode with disabled IOMMU 2019-07-26 09:14:30 +02:00
i2c gcc-9: don't warn about uninitialized variable 2019-08-09 17:52:27 +02:00
ide
idle x86/cpu: Sanitize FAM6_ATOM naming 2019-05-14 19:17:53 +02:00
iio iio: adc: stm32-dfsdm: missing error case during probe 2019-07-31 07:26:56 +02:00
infiniband IB: directly cast the sockaddr union to aockaddr 2019-08-09 17:52:29 +02:00
input Input: alps - fix a mismatch between a condition check and its comment 2019-07-26 09:14:22 +02:00
iommu iommu/vt-d: Don't queue_iova() if there is no flush queue 2019-08-04 09:30:54 +02:00
ipack
irqchip irqchip/meson-gpio: Add support for Meson-G12A SoC 2019-07-26 09:14:06 +02:00
isdn ISDN: hfcsusb: checking idx of ep configuration 2019-08-04 09:30:53 +02:00
leds leds: trigger: netdev: use memcpy in device_name_store 2019-05-04 09:20:22 +02:00
lightnvm lightnvm: pblk: fix freeing of merged pages 2019-07-26 09:14:09 +02:00
macintosh
mailbox mailbox: handle failed named mailbox channel request 2019-07-31 07:27:07 +02:00
mcb
md dm bufio: fix deadlock with loop device 2019-07-26 09:14:31 +02:00
media media: radio-raremono: change devm_k*alloc to k*alloc 2019-08-04 09:30:54 +02:00
memory memory: tegra: Fix integer overflow on tick value calculation 2019-05-25 18:23:32 +02:00
memstick memstick: Fix error cleanup path of memstick_init 2019-07-31 07:26:59 +02:00
message
mfd mfd: hi655x-pmic: Fix missing return value check for devm_regmap_init_mmio_clk 2019-07-31 07:27:03 +02:00
misc eeprom: at24: make spd world-readable again 2019-08-06 19:06:57 +02:00
mmc mmc: meson-mx-sdio: Fix misuse of GENMASK macro 2019-08-06 19:06:54 +02:00
mtd mtd: rawnand: micron: handle on-die "ECC-off" devices correctly 2019-08-06 19:06:54 +02:00
mux
net net/mlx5e: Prevent encap flow counter update async to user query 2019-08-09 17:52:33 +02:00
nfc NFC: nfcmrvl: fix gpio-handling regression 2019-08-09 17:52:33 +02:00
ntb
nubus
nvdimm libnvdimm/bus: Fix wait_nvdimm_bus_probe_idle() ABBA deadlock 2019-08-09 17:52:28 +02:00
nvme nvme-pci: set the errno on ctrl state change error 2019-07-26 09:14:09 +02:00
nvmem nvmem: sunxi_sid: Support SID on A83T and H5 2019-06-15 11:54:07 +02:00
of of: overlay: set node fields from properties when add new overlay node 2019-06-09 09:17:24 +02:00
opp
oprofile
parisc parisc: Use implicit space register selection for loading the coherence index of I/O pdirs 2019-06-11 12:20:51 +02:00
parport parport: Fix mem leak in parport_register_dev_model 2019-06-25 11:35:55 +08:00
pci PCI: dwc: pci-dra7xx: Fix compilation when !CONFIG_GPIOLIB 2019-07-31 07:27:07 +02:00
pcmcia
perf drivers/perf: arm_pmu: Fix failure path in PM notifier 2019-08-06 19:06:55 +02:00
phy phy: renesas: rcar-gen2: Fix memory leak at error paths 2019-07-31 07:27:00 +02:00
pinctrl pinctrl: rockchip: fix leaked of_node references 2019-07-31 07:26:57 +02:00
platform platform/mellanox: mlxreg-hotplug: Add devm_free_irq call to remove flow 2019-07-10 09:53:38 +02:00
pnp
power power: supply: max14656: fix potential use-before-alloc 2019-06-15 11:54:09 +02:00
powercap x86/cpu: Sanitize FAM6_ATOM naming 2019-05-14 19:17:53 +02:00
pps drivers/pps/pps.c: clear offset flags in PPS_SETPARAMS ioctl 2019-08-04 09:30:56 +02:00
ps3
ptp
pwm pwm: Fix deadlock warning when removing PWM device 2019-06-15 11:54:10 +02:00
rapidio drivers/rapidio/devices/rio_mport_cdev.c: NUL terminate some strings 2019-08-06 19:06:52 +02:00
ras RAS/CEC: Fix pfn insertion 2019-07-26 09:14:05 +02:00
regulator regulator: s2mps11: Fix buck7 and buck8 wrong voltages 2019-07-26 09:14:22 +02:00
remoteproc
reset reset: meson-audio-arb: Fix missing .owner setting of reset_controller_dev 2019-05-08 07:21:47 +02:00
rpmsg
rtc rtc: pcf8523: don't return invalid date when battery is low 2019-06-19 08:18:07 +02:00
s390 s390/dasd: fix endless loop after read unit address configuration 2019-08-06 19:06:55 +02:00
sbus
scsi scsi: fcoe: Embed fc_rport_priv in fcoe_rport structure 2019-08-09 17:52:27 +02:00
sfi
sh
siox
slimbus slimbus: fix a potential NULL pointer dereference in of_qcom_slim_ngd_register 2019-05-31 06:46:14 -07:00
sn
soc soc: bcm: brcmstb: biuctrl: Register writes require a barrier 2019-07-14 08:11:03 +02:00
soundwire soundwire: intel: set dai min and max channels correctly 2019-07-14 08:11:07 +02:00
spi spi: bitbang: Fix NULL pointer dereference in spi_unregister_master 2019-07-10 09:53:32 +02:00
spmi
ssb ssb: Fix possible NULL pointer dereference in ssb_host_pcmcia_exit 2019-05-31 06:46:04 -07:00
staging staging: vt6656: use meaningful error code during buffer allocation 2019-07-31 07:26:57 +02:00
target scsi: iscsi: set auth_protocol back to NULL if CHAP_A value is not supported 2019-07-26 09:13:56 +02:00
tc
tee
thermal drivers: thermal: tsens: Don't print error message on -EPROBE_DEFER 2019-06-15 11:54:02 +02:00
thunderbolt thunderbolt: property: Fix a NULL pointer dereference 2019-05-31 06:46:31 -07:00
tty serial: sh-sci: Fix TX DMA buffer flushing and workqueue races 2019-07-31 07:27:04 +02:00
uio
usb usb: dwc2: Fix disable all EP's on disconnect 2019-08-04 09:30:52 +02:00
uwb
vfio vfio: Fix WARNING "do not call blocking ops when !TASK_RUNNING" 2019-06-15 11:54:07 +02:00
vhost vhost: scsi: add weight support 2019-08-04 09:30:55 +02:00
video video: imsttfb: fix potential NULL pointer dereferences 2019-06-15 11:54:10 +02:00
virt drivers/virt/fsl_hypervisor.c: prevent integer overflow in ioctl 2019-05-16 19:41:31 +02:00
virtio virtio_pci: fix a NULL pointer reference in vp_del_vqs 2019-05-10 17:54:08 +02:00
visorbus
vlynq
vme
w1 w1: fix the resume command API 2019-05-31 06:46:14 -07:00
watchdog watchdog: fix compile time error of pretimeout governors 2019-06-15 11:54:06 +02:00
xen xen/swiotlb: fix condition for calling xen_destroy_contiguous_region() 2019-08-06 19:06:55 +02:00
zorro
Kconfig
Makefile