]> www.infradead.org Git - users/jedix/linux-maple.git/commit
qed: Fix race with multiple VFs
authorMintz, Yuval <Yuval.Mintz@cavium.com>
Mon, 27 Feb 2017 09:06:32 +0000 (11:06 +0200)
committerChuck Anderson <chuck.anderson@oracle.com>
Wed, 26 Jul 2017 03:46:39 +0000 (20:46 -0700)
commita8fb82b3ae17a8f31bced0045fef4fb354fc8f86
tree2bfe0d9b18fc17385c977ed5609e719c0b0f65f3
parent4b4544f51213d0801307118f3d859d061f50e2b8
qed: Fix race with multiple VFs

Orabug: 2593305326439680

A PF syncronizes all IOV activity relating to its VFs
by using a single workqueue handling the work.
The workqueue would reach a bitmask of pending VF events
and act upon each in turn.

Problem is that the indication of a VF message [which sets
the 'vf event' bit for that VF] arrives and is set in
the slowpath attention context, which isn't syncronized with
the processing of the events.
When multiple VFs are present, it's possible that PF would
lose the indication of one of the VF's pending evens, leading
that VF to later timeout.

Instead of adding locks/barriers, simply move from a bitmask
into a per-VF indication inside that VF entry in the PF database.

Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Brian Maly <brian.maly@oracle.com>
drivers/net/ethernet/qlogic/qed/qed_sriov.c
drivers/net/ethernet/qlogic/qed/qed_sriov.h