[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <7a932be7-0335-a7f3-4fb4-408ccb191737@solarflare.com>
Date: Tue, 27 Mar 2018 17:40:11 +0100
From: Edward Cree <ecree@...arflare.com>
To: <linux-net-drivers@...arflare.com>,
David Miller <davem@...emloft.net>
CC: netdev <netdev@...r.kernel.org>
Subject: [PATCH net-next 0/6] sfc: rework locking around filter management
The use of a spinlock to protect filter state combined with the need for a
sleeping operation (MCDI) to apply that state to the NIC (on EF10) led to
unfixable race conditions, around the handling of filter restoration after
an MC reboot.
So, this patch series removes the requirement to be able to modify the SW
filter table from atomic context, by using a workqueue to request
asynchronous filter operations (which are needed for ARFS). Then, the
filter table locks are changed to mutexes, replacing the dance of spinlocks
and 'busy' flags. Also, a mutex is added to protect the RSS context state,
since otherwise a similar race is possible around restoring that after an
MC reboot. While we're at it, fix a couple of other related bugs.
Edward Cree (6):
sfc: replace asynchronous filter operations
sfc: give ef10 its own rwsem in the filter table instead of
filter_lock
sfc: use a semaphore to lock farch filters too
sfc: return a better error if filter insertion collides with MC reboot
sfc: protect list of RSS contexts under a mutex
sfc: fix flow type handling for RSS filters
drivers/net/ethernet/sfc/ef10.c | 545 ++++++++++++----------------------
drivers/net/ethernet/sfc/efx.c | 30 +-
drivers/net/ethernet/sfc/efx.h | 11 +-
drivers/net/ethernet/sfc/ethtool.c | 77 +++--
drivers/net/ethernet/sfc/farch.c | 80 +++--
drivers/net/ethernet/sfc/net_driver.h | 16 +-
drivers/net/ethernet/sfc/nic.h | 5 +-
drivers/net/ethernet/sfc/rx.c | 119 +++++---
drivers/net/ethernet/sfc/siena.c | 1 -
9 files changed, 400 insertions(+), 484 deletions(-)
Powered by blists - more mailing lists