]> git.baikalelectronics.ru Git - kernel.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)
committerDavid S. Miller <davem@davemloft.net>
Mon, 27 Feb 2017 14:22:09 +0000 (09:22 -0500)
commitb151bafd02cd13793a64b540d40cb960f69647be
treecf7f5adebaf75054e3aec992947b64bec1a8ddcc
parent5f4fc21cd958f242719f3f21e436f9fbda6f691b
qed: Fix race with multiple VFs

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>
drivers/net/ethernet/qlogic/qed/qed_sriov.c
drivers/net/ethernet/qlogic/qed/qed_sriov.h