summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/sfc/nic.h
diff options
context:
space:
mode:
authorEdward Cree <ecree@solarflare.com>2018-03-27 19:44:36 +0300
committerDavid S. Miller <davem@davemloft.net>2018-03-27 20:33:20 +0300
commite0a65e3c5e3b7b11ec9320524b8fcc210f2026e9 (patch)
treee82d5fb1d37ef7bff0c1d75a2cbe1f7f0ede3e57 /drivers/net/ethernet/sfc/nic.h
parent31b842955211f427a099f78a6a63d18a6bbc8d55 (diff)
downloadlinux-e0a65e3c5e3b7b11ec9320524b8fcc210f2026e9.tar.xz
sfc: protect list of RSS contexts under a mutex
Otherwise races are possible between ethtool ops and efx_ef10_rx_restore_rss_contexts(). Also, don't try to perform the restore on every reset, only after an MC reboot, otherwise we'll leak RSS contexts on the NIC. Fixes: 42356d9a137b ("sfc: support RSS spreading of ethtool ntuple filters") Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/sfc/nic.h')
-rw-r--r--drivers/net/ethernet/sfc/nic.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/sfc/nic.h b/drivers/net/ethernet/sfc/nic.h
index ac59afad6e5c..5640034bda10 100644
--- a/drivers/net/ethernet/sfc/nic.h
+++ b/drivers/net/ethernet/sfc/nic.h
@@ -365,6 +365,8 @@ enum {
* @vi_base: Absolute index of first VI in this function
* @n_allocated_vis: Number of VIs allocated to this function
* @must_realloc_vis: Flag: VIs have yet to be reallocated after MC reboot
+ * @must_restore_rss_contexts: Flag: RSS contexts have yet to be restored after
+ * MC reboot
* @must_restore_filters: Flag: filters have yet to be restored after MC reboot
* @n_piobufs: Number of PIO buffers allocated to this function
* @wc_membase: Base address of write-combining mapping of the memory BAR
@@ -407,6 +409,7 @@ struct efx_ef10_nic_data {
unsigned int vi_base;
unsigned int n_allocated_vis;
bool must_realloc_vis;
+ bool must_restore_rss_contexts;
bool must_restore_filters;
unsigned int n_piobufs;
void __iomem *wc_membase, *pio_write_base;