All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next 00/15] sfc: prerequisites for EF100 driver, part 3
@ 2020-07-01 14:50 Edward Cree
  2020-07-01 14:51 ` [PATCH net-next 01/15] sfc: support setting MTU even if not privileged to configure MAC fully Edward Cree
                   ` (14 more replies)
  0 siblings, 15 replies; 28+ messages in thread
From: Edward Cree @ 2020-07-01 14:50 UTC (permalink / raw)
  To: linux-net-drivers, davem; +Cc: netdev

Continuing on from [1] and [2], this series assembles the last pieces
 of the common codebase that will be used by the forthcoming EF100
 driver.
Patch #1 also adds a minor feature to EF10 (setting MTU on VFs) since
 EF10 supports the same MCDI extension which that feature will use on
 EF100.
Patches #5 & #7, while they should have no externally-visible effect
 on driver functionality, change how that functionality is implemented
 and how the driver represents TXQ configuration internally, so are
 not mere cleanup/refactoring like most of these prerequisites have
 (from the perspective of the existing sfc driver) been.

[1]: https://lore.kernel.org/netdev/20200629.173812.1532344417590172093.davem@davemloft.net/T/
[2]: https://lore.kernel.org/netdev/20200630.130923.402514193016248355.davem@davemloft.net/T/

Edward Cree (15):
  sfc: support setting MTU even if not privileged to configure MAC fully
  sfc: remove max_interrupt_mode
  sfc: move modparam 'interrupt_mode' out of common channel code
  sfc: move modparam 'rss_cpus' out of common channel code
  sfc: make tx_queues_per_channel variable at runtime
  sfc: commonise netif_set_real_num[tr]x_queues calls
  sfc: assign TXQs without gaps
  sfc: don't call tx_limit_len if NIC type doesn't have one
  sfc: factor out efx_mcdi_filter_table_down() from _remove()
  sfc: commonise efx_fini_dmaq
  sfc: initialise RSS context ID to 'no RSS context' in
    efx_init_struct()
  sfc_ef100: add EF100 to NIC-revision enumeration
  sfc_ef100: populate BUFFER_SIZE_BYTES in INIT_RXQ
  sfc_ef100: NVRAM selftest support code
  sfc_ef100: helper function to set default RSS table of given size

 drivers/net/ethernet/sfc/ef10.c           | 77 ++++++-----------------
 drivers/net/ethernet/sfc/efx.c            | 14 ++---
 drivers/net/ethernet/sfc/efx_channels.c   | 61 ++++++++++--------
 drivers/net/ethernet/sfc/efx_channels.h   |  3 +
 drivers/net/ethernet/sfc/efx_common.c     | 14 +++--
 drivers/net/ethernet/sfc/efx_common.h     |  2 +-
 drivers/net/ethernet/sfc/ethtool_common.c | 14 +++--
 drivers/net/ethernet/sfc/farch.c          |  6 +-
 drivers/net/ethernet/sfc/mcdi.c           | 62 ++++++++++++++++++
 drivers/net/ethernet/sfc/mcdi.h           |  1 +
 drivers/net/ethernet/sfc/mcdi_filters.c   | 58 +++++++++++++----
 drivers/net/ethernet/sfc/mcdi_filters.h   |  3 +
 drivers/net/ethernet/sfc/mcdi_functions.c | 57 ++++++++++++++---
 drivers/net/ethernet/sfc/mcdi_functions.h |  1 +
 drivers/net/ethernet/sfc/net_driver.h     | 44 ++++++-------
 drivers/net/ethernet/sfc/nic_common.h     |  3 +-
 drivers/net/ethernet/sfc/selftest.c       | 18 +++---
 drivers/net/ethernet/sfc/siena.c          |  4 +-
 drivers/net/ethernet/sfc/tx.c             | 50 +++------------
 drivers/net/ethernet/sfc/tx_common.c      |  6 +-
 20 files changed, 290 insertions(+), 208 deletions(-)


^ permalink raw reply	[flat|nested] 28+ messages in thread

* [PATCH net-next 01/15] sfc: support setting MTU even if not privileged to configure MAC fully
  2020-07-01 14:50 [PATCH net-next 00/15] sfc: prerequisites for EF100 driver, part 3 Edward Cree
@ 2020-07-01 14:51 ` Edward Cree
  2020-07-01 19:03   ` Jakub Kicinski
  2020-07-01 14:51 ` [PATCH net-next 02/15] sfc: remove max_interrupt_mode Edward Cree
                   ` (13 subsequent siblings)
  14 siblings, 1 reply; 28+ messages in thread
From: Edward Cree @ 2020-07-01 14:51 UTC (permalink / raw)
  To: linux-net-drivers, davem; +Cc: netdev

Unprivileged functions (such as VFs) may set their MTU by use of the
 'control' field of MC_CMD_SET_MAC_EXT, as used in efx_mcdi_set_mtu().
If calling efx_ef10_mac_reconfigure() from efx_change_mtu(), the NIC
 supports the above (SET_MAC_ENHANCED capability), and regular
 efx_mcdi_set_mac() fails EPERM, then fall back to efx_mcdi_set_mtu().

Signed-off-by: Edward Cree <ecree@solarflare.com>
---
 drivers/net/ethernet/sfc/ef10.c           | 16 ++++++++--------
 drivers/net/ethernet/sfc/efx.c            |  4 ----
 drivers/net/ethernet/sfc/efx_common.c     | 12 ++++++------
 drivers/net/ethernet/sfc/efx_common.h     |  2 +-
 drivers/net/ethernet/sfc/ethtool_common.c |  2 +-
 drivers/net/ethernet/sfc/net_driver.h     |  2 +-
 drivers/net/ethernet/sfc/siena.c          |  2 +-
 7 files changed, 18 insertions(+), 22 deletions(-)

diff --git a/drivers/net/ethernet/sfc/ef10.c b/drivers/net/ethernet/sfc/ef10.c
index 5faf2f0e4d62..d162df382dc5 100644
--- a/drivers/net/ethernet/sfc/ef10.c
+++ b/drivers/net/ethernet/sfc/ef10.c
@@ -3306,18 +3306,18 @@ static int efx_ef10_set_mac_address(struct efx_nic *efx)
 	return rc;
 }
 
-static int efx_ef10_mac_reconfigure(struct efx_nic *efx)
+static int efx_ef10_mac_reconfigure(struct efx_nic *efx, bool mtu_only)
 {
-	efx_mcdi_filter_sync_rx_mode(efx);
+	int rc;
 
-	return efx_mcdi_set_mac(efx);
-}
+	WARN_ON(!mutex_is_locked(&efx->mac_lock));
 
-static int efx_ef10_mac_reconfigure_vf(struct efx_nic *efx)
-{
 	efx_mcdi_filter_sync_rx_mode(efx);
 
-	return 0;
+	rc = efx_mcdi_set_mac(efx);
+	if (rc == -EPERM && mtu_only && efx_has_cap(efx, SET_MAC_ENHANCED))
+		return efx_mcdi_set_mtu(efx);
+	return rc;
 }
 
 static int efx_ef10_start_bist(struct efx_nic *efx, u32 bist_type)
@@ -4038,7 +4038,7 @@ const struct efx_nic_type efx_hunt_a0_vf_nic_type = {
 	.stop_stats = efx_port_dummy_op_void,
 	.set_id_led = efx_mcdi_set_id_led,
 	.push_irq_moderation = efx_ef10_push_irq_moderation,
-	.reconfigure_mac = efx_ef10_mac_reconfigure_vf,
+	.reconfigure_mac = efx_ef10_mac_reconfigure,
 	.check_mac_fault = efx_mcdi_mac_check_fault,
 	.reconfigure_port = efx_mcdi_port_reconfigure,
 	.get_wol = efx_ef10_get_wol_vf,
diff --git a/drivers/net/ethernet/sfc/efx.c b/drivers/net/ethernet/sfc/efx.c
index 028d826ab147..418676aba43a 100644
--- a/drivers/net/ethernet/sfc/efx.c
+++ b/drivers/net/ethernet/sfc/efx.c
@@ -169,10 +169,6 @@ static int efx_init_port(struct efx_nic *efx)
 
 	efx->port_initialized = true;
 
-	/* Reconfigure the MAC before creating dma queues (required for
-	 * Falcon/A1 where RX_INGR_EN/TX_DRAIN_EN isn't supported) */
-	efx_mac_reconfigure(efx);
-
 	/* Ensure the PHY advertises the correct flow control settings */
 	rc = efx->phy_op->reconfigure(efx);
 	if (rc && rc != -EPERM)
diff --git a/drivers/net/ethernet/sfc/efx_common.c b/drivers/net/ethernet/sfc/efx_common.c
index a2f744377aaa..26dca2f9a363 100644
--- a/drivers/net/ethernet/sfc/efx_common.c
+++ b/drivers/net/ethernet/sfc/efx_common.c
@@ -139,11 +139,11 @@ void efx_destroy_reset_workqueue(void)
 /* We assume that efx->type->reconfigure_mac will always try to sync RX
  * filters and therefore needs to read-lock the filter table against freeing
  */
-void efx_mac_reconfigure(struct efx_nic *efx)
+void efx_mac_reconfigure(struct efx_nic *efx, bool mtu_only)
 {
 	if (efx->type->reconfigure_mac) {
 		down_read(&efx->filter_sem);
-		efx->type->reconfigure_mac(efx);
+		efx->type->reconfigure_mac(efx, mtu_only);
 		up_read(&efx->filter_sem);
 	}
 }
@@ -158,7 +158,7 @@ static void efx_mac_work(struct work_struct *data)
 
 	mutex_lock(&efx->mac_lock);
 	if (efx->port_enabled)
-		efx_mac_reconfigure(efx);
+		efx_mac_reconfigure(efx, false);
 	mutex_unlock(&efx->mac_lock);
 }
 
@@ -190,7 +190,7 @@ int efx_set_mac_address(struct net_device *net_dev, void *data)
 
 	/* Reconfigure the MAC */
 	mutex_lock(&efx->mac_lock);
-	efx_mac_reconfigure(efx);
+	efx_mac_reconfigure(efx, false);
 	mutex_unlock(&efx->mac_lock);
 
 	return 0;
@@ -304,7 +304,7 @@ int efx_change_mtu(struct net_device *net_dev, int new_mtu)
 
 	mutex_lock(&efx->mac_lock);
 	net_dev->mtu = new_mtu;
-	efx_mac_reconfigure(efx);
+	efx_mac_reconfigure(efx, true);
 	mutex_unlock(&efx->mac_lock);
 
 	efx_start_all(efx);
@@ -486,7 +486,7 @@ static void efx_start_port(struct efx_nic *efx)
 	efx->port_enabled = true;
 
 	/* Ensure MAC ingress/egress is enabled */
-	efx_mac_reconfigure(efx);
+	efx_mac_reconfigure(efx, false);
 
 	mutex_unlock(&efx->mac_lock);
 }
diff --git a/drivers/net/ethernet/sfc/efx_common.h b/drivers/net/ethernet/sfc/efx_common.h
index 73c355fc2590..4056f68f04e5 100644
--- a/drivers/net/ethernet/sfc/efx_common.h
+++ b/drivers/net/ethernet/sfc/efx_common.h
@@ -95,7 +95,7 @@ static inline void efx_init_mcdi_logging(struct efx_nic *efx) {}
 static inline void efx_fini_mcdi_logging(struct efx_nic *efx) {}
 #endif
 
-void efx_mac_reconfigure(struct efx_nic *efx);
+void efx_mac_reconfigure(struct efx_nic *efx, bool mtu_only);
 int efx_set_mac_address(struct net_device *net_dev, void *data);
 void efx_set_rx_mode(struct net_device *net_dev);
 int efx_set_features(struct net_device *net_dev, netdev_features_t data);
diff --git a/drivers/net/ethernet/sfc/ethtool_common.c b/drivers/net/ethernet/sfc/ethtool_common.c
index c96595e50234..738d9be86899 100644
--- a/drivers/net/ethernet/sfc/ethtool_common.c
+++ b/drivers/net/ethernet/sfc/ethtool_common.c
@@ -241,7 +241,7 @@ int efx_ethtool_set_pauseparam(struct net_device *net_dev,
 	/* Reconfigure the MAC. The PHY *may* generate a link state change event
 	 * if the user just changed the advertised capabilities, but there's no
 	 * harm doing this twice */
-	efx_mac_reconfigure(efx);
+	efx_mac_reconfigure(efx, false);
 
 out:
 	mutex_unlock(&efx->mac_lock);
diff --git a/drivers/net/ethernet/sfc/net_driver.h b/drivers/net/ethernet/sfc/net_driver.h
index e0b84b2e3bd2..65a106878186 100644
--- a/drivers/net/ethernet/sfc/net_driver.h
+++ b/drivers/net/ethernet/sfc/net_driver.h
@@ -1356,7 +1356,7 @@ struct efx_nic_type {
 	void (*push_irq_moderation)(struct efx_channel *channel);
 	int (*reconfigure_port)(struct efx_nic *efx);
 	void (*prepare_enable_fc_tx)(struct efx_nic *efx);
-	int (*reconfigure_mac)(struct efx_nic *efx);
+	int (*reconfigure_mac)(struct efx_nic *efx, bool mtu_only);
 	bool (*check_mac_fault)(struct efx_nic *efx);
 	void (*get_wol)(struct efx_nic *efx, struct ethtool_wolinfo *wol);
 	int (*set_wol)(struct efx_nic *efx, u32 type);
diff --git a/drivers/net/ethernet/sfc/siena.c b/drivers/net/ethernet/sfc/siena.c
index ffe193f03352..a7dcd2d3c09b 100644
--- a/drivers/net/ethernet/sfc/siena.c
+++ b/drivers/net/ethernet/sfc/siena.c
@@ -633,7 +633,7 @@ static size_t siena_update_nic_stats(struct efx_nic *efx, u64 *full_stats,
 	return SIENA_STAT_COUNT;
 }
 
-static int siena_mac_reconfigure(struct efx_nic *efx)
+static int siena_mac_reconfigure(struct efx_nic *efx, bool mtu_only __always_unused)
 {
 	MCDI_DECLARE_BUF(inbuf, MC_CMD_SET_MCAST_HASH_IN_LEN);
 	int rc;


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH net-next 02/15] sfc: remove max_interrupt_mode
  2020-07-01 14:50 [PATCH net-next 00/15] sfc: prerequisites for EF100 driver, part 3 Edward Cree
  2020-07-01 14:51 ` [PATCH net-next 01/15] sfc: support setting MTU even if not privileged to configure MAC fully Edward Cree
@ 2020-07-01 14:51 ` Edward Cree
  2020-07-01 14:52 ` [PATCH net-next 03/15] sfc: move modparam 'interrupt_mode' out of common channel code Edward Cree
                   ` (12 subsequent siblings)
  14 siblings, 0 replies; 28+ messages in thread
From: Edward Cree @ 2020-07-01 14:51 UTC (permalink / raw)
  To: linux-net-drivers, davem; +Cc: netdev

All NICs supported by this driver are capable of MSI-X interrupts (only
 Falcon A1 wasn't, and that's now hived off into its own driver), so no
 need for a nic-type parameter.  Besides, the code that checked it was
 buggy anyway (the following assignment that checked min_interrupt_mode
 overrode it).

Signed-off-by: Edward Cree <ecree@solarflare.com>
---
 drivers/net/ethernet/sfc/ef10.c         | 2 --
 drivers/net/ethernet/sfc/efx_channels.c | 6 ------
 drivers/net/ethernet/sfc/net_driver.h   | 3 ---
 drivers/net/ethernet/sfc/siena.c        | 1 -
 4 files changed, 12 deletions(-)

diff --git a/drivers/net/ethernet/sfc/ef10.c b/drivers/net/ethernet/sfc/ef10.c
index d162df382dc5..a34aaecc609c 100644
--- a/drivers/net/ethernet/sfc/ef10.c
+++ b/drivers/net/ethernet/sfc/ef10.c
@@ -4111,7 +4111,6 @@ const struct efx_nic_type efx_hunt_a0_vf_nic_type = {
 	.can_rx_scatter = true,
 	.always_rx_scatter = true,
 	.min_interrupt_mode = EFX_INT_MODE_MSIX,
-	.max_interrupt_mode = EFX_INT_MODE_MSIX,
 	.timer_period_max = 1 << ERF_DD_EVQ_IND_TIMER_VAL_WIDTH,
 	.offload_features = EF10_OFFLOAD_FEATURES,
 	.mcdi_max_ver = 2,
@@ -4248,7 +4247,6 @@ const struct efx_nic_type efx_hunt_a0_nic_type = {
 	.always_rx_scatter = true,
 	.option_descriptors = true,
 	.min_interrupt_mode = EFX_INT_MODE_LEGACY,
-	.max_interrupt_mode = EFX_INT_MODE_MSIX,
 	.timer_period_max = 1 << ERF_DD_EVQ_IND_TIMER_VAL_WIDTH,
 	.offload_features = EF10_OFFLOAD_FEATURES,
 	.mcdi_max_ver = 2,
diff --git a/drivers/net/ethernet/sfc/efx_channels.c b/drivers/net/ethernet/sfc/efx_channels.c
index 2f9db219513a..2220b9507336 100644
--- a/drivers/net/ethernet/sfc/efx_channels.c
+++ b/drivers/net/ethernet/sfc/efx_channels.c
@@ -557,12 +557,6 @@ int efx_init_channels(struct efx_nic *efx)
 	}
 
 	/* Higher numbered interrupt modes are less capable! */
-	if (WARN_ON_ONCE(efx->type->max_interrupt_mode >
-			 efx->type->min_interrupt_mode)) {
-		return -EIO;
-	}
-	efx->interrupt_mode = max(efx->type->max_interrupt_mode,
-				  interrupt_mode);
 	efx->interrupt_mode = min(efx->type->min_interrupt_mode,
 				  interrupt_mode);
 
diff --git a/drivers/net/ethernet/sfc/net_driver.h b/drivers/net/ethernet/sfc/net_driver.h
index 65a106878186..e536c1e12f86 100644
--- a/drivers/net/ethernet/sfc/net_driver.h
+++ b/drivers/net/ethernet/sfc/net_driver.h
@@ -1317,8 +1317,6 @@ struct efx_udp_tunnel {
  * @option_descriptors: NIC supports TX option descriptors
  * @min_interrupt_mode: Lowest capability interrupt mode supported
  *	from &enum efx_int_mode.
- * @max_interrupt_mode: Highest capability interrupt mode supported
- *	from &enum efx_int_mode.
  * @timer_period_max: Maximum period of interrupt timer (in ticks)
  * @offload_features: net_device feature flags for protocol offload
  *	features implemented in hardware
@@ -1492,7 +1490,6 @@ struct efx_nic_type {
 	bool always_rx_scatter;
 	bool option_descriptors;
 	unsigned int min_interrupt_mode;
-	unsigned int max_interrupt_mode;
 	unsigned int timer_period_max;
 	netdev_features_t offload_features;
 	int mcdi_max_ver;
diff --git a/drivers/net/ethernet/sfc/siena.c b/drivers/net/ethernet/sfc/siena.c
index a7dcd2d3c09b..e438853f64a3 100644
--- a/drivers/net/ethernet/sfc/siena.c
+++ b/drivers/net/ethernet/sfc/siena.c
@@ -1085,7 +1085,6 @@ const struct efx_nic_type siena_a0_nic_type = {
 	.can_rx_scatter = true,
 	.option_descriptors = false,
 	.min_interrupt_mode = EFX_INT_MODE_LEGACY,
-	.max_interrupt_mode = EFX_INT_MODE_MSIX,
 	.timer_period_max = 1 << FRF_CZ_TC_TIMER_VAL_WIDTH,
 	.offload_features = (NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM |
 			     NETIF_F_RXHASH | NETIF_F_NTUPLE),


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH net-next 03/15] sfc: move modparam 'interrupt_mode' out of common channel code
  2020-07-01 14:50 [PATCH net-next 00/15] sfc: prerequisites for EF100 driver, part 3 Edward Cree
  2020-07-01 14:51 ` [PATCH net-next 01/15] sfc: support setting MTU even if not privileged to configure MAC fully Edward Cree
  2020-07-01 14:51 ` [PATCH net-next 02/15] sfc: remove max_interrupt_mode Edward Cree
@ 2020-07-01 14:52 ` Edward Cree
  2020-07-02  4:41     ` kernel test robot
  2020-07-01 14:52 ` [PATCH net-next 04/15] sfc: move modparam 'rss_cpus' " Edward Cree
                   ` (11 subsequent siblings)
  14 siblings, 1 reply; 28+ messages in thread
From: Edward Cree @ 2020-07-01 14:52 UTC (permalink / raw)
  To: linux-net-drivers, davem; +Cc: netdev

EF100 only supports MSI-X, so there's no need for the new driver to
 expose this old module parameter.

Signed-off-by: Edward Cree <ecree@solarflare.com>
---
 drivers/net/ethernet/sfc/efx.c          | 4 ++++
 drivers/net/ethernet/sfc/efx_channels.c | 5 +----
 drivers/net/ethernet/sfc/efx_channels.h | 2 ++
 3 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/sfc/efx.c b/drivers/net/ethernet/sfc/efx.c
index 418676aba43a..9e0dbf8648ee 100644
--- a/drivers/net/ethernet/sfc/efx.c
+++ b/drivers/net/ethernet/sfc/efx.c
@@ -64,6 +64,10 @@ void efx_get_udp_tunnel_type_name(u16 type, char *buf, size_t buflen)
  *
  *************************************************************************/
 
+module_param(interrupt_mode, uint, 0444);
+MODULE_PARM_DESC(interrupt_mode,
+		 "Interrupt mode (0=>MSIX 1=>MSI 2=>legacy)");
+
 /*
  * Use separate channels for TX and RX events
  *
diff --git a/drivers/net/ethernet/sfc/efx_channels.c b/drivers/net/ethernet/sfc/efx_channels.c
index 2220b9507336..e93bc37e6a7a 100644
--- a/drivers/net/ethernet/sfc/efx_channels.c
+++ b/drivers/net/ethernet/sfc/efx_channels.c
@@ -23,10 +23,7 @@
  * 1 => MSI
  * 2 => legacy
  */
-static unsigned int interrupt_mode;
-module_param(interrupt_mode, uint, 0444);
-MODULE_PARM_DESC(interrupt_mode,
-		 "Interrupt mode (0=>MSIX 1=>MSI 2=>legacy)");
+unsigned int interrupt_mode = EFX_INT_MODE_MSIX;
 
 /* This is the requested number of CPUs to use for Receive-Side Scaling (RSS),
  * i.e. the number of CPUs among which we may distribute simultaneous
diff --git a/drivers/net/ethernet/sfc/efx_channels.h b/drivers/net/ethernet/sfc/efx_channels.h
index 8d7b8c4142d7..c9f0f4d0caa9 100644
--- a/drivers/net/ethernet/sfc/efx_channels.h
+++ b/drivers/net/ethernet/sfc/efx_channels.h
@@ -11,6 +11,8 @@
 #ifndef EFX_CHANNELS_H
 #define EFX_CHANNELS_H
 
+extern unsigned int interrupt_mode;
+
 int efx_probe_interrupts(struct efx_nic *efx);
 void efx_remove_interrupts(struct efx_nic *efx);
 int efx_soft_enable_interrupts(struct efx_nic *efx);


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH net-next 04/15] sfc: move modparam 'rss_cpus' out of common channel code
  2020-07-01 14:50 [PATCH net-next 00/15] sfc: prerequisites for EF100 driver, part 3 Edward Cree
                   ` (2 preceding siblings ...)
  2020-07-01 14:52 ` [PATCH net-next 03/15] sfc: move modparam 'interrupt_mode' out of common channel code Edward Cree
@ 2020-07-01 14:52 ` Edward Cree
  2020-07-01 14:52 ` [PATCH net-next 05/15] sfc: make tx_queues_per_channel variable at runtime Edward Cree
                   ` (10 subsequent siblings)
  14 siblings, 0 replies; 28+ messages in thread
From: Edward Cree @ 2020-07-01 14:52 UTC (permalink / raw)
  To: linux-net-drivers, davem; +Cc: netdev

Instead of exposing this old module parameter on the new driver (thus
 having to keep it forever after for compatibility), let's confine it
 to the old one; if we find later that we need the feature, we ought
 to support it properly, with ethtool set-channels.

Signed-off-by: Edward Cree <ecree@solarflare.com>
---
 drivers/net/ethernet/sfc/efx.c          | 3 +++
 drivers/net/ethernet/sfc/efx_channels.c | 4 +---
 drivers/net/ethernet/sfc/efx_channels.h | 1 +
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/sfc/efx.c b/drivers/net/ethernet/sfc/efx.c
index 9e0dbf8648ee..f4173f855438 100644
--- a/drivers/net/ethernet/sfc/efx.c
+++ b/drivers/net/ethernet/sfc/efx.c
@@ -68,6 +68,9 @@ module_param(interrupt_mode, uint, 0444);
 MODULE_PARM_DESC(interrupt_mode,
 		 "Interrupt mode (0=>MSIX 1=>MSI 2=>legacy)");
 
+module_param(rss_cpus, uint, 0444);
+MODULE_PARM_DESC(rss_cpus, "Number of CPUs to use for Receive-Side Scaling");
+
 /*
  * Use separate channels for TX and RX events
  *
diff --git a/drivers/net/ethernet/sfc/efx_channels.c b/drivers/net/ethernet/sfc/efx_channels.c
index e93bc37e6a7a..6e6dfe8e5ce1 100644
--- a/drivers/net/ethernet/sfc/efx_channels.c
+++ b/drivers/net/ethernet/sfc/efx_channels.c
@@ -32,9 +32,7 @@ unsigned int interrupt_mode = EFX_INT_MODE_MSIX;
  * Cards without MSI-X will only target one CPU via legacy or MSI interrupt.
  * The default (0) means to assign an interrupt to each core.
  */
-static unsigned int rss_cpus;
-module_param(rss_cpus, uint, 0444);
-MODULE_PARM_DESC(rss_cpus, "Number of CPUs to use for Receive-Side Scaling");
+unsigned int rss_cpus;
 
 static unsigned int irq_adapt_low_thresh = 8000;
 module_param(irq_adapt_low_thresh, uint, 0644);
diff --git a/drivers/net/ethernet/sfc/efx_channels.h b/drivers/net/ethernet/sfc/efx_channels.h
index c9f0f4d0caa9..05a84ddec7fa 100644
--- a/drivers/net/ethernet/sfc/efx_channels.h
+++ b/drivers/net/ethernet/sfc/efx_channels.h
@@ -12,6 +12,7 @@
 #define EFX_CHANNELS_H
 
 extern unsigned int interrupt_mode;
+extern unsigned int rss_cpus;
 
 int efx_probe_interrupts(struct efx_nic *efx);
 void efx_remove_interrupts(struct efx_nic *efx);


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH net-next 05/15] sfc: make tx_queues_per_channel variable at runtime
  2020-07-01 14:50 [PATCH net-next 00/15] sfc: prerequisites for EF100 driver, part 3 Edward Cree
                   ` (3 preceding siblings ...)
  2020-07-01 14:52 ` [PATCH net-next 04/15] sfc: move modparam 'rss_cpus' " Edward Cree
@ 2020-07-01 14:52 ` Edward Cree
  2020-07-01 14:53 ` [PATCH net-next 06/15] sfc: commonise netif_set_real_num[tr]x_queues calls Edward Cree
                   ` (9 subsequent siblings)
  14 siblings, 0 replies; 28+ messages in thread
From: Edward Cree @ 2020-07-01 14:52 UTC (permalink / raw)
  To: linux-net-drivers, davem; +Cc: netdev

Siena needs four TX queues (csum * highpri), EF10 needs two (csum),
 and EF100 only needs one (as checksumming is controlled entirely by
 the transmit descriptor).  Rather than having various bits of ad-hoc
 code to decide which queues to set up etc., put the knowledge of how
 many TXQs a channel has in one place.

Signed-off-by: Edward Cree <ecree@solarflare.com>
---
 drivers/net/ethernet/sfc/ef10.c         | 13 +++++-----
 drivers/net/ethernet/sfc/efx_channels.c |  4 +--
 drivers/net/ethernet/sfc/efx_common.c   |  1 +
 drivers/net/ethernet/sfc/net_driver.h   | 34 ++++++++++---------------
 drivers/net/ethernet/sfc/siena.c        |  1 +
 drivers/net/ethernet/sfc/tx.c           |  8 ++++--
 6 files changed, 30 insertions(+), 31 deletions(-)

diff --git a/drivers/net/ethernet/sfc/ef10.c b/drivers/net/ethernet/sfc/ef10.c
index a34aaecc609c..f5d19e949592 100644
--- a/drivers/net/ethernet/sfc/ef10.c
+++ b/drivers/net/ethernet/sfc/ef10.c
@@ -600,6 +600,7 @@ static int efx_ef10_probe(struct efx_nic *efx)
 	 * However, until we use TX option descriptors we need two TX queues
 	 * per channel.
 	 */
+	efx->tx_queues_per_channel = 2;
 	efx->max_vis = efx_ef10_mem_map_size(efx) / efx->vi_stride;
 	if (!efx->max_vis) {
 		netif_err(efx, drv, efx->net_dev, "error determining max VIs\n");
@@ -607,7 +608,7 @@ static int efx_ef10_probe(struct efx_nic *efx)
 		goto fail5;
 	}
 	efx->max_channels = min_t(unsigned int, EFX_MAX_CHANNELS,
-				  efx->max_vis / EFX_TXQ_TYPES);
+				  efx->max_vis / efx->tx_queues_per_channel);
 	efx->max_tx_channels = efx->max_channels;
 	if (WARN_ON(efx->max_channels == 0)) {
 		rc = -EIO;
@@ -1120,17 +1121,17 @@ static int efx_ef10_alloc_vis(struct efx_nic *efx,
  */
 static int efx_ef10_dimension_resources(struct efx_nic *efx)
 {
+	unsigned int min_vis = max_t(unsigned int, efx->tx_queues_per_channel,
+				     efx_separate_tx_channels ? 2 : 1);
+	unsigned int channel_vis, pio_write_vi_base, max_vis;
 	struct efx_ef10_nic_data *nic_data = efx->nic_data;
 	unsigned int uc_mem_map_size, wc_mem_map_size;
-	unsigned int min_vis = max(EFX_TXQ_TYPES,
-				   efx_separate_tx_channels ? 2 : 1);
-	unsigned int channel_vis, pio_write_vi_base, max_vis;
 	void __iomem *membase;
 	int rc;
 
 	channel_vis = max(efx->n_channels,
 			  ((efx->n_tx_channels + efx->n_extra_tx_channels) *
-			   EFX_TXQ_TYPES) +
+			   efx->tx_queues_per_channel) +
 			   efx->n_xdp_channels * efx->xdp_tx_per_channel);
 	if (efx->max_vis && efx->max_vis < channel_vis) {
 		netif_dbg(efx, drv, efx->net_dev,
@@ -1219,7 +1220,7 @@ static int efx_ef10_dimension_resources(struct efx_nic *efx)
 		 */
 		efx->max_channels = nic_data->n_allocated_vis;
 		efx->max_tx_channels =
-			nic_data->n_allocated_vis / EFX_TXQ_TYPES;
+			nic_data->n_allocated_vis / efx->tx_queues_per_channel;
 
 		efx_mcdi_free_vis(efx);
 		return -EAGAIN;
diff --git a/drivers/net/ethernet/sfc/efx_channels.c b/drivers/net/ethernet/sfc/efx_channels.c
index 6e6dfe8e5ce1..41bf18f2b081 100644
--- a/drivers/net/ethernet/sfc/efx_channels.c
+++ b/drivers/net/ethernet/sfc/efx_channels.c
@@ -726,7 +726,7 @@ void efx_remove_channel(struct efx_channel *channel)
 
 	efx_for_each_channel_rx_queue(rx_queue, channel)
 		efx_remove_rx_queue(rx_queue);
-	efx_for_each_possible_channel_tx_queue(tx_queue, channel)
+	efx_for_each_channel_tx_queue(tx_queue, channel)
 		efx_remove_tx_queue(tx_queue);
 	efx_remove_eventq(channel);
 	channel->type->post_remove(channel);
@@ -1090,7 +1090,7 @@ void efx_stop_channels(struct efx_nic *efx)
 	efx_for_each_channel(channel, efx) {
 		efx_for_each_channel_rx_queue(rx_queue, channel)
 			efx_fini_rx_queue(rx_queue);
-		efx_for_each_possible_channel_tx_queue(tx_queue, channel)
+		efx_for_each_channel_tx_queue(tx_queue, channel)
 			efx_fini_tx_queue(tx_queue);
 	}
 }
diff --git a/drivers/net/ethernet/sfc/efx_common.c b/drivers/net/ethernet/sfc/efx_common.c
index 26dca2f9a363..c84123456c01 100644
--- a/drivers/net/ethernet/sfc/efx_common.c
+++ b/drivers/net/ethernet/sfc/efx_common.c
@@ -1036,6 +1036,7 @@ int efx_init_struct(struct efx_nic *efx,
 	INIT_WORK(&efx->mac_work, efx_mac_work);
 	init_waitqueue_head(&efx->flush_wq);
 
+	efx->tx_queues_per_channel = 1;
 	efx->rxq_entries = EFX_DEFAULT_DMAQ_SIZE;
 	efx->txq_entries = EFX_DEFAULT_DMAQ_SIZE;
 
diff --git a/drivers/net/ethernet/sfc/net_driver.h b/drivers/net/ethernet/sfc/net_driver.h
index e536c1e12f86..4ded155b12e9 100644
--- a/drivers/net/ethernet/sfc/net_driver.h
+++ b/drivers/net/ethernet/sfc/net_driver.h
@@ -867,6 +867,7 @@ struct efx_async_filter_insertion {
  * @n_rx_channels: Number of channels used for RX (= number of RX queues)
  * @n_tx_channels: Number of channels used for TX
  * @n_extra_tx_channels: Number of extra channels with TX queues
+ * @tx_queues_per_channel: number of TX queues probed on each channel
  * @n_xdp_channels: Number of channels used for XDP TX
  * @xdp_channel_offset: Offset of zeroth channel used for XPD TX.
  * @xdp_tx_per_channel: Max number of TX queues on an XDP TX channel.
@@ -1031,6 +1032,7 @@ struct efx_nic {
 	unsigned tx_channel_offset;
 	unsigned n_tx_channels;
 	unsigned n_extra_tx_channels;
+	unsigned int tx_queues_per_channel;
 	unsigned int n_xdp_channels;
 	unsigned int xdp_channel_offset;
 	unsigned int xdp_tx_per_channel;
@@ -1529,7 +1531,7 @@ static inline struct efx_tx_queue *
 efx_get_tx_queue(struct efx_nic *efx, unsigned index, unsigned type)
 {
 	EFX_WARN_ON_ONCE_PARANOID(index >= efx->n_tx_channels ||
-				  type >= EFX_TXQ_TYPES);
+				  type >= efx->tx_queues_per_channel);
 	return &efx->channel[efx->tx_channel_offset + index]->tx_queue[type];
 }
 
@@ -1551,18 +1553,18 @@ static inline bool efx_channel_has_tx_queues(struct efx_channel *channel)
 	return true;
 }
 
-static inline struct efx_tx_queue *
-efx_channel_get_tx_queue(struct efx_channel *channel, unsigned type)
+static inline unsigned int efx_channel_num_tx_queues(struct efx_channel *channel)
 {
-	EFX_WARN_ON_ONCE_PARANOID(!efx_channel_has_tx_queues(channel) ||
-				  type >= EFX_TXQ_TYPES);
-	return &channel->tx_queue[type];
+	if (efx_channel_is_xdp_tx(channel))
+		return channel->efx->xdp_tx_per_channel;
+	return channel->efx->tx_queues_per_channel;
 }
 
-static inline bool efx_tx_queue_used(struct efx_tx_queue *tx_queue)
+static inline struct efx_tx_queue *
+efx_channel_get_tx_queue(struct efx_channel *channel, unsigned type)
 {
-	return !(tx_queue->efx->net_dev->num_tc < 2 &&
-		 tx_queue->queue & EFX_TXQ_TYPE_HIGHPRI);
+	EFX_WARN_ON_ONCE_PARANOID(type >= efx_channel_num_tx_queues(channel));
+	return &channel->tx_queue[type];
 }
 
 /* Iterate over all TX queues belonging to a channel */
@@ -1571,18 +1573,8 @@ static inline bool efx_tx_queue_used(struct efx_tx_queue *tx_queue)
 		;							\
 	else								\
 		for (_tx_queue = (_channel)->tx_queue;			\
-		     _tx_queue < (_channel)->tx_queue + EFX_TXQ_TYPES && \
-			     (efx_tx_queue_used(_tx_queue) ||            \
-			      efx_channel_is_xdp_tx(_channel));		\
-		     _tx_queue++)
-
-/* Iterate over all possible TX queues belonging to a channel */
-#define efx_for_each_possible_channel_tx_queue(_tx_queue, _channel)	\
-	if (!efx_channel_has_tx_queues(_channel))			\
-		;							\
-	else								\
-		for (_tx_queue = (_channel)->tx_queue;			\
-		     _tx_queue < (_channel)->tx_queue + EFX_TXQ_TYPES;	\
+		     _tx_queue < (_channel)->tx_queue +			\
+				 efx_channel_num_tx_queues(_channel);		\
 		     _tx_queue++)
 
 static inline bool efx_channel_has_rx_queue(struct efx_channel *channel)
diff --git a/drivers/net/ethernet/sfc/siena.c b/drivers/net/ethernet/sfc/siena.c
index e438853f64a3..4c5881a3bfe4 100644
--- a/drivers/net/ethernet/sfc/siena.c
+++ b/drivers/net/ethernet/sfc/siena.c
@@ -279,6 +279,7 @@ static int siena_probe_nic(struct efx_nic *efx)
 	efx->max_channels = EFX_MAX_CHANNELS;
 	efx->max_vis = EFX_MAX_CHANNELS;
 	efx->max_tx_channels = EFX_MAX_CHANNELS;
+	efx->tx_queues_per_channel = 2;
 
 	efx_reado(efx, &reg, FR_AZ_CS_DEBUG);
 	efx->port_num = EFX_OWORD_FIELD(reg, FRF_CZ_CS_PORT_NUM) - 1;
diff --git a/drivers/net/ethernet/sfc/tx.c b/drivers/net/ethernet/sfc/tx.c
index ed20f6aef435..76ff394f5b58 100644
--- a/drivers/net/ethernet/sfc/tx.c
+++ b/drivers/net/ethernet/sfc/tx.c
@@ -569,6 +569,10 @@ int efx_setup_tc(struct net_device *net_dev, enum tc_setup_type type,
 	if (type != TC_SETUP_QDISC_MQPRIO)
 		return -EOPNOTSUPP;
 
+	/* Only Siena supported highpri queues */
+	if (efx_nic_rev(efx) > EFX_REV_SIENA_A0)
+		return -EOPNOTSUPP;
+
 	num_tc = mqprio->num_tc;
 
 	if (num_tc > EFX_MAX_TX_TC)
@@ -585,10 +589,10 @@ int efx_setup_tc(struct net_device *net_dev, enum tc_setup_type type,
 	}
 
 	if (num_tc > net_dev->num_tc) {
+		efx->tx_queues_per_channel = 4;
 		/* Initialise high-priority queues as necessary */
 		efx_for_each_channel(channel, efx) {
-			efx_for_each_possible_channel_tx_queue(tx_queue,
-							       channel) {
+			efx_for_each_channel_tx_queue(tx_queue, channel) {
 				if (!(tx_queue->queue & EFX_TXQ_TYPE_HIGHPRI))
 					continue;
 				if (!tx_queue->buffer) {


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH net-next 06/15] sfc: commonise netif_set_real_num[tr]x_queues calls
  2020-07-01 14:50 [PATCH net-next 00/15] sfc: prerequisites for EF100 driver, part 3 Edward Cree
                   ` (4 preceding siblings ...)
  2020-07-01 14:52 ` [PATCH net-next 05/15] sfc: make tx_queues_per_channel variable at runtime Edward Cree
@ 2020-07-01 14:53 ` Edward Cree
  2020-07-01 19:05   ` Jakub Kicinski
  2020-07-01 14:53 ` [PATCH net-next 07/15] sfc: assign TXQs without gaps Edward Cree
                   ` (8 subsequent siblings)
  14 siblings, 1 reply; 28+ messages in thread
From: Edward Cree @ 2020-07-01 14:53 UTC (permalink / raw)
  To: linux-net-drivers, davem; +Cc: netdev

Signed-off-by: Edward Cree <ecree@solarflare.com>
---
 drivers/net/ethernet/sfc/efx.c          | 3 ---
 drivers/net/ethernet/sfc/efx_channels.c | 4 ++++
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/sfc/efx.c b/drivers/net/ethernet/sfc/efx.c
index f4173f855438..9f659cc34252 100644
--- a/drivers/net/ethernet/sfc/efx.c
+++ b/drivers/net/ethernet/sfc/efx.c
@@ -336,9 +336,6 @@ static int efx_probe_nic(struct efx_nic *efx)
 				    sizeof(efx->rss_context.rx_hash_key));
 	efx_set_default_rx_indir_table(efx, &efx->rss_context);
 
-	netif_set_real_num_tx_queues(efx->net_dev, efx->n_tx_channels);
-	netif_set_real_num_rx_queues(efx->net_dev, efx->n_rx_channels);
-
 	/* Initialise the interrupt moderation settings */
 	efx->irq_mod_step_us = DIV_ROUND_UP(efx->timer_quantum_ns, 1000);
 	efx_init_irq_moderation(efx, tx_irq_mod_usec, rx_irq_mod_usec, true,
diff --git a/drivers/net/ethernet/sfc/efx_channels.c b/drivers/net/ethernet/sfc/efx_channels.c
index 41bf18f2b081..dd6ee60b66a0 100644
--- a/drivers/net/ethernet/sfc/efx_channels.c
+++ b/drivers/net/ethernet/sfc/efx_channels.c
@@ -894,6 +894,10 @@ int efx_set_channels(struct efx_nic *efx)
 			}
 		}
 	}
+
+	netif_set_real_num_tx_queues(efx->net_dev, efx->n_tx_channels);
+	netif_set_real_num_rx_queues(efx->net_dev, efx->n_rx_channels);
+
 	return 0;
 }
 


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH net-next 07/15] sfc: assign TXQs without gaps
  2020-07-01 14:50 [PATCH net-next 00/15] sfc: prerequisites for EF100 driver, part 3 Edward Cree
                   ` (5 preceding siblings ...)
  2020-07-01 14:53 ` [PATCH net-next 06/15] sfc: commonise netif_set_real_num[tr]x_queues calls Edward Cree
@ 2020-07-01 14:53 ` Edward Cree
  2020-07-01 14:53 ` [PATCH net-next 08/15] sfc: don't call tx_limit_len if NIC type doesn't have one Edward Cree
                   ` (7 subsequent siblings)
  14 siblings, 0 replies; 28+ messages in thread
From: Edward Cree @ 2020-07-01 14:53 UTC (permalink / raw)
  To: linux-net-drivers, davem; +Cc: netdev

Since we only allocate VIs for the number of TXQs we actually need, we
 cannot naively use "channel * TXQ_TYPES + txq" for the TXQ number, as
 this has gaps (when efx->tx_queues_per_channel < EFX_TXQ_TYPES) and
 thus overruns the driver's VI allocations, causing the firmware to
 reject the MC_CMD_INIT_TXQ based on INSTANCE.
Thus, we distinguish INSTANCE (stored in tx_queue->queue) from LABEL
 (tx_queue->label); the former is allocated starting from 0 in
 efx_set_channels(), while the latter is simply the txq type (index in
 channel->tx_queue array).
To simplify things, rather than changing tx_queues_per_channel after
 setting up TXQs, make Siena always probe its HIGHPRI queues at start
 of day, rather than deferring it until tc mqprio enables them.

Signed-off-by: Edward Cree <ecree@solarflare.com>
---
 drivers/net/ethernet/sfc/ef10.c           |  2 +-
 drivers/net/ethernet/sfc/efx_channels.c   | 38 ++++++++++++++-----
 drivers/net/ethernet/sfc/ethtool_common.c |  7 ++--
 drivers/net/ethernet/sfc/farch.c          |  6 +--
 drivers/net/ethernet/sfc/mcdi_functions.c |  4 +-
 drivers/net/ethernet/sfc/net_driver.h     |  5 ++-
 drivers/net/ethernet/sfc/nic_common.h     |  2 +-
 drivers/net/ethernet/sfc/selftest.c       | 18 ++++-----
 drivers/net/ethernet/sfc/siena.c          |  2 +-
 drivers/net/ethernet/sfc/tx.c             | 46 +++--------------------
 10 files changed, 58 insertions(+), 72 deletions(-)

diff --git a/drivers/net/ethernet/sfc/ef10.c b/drivers/net/ethernet/sfc/ef10.c
index f5d19e949592..790a1f516a15 100644
--- a/drivers/net/ethernet/sfc/ef10.c
+++ b/drivers/net/ethernet/sfc/ef10.c
@@ -2244,7 +2244,7 @@ static u32 efx_ef10_tso_versions(struct efx_nic *efx)
 
 static void efx_ef10_tx_init(struct efx_tx_queue *tx_queue)
 {
-	bool csum_offload = tx_queue->queue & EFX_TXQ_TYPE_OFFLOAD;
+	bool csum_offload = tx_queue->label & EFX_TXQ_TYPE_OFFLOAD;
 	struct efx_channel *channel = tx_queue->channel;
 	struct efx_nic *efx = tx_queue->efx;
 	struct efx_ef10_nic_data *nic_data;
diff --git a/drivers/net/ethernet/sfc/efx_channels.c b/drivers/net/ethernet/sfc/efx_channels.c
index dd6ee60b66a0..0c06af958333 100644
--- a/drivers/net/ethernet/sfc/efx_channels.c
+++ b/drivers/net/ethernet/sfc/efx_channels.c
@@ -524,7 +524,8 @@ efx_alloc_channel(struct efx_nic *efx, int i, struct efx_channel *old_channel)
 	for (j = 0; j < EFX_TXQ_TYPES; j++) {
 		tx_queue = &channel->tx_queue[j];
 		tx_queue->efx = efx;
-		tx_queue->queue = i * EFX_TXQ_TYPES + j;
+		tx_queue->queue = -1;
+		tx_queue->label = j;
 		tx_queue->channel = channel;
 	}
 
@@ -853,8 +854,9 @@ int efx_realloc_channels(struct efx_nic *efx, u32 rxq_entries, u32 txq_entries)
 
 int efx_set_channels(struct efx_nic *efx)
 {
-	struct efx_channel *channel;
 	struct efx_tx_queue *tx_queue;
+	struct efx_channel *channel;
+	unsigned int next_queue = 0;
 	int xdp_queue_number;
 
 	efx->tx_channel_offset =
@@ -883,14 +885,30 @@ int efx_set_channels(struct efx_nic *efx)
 		else
 			channel->rx_queue.core_index = -1;
 
-		efx_for_each_channel_tx_queue(tx_queue, channel) {
-			tx_queue->queue -= (efx->tx_channel_offset *
-					    EFX_TXQ_TYPES);
-
-			if (efx_channel_is_xdp_tx(channel) &&
-			    xdp_queue_number < efx->xdp_tx_queue_count) {
-				efx->xdp_tx_queues[xdp_queue_number] = tx_queue;
-				xdp_queue_number++;
+		if (channel->channel >= efx->tx_channel_offset) {
+			if (efx_channel_is_xdp_tx(channel)) {
+				efx_for_each_channel_tx_queue(tx_queue, channel) {
+					tx_queue->queue = next_queue++;
+					netif_dbg(efx, drv, efx->net_dev, "Channel %u TXQ %u is XDP %u, HW %u\n",
+						  channel->channel, tx_queue->label,
+						  xdp_queue_number, tx_queue->queue);
+					/* We may have a few left-over XDP TX
+					 * queues owing to xdp_tx_queue_count
+					 * not dividing evenly by EFX_TXQ_TYPES.
+					 * We still allocate and probe those
+					 * TXQs, but never use them.
+					 */
+					if (xdp_queue_number < efx->xdp_tx_queue_count)
+						efx->xdp_tx_queues[xdp_queue_number] = tx_queue;
+					xdp_queue_number++;
+				}
+			} else {
+				efx_for_each_channel_tx_queue(tx_queue, channel) {
+					tx_queue->queue = next_queue++;
+					netif_dbg(efx, drv, efx->net_dev, "Channel %u TXQ %u is HW %u\n",
+						  channel->channel, tx_queue->label,
+						  tx_queue->queue);
+				}
 			}
 		}
 	}
diff --git a/drivers/net/ethernet/sfc/ethtool_common.c b/drivers/net/ethernet/sfc/ethtool_common.c
index 738d9be86899..37a4409e759e 100644
--- a/drivers/net/ethernet/sfc/ethtool_common.c
+++ b/drivers/net/ethernet/sfc/ethtool_common.c
@@ -287,8 +287,7 @@ static void efx_fill_test(unsigned int test_index, u8 *strings, u64 *data,
 }
 
 #define EFX_CHANNEL_NAME(_channel) "chan%d", _channel->channel
-#define EFX_TX_QUEUE_NAME(_tx_queue) "txq%d", _tx_queue->queue
-#define EFX_RX_QUEUE_NAME(_rx_queue) "rxq%d", _rx_queue->queue
+#define EFX_TX_QUEUE_NAME(_tx_queue) "txq%d", _tx_queue->label
 #define EFX_LOOPBACK_NAME(_mode, _counter)			\
 	"loopback.%s." _counter, STRING_TABLE_LOOKUP(_mode, efx_loopback_mode)
 
@@ -316,11 +315,11 @@ static int efx_fill_loopback_test(struct efx_nic *efx,
 
 	efx_for_each_channel_tx_queue(tx_queue, channel) {
 		efx_fill_test(test_index++, strings, data,
-			      &lb_tests->tx_sent[tx_queue->queue],
+			      &lb_tests->tx_sent[tx_queue->label],
 			      EFX_TX_QUEUE_NAME(tx_queue),
 			      EFX_LOOPBACK_NAME(mode, "tx_sent"));
 		efx_fill_test(test_index++, strings, data,
-			      &lb_tests->tx_done[tx_queue->queue],
+			      &lb_tests->tx_done[tx_queue->label],
 			      EFX_TX_QUEUE_NAME(tx_queue),
 			      EFX_LOOPBACK_NAME(mode, "tx_done"));
 	}
diff --git a/drivers/net/ethernet/sfc/farch.c b/drivers/net/ethernet/sfc/farch.c
index dbbb898adddb..d07eeaad9bdf 100644
--- a/drivers/net/ethernet/sfc/farch.c
+++ b/drivers/net/ethernet/sfc/farch.c
@@ -379,7 +379,7 @@ int efx_farch_tx_probe(struct efx_tx_queue *tx_queue)
 
 void efx_farch_tx_init(struct efx_tx_queue *tx_queue)
 {
-	int csum = tx_queue->queue & EFX_TXQ_TYPE_OFFLOAD;
+	int csum = tx_queue->label & EFX_TXQ_TYPE_OFFLOAD;
 	struct efx_nic *efx = tx_queue->efx;
 	efx_oword_t reg;
 
@@ -395,7 +395,7 @@ void efx_farch_tx_init(struct efx_tx_queue *tx_queue)
 			      FRF_AZ_TX_DESCQ_EVQ_ID,
 			      tx_queue->channel->channel,
 			      FRF_AZ_TX_DESCQ_OWNER_ID, 0,
-			      FRF_AZ_TX_DESCQ_LABEL, tx_queue->queue,
+			      FRF_AZ_TX_DESCQ_LABEL, tx_queue->label,
 			      FRF_AZ_TX_DESCQ_SIZE,
 			      __ffs(tx_queue->txd.entries),
 			      FRF_AZ_TX_DESCQ_TYPE, 0,
@@ -409,7 +409,7 @@ void efx_farch_tx_init(struct efx_tx_queue *tx_queue)
 
 	EFX_POPULATE_OWORD_1(reg,
 			     FRF_BZ_TX_PACE,
-			     (tx_queue->queue & EFX_TXQ_TYPE_HIGHPRI) ?
+			     (tx_queue->label & EFX_TXQ_TYPE_HIGHPRI) ?
 			     FFE_BZ_TX_PACE_OFF :
 			     FFE_BZ_TX_PACE_RESERVED);
 	efx_writeo_table(efx, &reg, FR_BZ_TX_PACE_TBL, tx_queue->queue);
diff --git a/drivers/net/ethernet/sfc/mcdi_functions.c b/drivers/net/ethernet/sfc/mcdi_functions.c
index 962d8395d958..b3a8aa88db06 100644
--- a/drivers/net/ethernet/sfc/mcdi_functions.c
+++ b/drivers/net/ethernet/sfc/mcdi_functions.c
@@ -164,7 +164,7 @@ int efx_mcdi_tx_init(struct efx_tx_queue *tx_queue, bool tso_v2)
 {
 	MCDI_DECLARE_BUF(inbuf, MC_CMD_INIT_TXQ_IN_LEN(EFX_MAX_DMAQ_SIZE * 8 /
 						       EFX_BUF_SIZE));
-	bool csum_offload = tx_queue->queue & EFX_TXQ_TYPE_OFFLOAD;
+	bool csum_offload = tx_queue->label & EFX_TXQ_TYPE_OFFLOAD;
 	size_t entries = tx_queue->txd.buf.len / EFX_BUF_SIZE;
 	struct efx_channel *channel = tx_queue->channel;
 	struct efx_nic *efx = tx_queue->efx;
@@ -176,7 +176,7 @@ int efx_mcdi_tx_init(struct efx_tx_queue *tx_queue, bool tso_v2)
 
 	MCDI_SET_DWORD(inbuf, INIT_TXQ_IN_SIZE, tx_queue->ptr_mask + 1);
 	MCDI_SET_DWORD(inbuf, INIT_TXQ_IN_TARGET_EVQ, channel->channel);
-	MCDI_SET_DWORD(inbuf, INIT_TXQ_IN_LABEL, tx_queue->queue);
+	MCDI_SET_DWORD(inbuf, INIT_TXQ_IN_LABEL, tx_queue->label);
 	MCDI_SET_DWORD(inbuf, INIT_TXQ_IN_INSTANCE, tx_queue->queue);
 	MCDI_SET_DWORD(inbuf, INIT_TXQ_IN_OWNER_ID, 0);
 	MCDI_SET_DWORD(inbuf, INIT_TXQ_IN_PORT_ID, efx->vport_id);
diff --git a/drivers/net/ethernet/sfc/net_driver.h b/drivers/net/ethernet/sfc/net_driver.h
index 4ded155b12e9..0bf11ebb03cf 100644
--- a/drivers/net/ethernet/sfc/net_driver.h
+++ b/drivers/net/ethernet/sfc/net_driver.h
@@ -189,6 +189,8 @@ struct efx_tx_buffer {
  *
  * @efx: The associated Efx NIC
  * @queue: DMA queue number
+ * @label: Label for TX completion events.
+ *	Is our index within @channel->tx_queue array.
  * @tso_version: Version of TSO in use for this queue.
  * @channel: The associated channel
  * @core_txq: The networking core TX queue structure
@@ -250,7 +252,8 @@ struct efx_tx_buffer {
 struct efx_tx_queue {
 	/* Members which don't change on the fast path */
 	struct efx_nic *efx ____cacheline_aligned_in_smp;
-	unsigned queue;
+	unsigned int queue;
+	unsigned int label;
 	unsigned int tso_version;
 	struct efx_channel *channel;
 	struct netdev_queue *core_txq;
diff --git a/drivers/net/ethernet/sfc/nic_common.h b/drivers/net/ethernet/sfc/nic_common.h
index fd474d9e55e4..813f288ab3fe 100644
--- a/drivers/net/ethernet/sfc/nic_common.h
+++ b/drivers/net/ethernet/sfc/nic_common.h
@@ -90,7 +90,7 @@ static inline bool efx_nic_tx_is_empty(struct efx_tx_queue *tx_queue)
 /* XXX is this a thing on EF100? */
 static inline struct efx_tx_queue *efx_tx_queue_partner(struct efx_tx_queue *tx_queue)
 {
-	if (tx_queue->queue & EFX_TXQ_TYPE_OFFLOAD)
+	if (tx_queue->label & EFX_TXQ_TYPE_OFFLOAD)
 		return tx_queue - EFX_TXQ_TYPE_OFFLOAD;
 	else
 		return tx_queue + EFX_TXQ_TYPE_OFFLOAD;
diff --git a/drivers/net/ethernet/sfc/selftest.c b/drivers/net/ethernet/sfc/selftest.c
index 1ae369022d7d..e71d6d37a317 100644
--- a/drivers/net/ethernet/sfc/selftest.c
+++ b/drivers/net/ethernet/sfc/selftest.c
@@ -445,7 +445,7 @@ static int efx_begin_loopback(struct efx_tx_queue *tx_queue)
 		if (rc != NETDEV_TX_OK) {
 			netif_err(efx, drv, efx->net_dev,
 				  "TX queue %d could not transmit packet %d of "
-				  "%d in %s loopback test\n", tx_queue->queue,
+				  "%d in %s loopback test\n", tx_queue->label,
 				  i + 1, state->packet_count,
 				  LOOPBACK_MODE(efx));
 
@@ -497,7 +497,7 @@ static int efx_end_loopback(struct efx_tx_queue *tx_queue,
 		netif_err(efx, drv, efx->net_dev,
 			  "TX queue %d saw only %d out of an expected %d "
 			  "TX completion events in %s loopback test\n",
-			  tx_queue->queue, tx_done, state->packet_count,
+			  tx_queue->label, tx_done, state->packet_count,
 			  LOOPBACK_MODE(efx));
 		rc = -ETIMEDOUT;
 		/* Allow to fall through so we see the RX errors as well */
@@ -508,15 +508,15 @@ static int efx_end_loopback(struct efx_tx_queue *tx_queue,
 		netif_dbg(efx, drv, efx->net_dev,
 			  "TX queue %d saw only %d out of an expected %d "
 			  "received packets in %s loopback test\n",
-			  tx_queue->queue, rx_good, state->packet_count,
+			  tx_queue->label, rx_good, state->packet_count,
 			  LOOPBACK_MODE(efx));
 		rc = -ETIMEDOUT;
 		/* Fall through */
 	}
 
 	/* Update loopback test structure */
-	lb_tests->tx_sent[tx_queue->queue] += state->packet_count;
-	lb_tests->tx_done[tx_queue->queue] += tx_done;
+	lb_tests->tx_sent[tx_queue->label] += state->packet_count;
+	lb_tests->tx_done[tx_queue->label] += tx_done;
 	lb_tests->rx_good += rx_good;
 	lb_tests->rx_bad += rx_bad;
 
@@ -542,8 +542,8 @@ efx_test_loopback(struct efx_tx_queue *tx_queue,
 		state->flush = false;
 
 		netif_dbg(efx, drv, efx->net_dev,
-			  "TX queue %d testing %s loopback with %d packets\n",
-			  tx_queue->queue, LOOPBACK_MODE(efx),
+			  "TX queue %d (hw %d) testing %s loopback with %d packets\n",
+			  tx_queue->label, tx_queue->queue, LOOPBACK_MODE(efx),
 			  state->packet_count);
 
 		efx_iterate_state(efx);
@@ -570,7 +570,7 @@ efx_test_loopback(struct efx_tx_queue *tx_queue,
 
 	netif_dbg(efx, drv, efx->net_dev,
 		  "TX queue %d passed %s loopback test with a burst length "
-		  "of %d packets\n", tx_queue->queue, LOOPBACK_MODE(efx),
+		  "of %d packets\n", tx_queue->label, LOOPBACK_MODE(efx),
 		  state->packet_count);
 
 	return 0;
@@ -660,7 +660,7 @@ static int efx_test_loopbacks(struct efx_nic *efx, struct efx_self_tests *tests,
 
 		/* Test all enabled types of TX queue */
 		efx_for_each_channel_tx_queue(tx_queue, channel) {
-			state->offload_csum = (tx_queue->queue &
+			state->offload_csum = (tx_queue->label &
 					       EFX_TXQ_TYPE_OFFLOAD);
 			rc = efx_test_loopback(tx_queue,
 					       &tests->loopback[mode]);
diff --git a/drivers/net/ethernet/sfc/siena.c b/drivers/net/ethernet/sfc/siena.c
index 4c5881a3bfe4..219fb3a0c9d0 100644
--- a/drivers/net/ethernet/sfc/siena.c
+++ b/drivers/net/ethernet/sfc/siena.c
@@ -279,7 +279,7 @@ static int siena_probe_nic(struct efx_nic *efx)
 	efx->max_channels = EFX_MAX_CHANNELS;
 	efx->max_vis = EFX_MAX_CHANNELS;
 	efx->max_tx_channels = EFX_MAX_CHANNELS;
-	efx->tx_queues_per_channel = 2;
+	efx->tx_queues_per_channel = 4;
 
 	efx_reado(efx, &reg, FR_AZ_CS_DEBUG);
 	efx->port_num = EFX_OWORD_FIELD(reg, FRF_CZ_CS_PORT_NUM) - 1;
diff --git a/drivers/net/ethernet/sfc/tx.c b/drivers/net/ethernet/sfc/tx.c
index 76ff394f5b58..1bcf50ab95d9 100644
--- a/drivers/net/ethernet/sfc/tx.c
+++ b/drivers/net/ethernet/sfc/tx.c
@@ -551,8 +551,8 @@ void efx_init_tx_queue_core_txq(struct efx_tx_queue *tx_queue)
 	/* Must be inverse of queue lookup in efx_hard_start_xmit() */
 	tx_queue->core_txq =
 		netdev_get_tx_queue(efx->net_dev,
-				    tx_queue->queue / EFX_TXQ_TYPES +
-				    ((tx_queue->queue & EFX_TXQ_TYPE_HIGHPRI) ?
+				    tx_queue->channel->channel +
+				    ((tx_queue->label & EFX_TXQ_TYPE_HIGHPRI) ?
 				     efx->n_tx_channels : 0));
 }
 
@@ -561,10 +561,7 @@ int efx_setup_tc(struct net_device *net_dev, enum tc_setup_type type,
 {
 	struct efx_nic *efx = netdev_priv(net_dev);
 	struct tc_mqprio_qopt *mqprio = type_data;
-	struct efx_channel *channel;
-	struct efx_tx_queue *tx_queue;
 	unsigned tc, num_tc;
-	int rc;
 
 	if (type != TC_SETUP_QDISC_MQPRIO)
 		return -EOPNOTSUPP;
@@ -588,40 +585,9 @@ int efx_setup_tc(struct net_device *net_dev, enum tc_setup_type type,
 		net_dev->tc_to_txq[tc].count = efx->n_tx_channels;
 	}
 
-	if (num_tc > net_dev->num_tc) {
-		efx->tx_queues_per_channel = 4;
-		/* Initialise high-priority queues as necessary */
-		efx_for_each_channel(channel, efx) {
-			efx_for_each_channel_tx_queue(tx_queue, channel) {
-				if (!(tx_queue->queue & EFX_TXQ_TYPE_HIGHPRI))
-					continue;
-				if (!tx_queue->buffer) {
-					rc = efx_probe_tx_queue(tx_queue);
-					if (rc)
-						return rc;
-				}
-				if (!tx_queue->initialised)
-					efx_init_tx_queue(tx_queue);
-				efx_init_tx_queue_core_txq(tx_queue);
-			}
-		}
-	} else {
-		/* Reduce number of classes before number of queues */
-		net_dev->num_tc = num_tc;
-	}
-
-	rc = netif_set_real_num_tx_queues(net_dev,
-					  max_t(int, num_tc, 1) *
-					  efx->n_tx_channels);
-	if (rc)
-		return rc;
-
-	/* Do not destroy high-priority queues when they become
-	 * unused.  We would have to flush them first, and it is
-	 * fairly difficult to flush a subset of TX queues.  Leave
-	 * it to efx_fini_channels().
-	 */
-
 	net_dev->num_tc = num_tc;
-	return 0;
+
+	return netif_set_real_num_tx_queues(net_dev,
+					    max_t(int, num_tc, 1) *
+					    efx->n_tx_channels);
 }


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH net-next 08/15] sfc: don't call tx_limit_len if NIC type doesn't have one
  2020-07-01 14:50 [PATCH net-next 00/15] sfc: prerequisites for EF100 driver, part 3 Edward Cree
                   ` (6 preceding siblings ...)
  2020-07-01 14:53 ` [PATCH net-next 07/15] sfc: assign TXQs without gaps Edward Cree
@ 2020-07-01 14:53 ` Edward Cree
  2020-07-01 14:54 ` [PATCH net-next 09/15] sfc: factor out efx_mcdi_filter_table_down() from _remove() Edward Cree
                   ` (6 subsequent siblings)
  14 siblings, 0 replies; 28+ messages in thread
From: Edward Cree @ 2020-07-01 14:53 UTC (permalink / raw)
  To: linux-net-drivers, davem; +Cc: netdev

EF100 doesn't need to split up large DMAs.

Signed-off-by: Edward Cree <ecree@solarflare.com>
---
 drivers/net/ethernet/sfc/tx_common.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/sfc/tx_common.c b/drivers/net/ethernet/sfc/tx_common.c
index 2a058b76d1f0..11b64c609550 100644
--- a/drivers/net/ethernet/sfc/tx_common.c
+++ b/drivers/net/ethernet/sfc/tx_common.c
@@ -298,7 +298,11 @@ struct efx_tx_buffer *efx_tx_map_chunk(struct efx_tx_queue *tx_queue,
 	/* Map the fragment taking account of NIC-dependent DMA limits. */
 	do {
 		buffer = efx_tx_queue_get_insert_buffer(tx_queue);
-		dma_len = nic_type->tx_limit_len(tx_queue, dma_addr, len);
+
+		if (nic_type->tx_limit_len)
+			dma_len = nic_type->tx_limit_len(tx_queue, dma_addr, len);
+		else
+			dma_len = len;
 
 		buffer->len = dma_len;
 		buffer->dma_addr = dma_addr;


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH net-next 09/15] sfc: factor out efx_mcdi_filter_table_down() from _remove()
  2020-07-01 14:50 [PATCH net-next 00/15] sfc: prerequisites for EF100 driver, part 3 Edward Cree
                   ` (7 preceding siblings ...)
  2020-07-01 14:53 ` [PATCH net-next 08/15] sfc: don't call tx_limit_len if NIC type doesn't have one Edward Cree
@ 2020-07-01 14:54 ` Edward Cree
  2020-07-01 14:54 ` [PATCH net-next 10/15] sfc: commonise efx_fini_dmaq Edward Cree
                   ` (5 subsequent siblings)
  14 siblings, 0 replies; 28+ messages in thread
From: Edward Cree @ 2020-07-01 14:54 UTC (permalink / raw)
  To: linux-net-drivers, davem; +Cc: netdev

_down() merely removes all our filters and VLANs, it doesn't free
 efx->filter_state itself.

Signed-off-by: Edward Cree <ecree@solarflare.com>
---
 drivers/net/ethernet/sfc/mcdi_filters.c | 37 ++++++++++++++++---------
 drivers/net/ethernet/sfc/mcdi_filters.h |  1 +
 2 files changed, 25 insertions(+), 13 deletions(-)

diff --git a/drivers/net/ethernet/sfc/mcdi_filters.c b/drivers/net/ethernet/sfc/mcdi_filters.c
index 74ee06fe0996..283f68264b66 100644
--- a/drivers/net/ethernet/sfc/mcdi_filters.c
+++ b/drivers/net/ethernet/sfc/mcdi_filters.c
@@ -1459,7 +1459,7 @@ void efx_mcdi_filter_table_restore(struct efx_nic *efx)
 		table->must_restore_filters = false;
 }
 
-void efx_mcdi_filter_table_remove(struct efx_nic *efx)
+void efx_mcdi_filter_table_down(struct efx_nic *efx)
 {
 	struct efx_mcdi_filter_table *table = efx->filter_state;
 	MCDI_DECLARE_BUF(inbuf, MC_CMD_FILTER_OP_EXT_IN_LEN);
@@ -1467,21 +1467,11 @@ void efx_mcdi_filter_table_remove(struct efx_nic *efx)
 	unsigned int filter_idx;
 	int rc;
 
-	efx_mcdi_filter_cleanup_vlans(efx);
-	efx->filter_state = NULL;
-	/*
-	 * If we were called without locking, then it's not safe to free
-	 * the table as others might be using it.  So we just WARN, leak
-	 * the memory, and potentially get an inconsistent filter table
-	 * state.
-	 * This should never actually happen.
-	 */
-	if (!efx_rwsem_assert_write_locked(&efx->filter_sem))
-		return;
-
 	if (!table)
 		return;
 
+	efx_mcdi_filter_cleanup_vlans(efx);
+
 	for (filter_idx = 0; filter_idx < EFX_MCDI_FILTER_TBL_ROWS; filter_idx++) {
 		spec = efx_mcdi_filter_entry_spec(table, filter_idx);
 		if (!spec)
@@ -1501,6 +1491,27 @@ void efx_mcdi_filter_table_remove(struct efx_nic *efx)
 				   __func__, filter_idx);
 		kfree(spec);
 	}
+}
+
+void efx_mcdi_filter_table_remove(struct efx_nic *efx)
+{
+	struct efx_mcdi_filter_table *table = efx->filter_state;
+
+	efx_mcdi_filter_table_down(efx);
+
+	efx->filter_state = NULL;
+	/*
+	 * If we were called without locking, then it's not safe to free
+	 * the table as others might be using it.  So we just WARN, leak
+	 * the memory, and potentially get an inconsistent filter table
+	 * state.
+	 * This should never actually happen.
+	 */
+	if (!efx_rwsem_assert_write_locked(&efx->filter_sem))
+		return;
+
+	if (!table)
+		return;
 
 	vfree(table->entry);
 	kfree(table);
diff --git a/drivers/net/ethernet/sfc/mcdi_filters.h b/drivers/net/ethernet/sfc/mcdi_filters.h
index 03a8bf74c733..23f9d08d071d 100644
--- a/drivers/net/ethernet/sfc/mcdi_filters.h
+++ b/drivers/net/ethernet/sfc/mcdi_filters.h
@@ -93,6 +93,7 @@ struct efx_mcdi_filter_table {
 };
 
 int efx_mcdi_filter_table_probe(struct efx_nic *efx, bool multicast_chaining);
+void efx_mcdi_filter_table_down(struct efx_nic *efx);
 void efx_mcdi_filter_table_remove(struct efx_nic *efx);
 void efx_mcdi_filter_table_restore(struct efx_nic *efx);
 


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH net-next 10/15] sfc: commonise efx_fini_dmaq
  2020-07-01 14:50 [PATCH net-next 00/15] sfc: prerequisites for EF100 driver, part 3 Edward Cree
                   ` (8 preceding siblings ...)
  2020-07-01 14:54 ` [PATCH net-next 09/15] sfc: factor out efx_mcdi_filter_table_down() from _remove() Edward Cree
@ 2020-07-01 14:54 ` Edward Cree
  2020-07-01 14:54 ` [PATCH net-next 11/15] sfc: initialise RSS context ID to 'no RSS context' in efx_init_struct() Edward Cree
                   ` (4 subsequent siblings)
  14 siblings, 0 replies; 28+ messages in thread
From: Edward Cree @ 2020-07-01 14:54 UTC (permalink / raw)
  To: linux-net-drivers, davem; +Cc: netdev

Signed-off-by: Edward Cree <ecree@solarflare.com>
---
 drivers/net/ethernet/sfc/ef10.c           | 42 ++---------------------
 drivers/net/ethernet/sfc/mcdi_functions.c | 38 ++++++++++++++++++++
 drivers/net/ethernet/sfc/mcdi_functions.h |  1 +
 3 files changed, 41 insertions(+), 40 deletions(-)

diff --git a/drivers/net/ethernet/sfc/ef10.c b/drivers/net/ethernet/sfc/ef10.c
index 790a1f516a15..788a562212b1 100644
--- a/drivers/net/ethernet/sfc/ef10.c
+++ b/drivers/net/ethernet/sfc/ef10.c
@@ -3117,44 +3117,6 @@ static void efx_ef10_ev_test_generate(struct efx_channel *channel)
 	netif_err(efx, hw, efx->net_dev, "%s: failed rc=%d\n", __func__, rc);
 }
 
-static int efx_ef10_fini_dmaq(struct efx_nic *efx)
-{
-	struct efx_tx_queue *tx_queue;
-	struct efx_rx_queue *rx_queue;
-	struct efx_channel *channel;
-	int pending;
-
-	/* If the MC has just rebooted, the TX/RX queues will have already been
-	 * torn down, but efx->active_queues needs to be set to zero.
-	 */
-	if (efx->must_realloc_vis) {
-		atomic_set(&efx->active_queues, 0);
-		return 0;
-	}
-
-	/* Do not attempt to write to the NIC during EEH recovery */
-	if (efx->state != STATE_RECOVERY) {
-		efx_for_each_channel(channel, efx) {
-			efx_for_each_channel_rx_queue(rx_queue, channel)
-				efx_mcdi_rx_fini(rx_queue);
-			efx_for_each_channel_tx_queue(tx_queue, channel)
-				efx_mcdi_tx_fini(tx_queue);
-		}
-
-		wait_event_timeout(efx->flush_wq,
-				   atomic_read(&efx->active_queues) == 0,
-				   msecs_to_jiffies(EFX_MAX_FLUSH_TIME));
-		pending = atomic_read(&efx->active_queues);
-		if (pending) {
-			netif_err(efx, hw, efx->net_dev, "failed to flush %d queues\n",
-				  pending);
-			return -ETIMEDOUT;
-		}
-	}
-
-	return 0;
-}
-
 static void efx_ef10_prepare_flr(struct efx_nic *efx)
 {
 	atomic_set(&efx->active_queues, 0);
@@ -4029,7 +3991,7 @@ const struct efx_nic_type efx_hunt_a0_vf_nic_type = {
 	.reset = efx_ef10_reset,
 	.probe_port = efx_mcdi_port_probe,
 	.remove_port = efx_mcdi_port_remove,
-	.fini_dmaq = efx_ef10_fini_dmaq,
+	.fini_dmaq = efx_fini_dmaq,
 	.prepare_flr = efx_ef10_prepare_flr,
 	.finish_flr = efx_port_dummy_op_void,
 	.describe_stats = efx_ef10_describe_stats,
@@ -4137,7 +4099,7 @@ const struct efx_nic_type efx_hunt_a0_nic_type = {
 	.reset = efx_ef10_reset,
 	.probe_port = efx_mcdi_port_probe,
 	.remove_port = efx_mcdi_port_remove,
-	.fini_dmaq = efx_ef10_fini_dmaq,
+	.fini_dmaq = efx_fini_dmaq,
 	.prepare_flr = efx_ef10_prepare_flr,
 	.finish_flr = efx_port_dummy_op_void,
 	.describe_stats = efx_ef10_describe_stats,
diff --git a/drivers/net/ethernet/sfc/mcdi_functions.c b/drivers/net/ethernet/sfc/mcdi_functions.c
index b3a8aa88db06..92b9a741c286 100644
--- a/drivers/net/ethernet/sfc/mcdi_functions.c
+++ b/drivers/net/ethernet/sfc/mcdi_functions.c
@@ -341,6 +341,44 @@ void efx_mcdi_rx_fini(struct efx_rx_queue *rx_queue)
 			       outbuf, outlen, rc);
 }
 
+int efx_fini_dmaq(struct efx_nic *efx)
+{
+	struct efx_tx_queue *tx_queue;
+	struct efx_rx_queue *rx_queue;
+	struct efx_channel *channel;
+	int pending;
+
+	/* If the MC has just rebooted, the TX/RX queues will have already been
+	 * torn down, but efx->active_queues needs to be set to zero.
+	 */
+	if (efx->must_realloc_vis) {
+		atomic_set(&efx->active_queues, 0);
+		return 0;
+	}
+
+	/* Do not attempt to write to the NIC during EEH recovery */
+	if (efx->state != STATE_RECOVERY) {
+		efx_for_each_channel(channel, efx) {
+			efx_for_each_channel_rx_queue(rx_queue, channel)
+				efx_mcdi_rx_fini(rx_queue);
+			efx_for_each_channel_tx_queue(tx_queue, channel)
+				efx_mcdi_tx_fini(tx_queue);
+		}
+
+		wait_event_timeout(efx->flush_wq,
+				   atomic_read(&efx->active_queues) == 0,
+				   msecs_to_jiffies(EFX_MAX_FLUSH_TIME));
+		pending = atomic_read(&efx->active_queues);
+		if (pending) {
+			netif_err(efx, hw, efx->net_dev, "failed to flush %d queues\n",
+				  pending);
+			return -ETIMEDOUT;
+		}
+	}
+
+	return 0;
+}
+
 int efx_mcdi_window_mode_to_stride(struct efx_nic *efx, u8 vi_window_mode)
 {
 	switch (vi_window_mode) {
diff --git a/drivers/net/ethernet/sfc/mcdi_functions.h b/drivers/net/ethernet/sfc/mcdi_functions.h
index ca4a5ac1a66b..687be8b00cd8 100644
--- a/drivers/net/ethernet/sfc/mcdi_functions.h
+++ b/drivers/net/ethernet/sfc/mcdi_functions.h
@@ -26,6 +26,7 @@ int efx_mcdi_rx_probe(struct efx_rx_queue *rx_queue);
 void efx_mcdi_rx_init(struct efx_rx_queue *rx_queue);
 void efx_mcdi_rx_remove(struct efx_rx_queue *rx_queue);
 void efx_mcdi_rx_fini(struct efx_rx_queue *rx_queue);
+int efx_fini_dmaq(struct efx_nic *efx);
 int efx_mcdi_window_mode_to_stride(struct efx_nic *efx, u8 vi_window_mode);
 int efx_get_pf_index(struct efx_nic *efx, unsigned int *pf_index);
 


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH net-next 11/15] sfc: initialise RSS context ID to 'no RSS context' in efx_init_struct()
  2020-07-01 14:50 [PATCH net-next 00/15] sfc: prerequisites for EF100 driver, part 3 Edward Cree
                   ` (9 preceding siblings ...)
  2020-07-01 14:54 ` [PATCH net-next 10/15] sfc: commonise efx_fini_dmaq Edward Cree
@ 2020-07-01 14:54 ` Edward Cree
  2020-07-01 14:55 ` [PATCH net-next 12/15] sfc_ef100: add EF100 to NIC-revision enumeration Edward Cree
                   ` (3 subsequent siblings)
  14 siblings, 0 replies; 28+ messages in thread
From: Edward Cree @ 2020-07-01 14:54 UTC (permalink / raw)
  To: linux-net-drivers, davem; +Cc: netdev

Previously this was only happening in ef10-specific code.

Signed-off-by: Edward Cree <ecree@solarflare.com>
---
 drivers/net/ethernet/sfc/ef10.c       | 2 --
 drivers/net/ethernet/sfc/efx_common.c | 1 +
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/sfc/ef10.c b/drivers/net/ethernet/sfc/ef10.c
index 788a562212b1..b29b5f34fe9b 100644
--- a/drivers/net/ethernet/sfc/ef10.c
+++ b/drivers/net/ethernet/sfc/ef10.c
@@ -552,8 +552,6 @@ static int efx_ef10_probe(struct efx_nic *efx)
 	}
 	nic_data->warm_boot_count = rc;
 
-	efx->rss_context.context_id = EFX_MCDI_RSS_CONTEXT_INVALID;
-
 	/* In case we're recovering from a crash (kexec), we want to
 	 * cancel any outstanding request by the previous user of this
 	 * function.  We send a special message using the least
diff --git a/drivers/net/ethernet/sfc/efx_common.c b/drivers/net/ethernet/sfc/efx_common.c
index c84123456c01..5667694c6514 100644
--- a/drivers/net/ethernet/sfc/efx_common.c
+++ b/drivers/net/ethernet/sfc/efx_common.c
@@ -1017,6 +1017,7 @@ int efx_init_struct(struct efx_nic *efx,
 	efx->rx_packet_ts_offset =
 		efx->type->rx_ts_offset - efx->type->rx_prefix_size;
 	INIT_LIST_HEAD(&efx->rss_context.list);
+	efx->rss_context.context_id = EFX_MCDI_RSS_CONTEXT_INVALID;
 	mutex_init(&efx->rss_lock);
 	efx->vport_id = EVB_PORT_ID_ASSIGNED;
 	spin_lock_init(&efx->stats_lock);


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH net-next 12/15] sfc_ef100: add EF100 to NIC-revision enumeration
  2020-07-01 14:50 [PATCH net-next 00/15] sfc: prerequisites for EF100 driver, part 3 Edward Cree
                   ` (10 preceding siblings ...)
  2020-07-01 14:54 ` [PATCH net-next 11/15] sfc: initialise RSS context ID to 'no RSS context' in efx_init_struct() Edward Cree
@ 2020-07-01 14:55 ` Edward Cree
  2020-07-01 19:11   ` Jakub Kicinski
  2020-07-01 14:55 ` [PATCH net-next 13/15] sfc_ef100: populate BUFFER_SIZE_BYTES in INIT_RXQ Edward Cree
                   ` (2 subsequent siblings)
  14 siblings, 1 reply; 28+ messages in thread
From: Edward Cree @ 2020-07-01 14:55 UTC (permalink / raw)
  To: linux-net-drivers, davem; +Cc: netdev

Also, condition on revision in ethtool drvinfo: if rev is EF100, then
 we must be the sfc_ef100 driver.  (We can't rely on KBUILD_MODNAME
 any more, because ethtool_common.o gets linked into both drivers.)

Signed-off-by: Edward Cree <ecree@solarflare.com>
---
 drivers/net/ethernet/sfc/ethtool_common.c | 5 ++++-
 drivers/net/ethernet/sfc/nic_common.h     | 1 +
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/sfc/ethtool_common.c b/drivers/net/ethernet/sfc/ethtool_common.c
index 37a4409e759e..926deb22ee67 100644
--- a/drivers/net/ethernet/sfc/ethtool_common.c
+++ b/drivers/net/ethernet/sfc/ethtool_common.c
@@ -104,7 +104,10 @@ void efx_ethtool_get_drvinfo(struct net_device *net_dev,
 {
 	struct efx_nic *efx = netdev_priv(net_dev);
 
-	strlcpy(info->driver, KBUILD_MODNAME, sizeof(info->driver));
+	if (efx->type->revision == EFX_REV_EF100)
+		strlcpy(info->driver, "sfc_ef100", sizeof(info->driver));
+	else
+		strlcpy(info->driver, "sfc", sizeof(info->driver));
 	strlcpy(info->version, EFX_DRIVER_VERSION, sizeof(info->version));
 	efx_mcdi_print_fwver(efx, info->fw_version,
 			     sizeof(info->fw_version));
diff --git a/drivers/net/ethernet/sfc/nic_common.h b/drivers/net/ethernet/sfc/nic_common.h
index 813f288ab3fe..e04b6817cde3 100644
--- a/drivers/net/ethernet/sfc/nic_common.h
+++ b/drivers/net/ethernet/sfc/nic_common.h
@@ -21,6 +21,7 @@ enum {
 	 */
 	EFX_REV_SIENA_A0 = 3,
 	EFX_REV_HUNT_A0 = 4,
+	EFX_REV_EF100 = 5,
 };
 
 static inline int efx_nic_rev(struct efx_nic *efx)


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH net-next 13/15] sfc_ef100: populate BUFFER_SIZE_BYTES in INIT_RXQ
  2020-07-01 14:50 [PATCH net-next 00/15] sfc: prerequisites for EF100 driver, part 3 Edward Cree
                   ` (11 preceding siblings ...)
  2020-07-01 14:55 ` [PATCH net-next 12/15] sfc_ef100: add EF100 to NIC-revision enumeration Edward Cree
@ 2020-07-01 14:55 ` Edward Cree
  2020-07-01 14:55 ` [PATCH net-next 14/15] sfc_ef100: NVRAM selftest support code Edward Cree
  2020-07-01 14:56 ` [PATCH net-next 15/15] sfc_ef100: helper function to set default RSS table of given size Edward Cree
  14 siblings, 0 replies; 28+ messages in thread
From: Edward Cree @ 2020-07-01 14:55 UTC (permalink / raw)
  To: linux-net-drivers, davem; +Cc: netdev

The QDMA subsystem on EF100 needs this information.

Signed-off-by: Edward Cree <ecree@solarflare.com>
---
 drivers/net/ethernet/sfc/mcdi_functions.c | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/drivers/net/ethernet/sfc/mcdi_functions.c b/drivers/net/ethernet/sfc/mcdi_functions.c
index 92b9a741c286..d8a3af86ef78 100644
--- a/drivers/net/ethernet/sfc/mcdi_functions.c
+++ b/drivers/net/ethernet/sfc/mcdi_functions.c
@@ -267,20 +267,22 @@ int efx_mcdi_rx_probe(struct efx_rx_queue *rx_queue)
 
 void efx_mcdi_rx_init(struct efx_rx_queue *rx_queue)
 {
-	MCDI_DECLARE_BUF(inbuf,
-			 MC_CMD_INIT_RXQ_IN_LEN(EFX_MAX_DMAQ_SIZE * 8 /
-						EFX_BUF_SIZE));
 	struct efx_channel *channel = efx_rx_queue_channel(rx_queue);
 	size_t entries = rx_queue->rxd.buf.len / EFX_BUF_SIZE;
+	MCDI_DECLARE_BUF(inbuf, MC_CMD_INIT_RXQ_V4_IN_LEN);
 	struct efx_nic *efx = rx_queue->efx;
+	unsigned int buffer_size;
 	dma_addr_t dma_addr;
-	size_t inlen;
 	int rc;
 	int i;
 	BUILD_BUG_ON(MC_CMD_INIT_RXQ_OUT_LEN != 0);
 
 	rx_queue->scatter_n = 0;
 	rx_queue->scatter_len = 0;
+	if (efx->type->revision == EFX_REV_EF100)
+		buffer_size = efx->rx_page_buf_step;
+	else
+		buffer_size = 0;
 
 	MCDI_SET_DWORD(inbuf, INIT_RXQ_IN_SIZE, rx_queue->ptr_mask + 1);
 	MCDI_SET_DWORD(inbuf, INIT_RXQ_IN_TARGET_EVQ, channel->channel);
@@ -292,6 +294,7 @@ void efx_mcdi_rx_init(struct efx_rx_queue *rx_queue)
 			      INIT_RXQ_IN_FLAG_TIMESTAMP, 1);
 	MCDI_SET_DWORD(inbuf, INIT_RXQ_IN_OWNER_ID, 0);
 	MCDI_SET_DWORD(inbuf, INIT_RXQ_IN_PORT_ID, efx->vport_id);
+	MCDI_SET_DWORD(inbuf, INIT_RXQ_V4_IN_BUFFER_SIZE_BYTES, buffer_size);
 
 	dma_addr = rx_queue->rxd.buf.dma_addr;
 
@@ -303,9 +306,7 @@ void efx_mcdi_rx_init(struct efx_rx_queue *rx_queue)
 		dma_addr += EFX_BUF_SIZE;
 	}
 
-	inlen = MC_CMD_INIT_RXQ_IN_LEN(entries);
-
-	rc = efx_mcdi_rpc(efx, MC_CMD_INIT_RXQ, inbuf, inlen,
+	rc = efx_mcdi_rpc(efx, MC_CMD_INIT_RXQ, inbuf, sizeof(inbuf),
 			  NULL, 0, NULL);
 	if (rc)
 		netdev_WARN(efx->net_dev, "failed to initialise RXQ %d\n",


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH net-next 14/15] sfc_ef100: NVRAM selftest support code
  2020-07-01 14:50 [PATCH net-next 00/15] sfc: prerequisites for EF100 driver, part 3 Edward Cree
                   ` (12 preceding siblings ...)
  2020-07-01 14:55 ` [PATCH net-next 13/15] sfc_ef100: populate BUFFER_SIZE_BYTES in INIT_RXQ Edward Cree
@ 2020-07-01 14:55 ` Edward Cree
  2020-07-01 14:56 ` [PATCH net-next 15/15] sfc_ef100: helper function to set default RSS table of given size Edward Cree
  14 siblings, 0 replies; 28+ messages in thread
From: Edward Cree @ 2020-07-01 14:55 UTC (permalink / raw)
  To: linux-net-drivers, davem; +Cc: netdev

We have yet another new scheme for NVRAM, and a corresponding new MCDI.

Signed-off-by: Edward Cree <ecree@solarflare.com>
---
 drivers/net/ethernet/sfc/mcdi.c | 62 +++++++++++++++++++++++++++++++++
 drivers/net/ethernet/sfc/mcdi.h |  1 +
 2 files changed, 63 insertions(+)

diff --git a/drivers/net/ethernet/sfc/mcdi.c b/drivers/net/ethernet/sfc/mcdi.c
index 244fb621d17b..6c49740a178e 100644
--- a/drivers/net/ethernet/sfc/mcdi.c
+++ b/drivers/net/ethernet/sfc/mcdi.c
@@ -1621,6 +1621,35 @@ int efx_mcdi_nvram_types(struct efx_nic *efx, u32 *nvram_types_out)
 	return rc;
 }
 
+/* This function finds types using the new NVRAM_PARTITIONS mcdi. */
+static int efx_new_mcdi_nvram_types(struct efx_nic *efx, u32 *number,
+				    u32 *nvram_types)
+{
+	efx_dword_t *outbuf = kzalloc(MC_CMD_NVRAM_PARTITIONS_OUT_LENMAX_MCDI2,
+				      GFP_KERNEL);
+	size_t outlen;
+	int rc;
+
+	if (!outbuf)
+		return -ENOMEM;
+
+	BUILD_BUG_ON(MC_CMD_NVRAM_PARTITIONS_IN_LEN != 0);
+
+	rc = efx_mcdi_rpc(efx, MC_CMD_NVRAM_PARTITIONS, NULL, 0,
+			  outbuf, MC_CMD_NVRAM_PARTITIONS_OUT_LENMAX_MCDI2, &outlen);
+	if (rc)
+		goto fail;
+
+	*number = MCDI_DWORD(outbuf, NVRAM_PARTITIONS_OUT_NUM_PARTITIONS);
+
+	memcpy(nvram_types, MCDI_PTR(outbuf, NVRAM_PARTITIONS_OUT_TYPE_ID),
+	       *number * sizeof(u32));
+
+fail:
+	kfree(outbuf);
+	return rc;
+}
+
 int efx_mcdi_nvram_info(struct efx_nic *efx, unsigned int type,
 			size_t *size_out, size_t *erase_size_out,
 			bool *protected_out)
@@ -1674,6 +1703,39 @@ static int efx_mcdi_nvram_test(struct efx_nic *efx, unsigned int type)
 	}
 }
 
+/* This function tests nvram partitions using the new mcdi partition lookup scheme */
+int efx_new_mcdi_nvram_test_all(struct efx_nic *efx)
+{
+	u32 *nvram_types = kzalloc(MC_CMD_NVRAM_PARTITIONS_OUT_LENMAX_MCDI2,
+				   GFP_KERNEL);
+	unsigned int number;
+	int rc, i;
+
+	if (!nvram_types)
+		return -ENOMEM;
+
+	rc = efx_new_mcdi_nvram_types(efx, &number, nvram_types);
+	if (rc)
+		goto fail;
+
+	/* Require at least one check */
+	rc = -EAGAIN;
+
+	for (i = 0; i < number; i++) {
+		if (nvram_types[i] == NVRAM_PARTITION_TYPE_PARTITION_MAP ||
+		    nvram_types[i] == NVRAM_PARTITION_TYPE_DYNAMIC_CONFIG)
+			continue;
+
+		rc = efx_mcdi_nvram_test(efx, nvram_types[i]);
+		if (rc)
+			goto fail;
+	}
+
+fail:
+	kfree(nvram_types);
+	return rc;
+}
+
 int efx_mcdi_nvram_test_all(struct efx_nic *efx)
 {
 	u32 nvram_types;
diff --git a/drivers/net/ethernet/sfc/mcdi.h b/drivers/net/ethernet/sfc/mcdi.h
index 10f064f761a5..e053adfe82b0 100644
--- a/drivers/net/ethernet/sfc/mcdi.h
+++ b/drivers/net/ethernet/sfc/mcdi.h
@@ -345,6 +345,7 @@ int efx_mcdi_nvram_types(struct efx_nic *efx, u32 *nvram_types_out);
 int efx_mcdi_nvram_info(struct efx_nic *efx, unsigned int type,
 			size_t *size_out, size_t *erase_size_out,
 			bool *protected_out);
+int efx_new_mcdi_nvram_test_all(struct efx_nic *efx);
 int efx_mcdi_nvram_test_all(struct efx_nic *efx);
 int efx_mcdi_handle_assertion(struct efx_nic *efx);
 void efx_mcdi_set_id_led(struct efx_nic *efx, enum efx_led_mode mode);


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH net-next 15/15] sfc_ef100: helper function to set default RSS table of given size
  2020-07-01 14:50 [PATCH net-next 00/15] sfc: prerequisites for EF100 driver, part 3 Edward Cree
                   ` (13 preceding siblings ...)
  2020-07-01 14:55 ` [PATCH net-next 14/15] sfc_ef100: NVRAM selftest support code Edward Cree
@ 2020-07-01 14:56 ` Edward Cree
  14 siblings, 0 replies; 28+ messages in thread
From: Edward Cree @ 2020-07-01 14:56 UTC (permalink / raw)
  To: linux-net-drivers, davem; +Cc: netdev

Signed-off-by: Edward Cree <ecree@solarflare.com>
---
 drivers/net/ethernet/sfc/mcdi_filters.c | 21 +++++++++++++++++++++
 drivers/net/ethernet/sfc/mcdi_filters.h |  2 ++
 2 files changed, 23 insertions(+)

diff --git a/drivers/net/ethernet/sfc/mcdi_filters.c b/drivers/net/ethernet/sfc/mcdi_filters.c
index 283f68264b66..5a74d880b733 100644
--- a/drivers/net/ethernet/sfc/mcdi_filters.c
+++ b/drivers/net/ethernet/sfc/mcdi_filters.c
@@ -2276,3 +2276,24 @@ int efx_mcdi_vf_rx_push_rss_config(struct efx_nic *efx, bool user,
 		return 0;
 	return efx_mcdi_filter_rx_push_shared_rss_config(efx, NULL);
 }
+
+int efx_mcdi_push_default_indir_table(struct efx_nic *efx,
+				      unsigned int rss_spread)
+{
+	int rc = 0;
+
+	if (efx->rss_spread == rss_spread)
+		return 0;
+
+	efx->rss_spread = rss_spread;
+	if (!efx->filter_state)
+		return 0;
+
+	efx_mcdi_rx_free_indir_table(efx);
+	if (rss_spread > 1) {
+		efx_set_default_rx_indir_table(efx, &efx->rss_context);
+		rc = efx->type->rx_push_rss_config(efx, false,
+				   efx->rss_context.rx_indir_table, NULL);
+	}
+	return rc;
+}
diff --git a/drivers/net/ethernet/sfc/mcdi_filters.h b/drivers/net/ethernet/sfc/mcdi_filters.h
index 23f9d08d071d..06426aa9f2f3 100644
--- a/drivers/net/ethernet/sfc/mcdi_filters.h
+++ b/drivers/net/ethernet/sfc/mcdi_filters.h
@@ -155,6 +155,8 @@ int efx_mcdi_vf_rx_push_rss_config(struct efx_nic *efx, bool user,
 				   __attribute__ ((unused)),
 				   const u8 *key
 				   __attribute__ ((unused)));
+int efx_mcdi_push_default_indir_table(struct efx_nic *efx,
+				      unsigned int rss_spread);
 int efx_mcdi_rx_pull_rss_config(struct efx_nic *efx);
 int efx_mcdi_rx_pull_rss_context_config(struct efx_nic *efx,
 					struct efx_rss_context *ctx);

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* Re: [PATCH net-next 01/15] sfc: support setting MTU even if not privileged to configure MAC fully
  2020-07-01 14:51 ` [PATCH net-next 01/15] sfc: support setting MTU even if not privileged to configure MAC fully Edward Cree
@ 2020-07-01 19:03   ` Jakub Kicinski
  2020-07-01 22:13     ` Edward Cree
  0 siblings, 1 reply; 28+ messages in thread
From: Jakub Kicinski @ 2020-07-01 19:03 UTC (permalink / raw)
  To: Edward Cree; +Cc: linux-net-drivers, davem, netdev

On Wed, 1 Jul 2020 15:51:25 +0100 Edward Cree wrote:
> Unprivileged functions (such as VFs) may set their MTU by use of the
>  'control' field of MC_CMD_SET_MAC_EXT, as used in efx_mcdi_set_mtu().
> If calling efx_ef10_mac_reconfigure() from efx_change_mtu(), the NIC
>  supports the above (SET_MAC_ENHANCED capability), and regular
>  efx_mcdi_set_mac() fails EPERM, then fall back to efx_mcdi_set_mtu().

Is there no way of checking the permission the function has before
issuing the firmware call?

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH net-next 06/15] sfc: commonise netif_set_real_num[tr]x_queues calls
  2020-07-01 14:53 ` [PATCH net-next 06/15] sfc: commonise netif_set_real_num[tr]x_queues calls Edward Cree
@ 2020-07-01 19:05   ` Jakub Kicinski
  2020-07-01 22:17     ` Edward Cree
  0 siblings, 1 reply; 28+ messages in thread
From: Jakub Kicinski @ 2020-07-01 19:05 UTC (permalink / raw)
  To: Edward Cree; +Cc: linux-net-drivers, davem, netdev

On Wed, 1 Jul 2020 15:53:15 +0100 Edward Cree wrote:
> Signed-off-by: Edward Cree <ecree@solarflare.com>
> ---
>  drivers/net/ethernet/sfc/efx.c          | 3 ---
>  drivers/net/ethernet/sfc/efx_channels.c | 4 ++++
>  2 files changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/ethernet/sfc/efx.c b/drivers/net/ethernet/sfc/efx.c
> index f4173f855438..9f659cc34252 100644
> --- a/drivers/net/ethernet/sfc/efx.c
> +++ b/drivers/net/ethernet/sfc/efx.c
> @@ -336,9 +336,6 @@ static int efx_probe_nic(struct efx_nic *efx)
>  				    sizeof(efx->rss_context.rx_hash_key));
>  	efx_set_default_rx_indir_table(efx, &efx->rss_context);
>  
> -	netif_set_real_num_tx_queues(efx->net_dev, efx->n_tx_channels);
> -	netif_set_real_num_rx_queues(efx->net_dev, efx->n_rx_channels);
> -
>  	/* Initialise the interrupt moderation settings */
>  	efx->irq_mod_step_us = DIV_ROUND_UP(efx->timer_quantum_ns, 1000);
>  	efx_init_irq_moderation(efx, tx_irq_mod_usec, rx_irq_mod_usec, true,
> diff --git a/drivers/net/ethernet/sfc/efx_channels.c b/drivers/net/ethernet/sfc/efx_channels.c
> index 41bf18f2b081..dd6ee60b66a0 100644
> --- a/drivers/net/ethernet/sfc/efx_channels.c
> +++ b/drivers/net/ethernet/sfc/efx_channels.c
> @@ -894,6 +894,10 @@ int efx_set_channels(struct efx_nic *efx)
>  			}
>  		}
>  	}
> +
> +	netif_set_real_num_tx_queues(efx->net_dev, efx->n_tx_channels);
> +	netif_set_real_num_rx_queues(efx->net_dev, efx->n_rx_channels);

For a third time in last 7 days - these can fail :)

I know you're just moving them, but perhaps worth cleaning this up..

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH net-next 12/15] sfc_ef100: add EF100 to NIC-revision enumeration
  2020-07-01 14:55 ` [PATCH net-next 12/15] sfc_ef100: add EF100 to NIC-revision enumeration Edward Cree
@ 2020-07-01 19:11   ` Jakub Kicinski
  2020-07-01 19:44     ` David Miller
  0 siblings, 1 reply; 28+ messages in thread
From: Jakub Kicinski @ 2020-07-01 19:11 UTC (permalink / raw)
  To: Edward Cree; +Cc: linux-net-drivers, davem, netdev

On Wed, 1 Jul 2020 15:55:10 +0100 Edward Cree wrote:
> Also, condition on revision in ethtool drvinfo: if rev is EF100, then
>  we must be the sfc_ef100 driver.  (We can't rely on KBUILD_MODNAME
>  any more, because ethtool_common.o gets linked into both drivers.)
> 
> Signed-off-by: Edward Cree <ecree@solarflare.com>
> ---
>  drivers/net/ethernet/sfc/ethtool_common.c | 5 ++++-
>  drivers/net/ethernet/sfc/nic_common.h     | 1 +
>  2 files changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/sfc/ethtool_common.c b/drivers/net/ethernet/sfc/ethtool_common.c
> index 37a4409e759e..926deb22ee67 100644
> --- a/drivers/net/ethernet/sfc/ethtool_common.c
> +++ b/drivers/net/ethernet/sfc/ethtool_common.c
> @@ -104,7 +104,10 @@ void efx_ethtool_get_drvinfo(struct net_device *net_dev,
>  {
>  	struct efx_nic *efx = netdev_priv(net_dev);
>  
> -	strlcpy(info->driver, KBUILD_MODNAME, sizeof(info->driver));
> +	if (efx->type->revision == EFX_REV_EF100)
> +		strlcpy(info->driver, "sfc_ef100", sizeof(info->driver));
> +	else
> +		strlcpy(info->driver, "sfc", sizeof(info->driver));

ethtool info -> driver does not seem like an appropriate place to
report hardware version.

>  	strlcpy(info->version, EFX_DRIVER_VERSION, sizeof(info->version));
>  	efx_mcdi_print_fwver(efx, info->fw_version,
>  			     sizeof(info->fw_version));
> diff --git a/drivers/net/ethernet/sfc/nic_common.h b/drivers/net/ethernet/sfc/nic_common.h
> index 813f288ab3fe..e04b6817cde3 100644
> --- a/drivers/net/ethernet/sfc/nic_common.h
> +++ b/drivers/net/ethernet/sfc/nic_common.h
> @@ -21,6 +21,7 @@ enum {
>  	 */
>  	EFX_REV_SIENA_A0 = 3,
>  	EFX_REV_HUNT_A0 = 4,
> +	EFX_REV_EF100 = 5,
>  };
>  
>  static inline int efx_nic_rev(struct efx_nic *efx)
> 


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH net-next 12/15] sfc_ef100: add EF100 to NIC-revision enumeration
  2020-07-01 19:11   ` Jakub Kicinski
@ 2020-07-01 19:44     ` David Miller
  2020-07-01 22:23       ` Edward Cree
  0 siblings, 1 reply; 28+ messages in thread
From: David Miller @ 2020-07-01 19:44 UTC (permalink / raw)
  To: kuba; +Cc: ecree, linux-net-drivers, netdev

From: Jakub Kicinski <kuba@kernel.org>
Date: Wed, 1 Jul 2020 12:11:31 -0700

> On Wed, 1 Jul 2020 15:55:10 +0100 Edward Cree wrote:
>> Also, condition on revision in ethtool drvinfo: if rev is EF100, then
>>  we must be the sfc_ef100 driver.  (We can't rely on KBUILD_MODNAME
>>  any more, because ethtool_common.o gets linked into both drivers.)
>> 
>> Signed-off-by: Edward Cree <ecree@solarflare.com>
>> ---
>>  drivers/net/ethernet/sfc/ethtool_common.c | 5 ++++-
>>  drivers/net/ethernet/sfc/nic_common.h     | 1 +
>>  2 files changed, 5 insertions(+), 1 deletion(-)
>> 
>> diff --git a/drivers/net/ethernet/sfc/ethtool_common.c b/drivers/net/ethernet/sfc/ethtool_common.c
>> index 37a4409e759e..926deb22ee67 100644
>> --- a/drivers/net/ethernet/sfc/ethtool_common.c
>> +++ b/drivers/net/ethernet/sfc/ethtool_common.c
>> @@ -104,7 +104,10 @@ void efx_ethtool_get_drvinfo(struct net_device *net_dev,
>>  {
>>  	struct efx_nic *efx = netdev_priv(net_dev);
>>  
>> -	strlcpy(info->driver, KBUILD_MODNAME, sizeof(info->driver));
>> +	if (efx->type->revision == EFX_REV_EF100)
>> +		strlcpy(info->driver, "sfc_ef100", sizeof(info->driver));
>> +	else
>> +		strlcpy(info->driver, "sfc", sizeof(info->driver));
> 
> ethtool info -> driver does not seem like an appropriate place to
> report hardware version.

Agreed.

Or is this code used as a library by two "drivers"?  In that case it's fine.


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH net-next 01/15] sfc: support setting MTU even if not privileged to configure MAC fully
  2020-07-01 19:03   ` Jakub Kicinski
@ 2020-07-01 22:13     ` Edward Cree
  2020-07-01 23:16       ` Jakub Kicinski
  0 siblings, 1 reply; 28+ messages in thread
From: Edward Cree @ 2020-07-01 22:13 UTC (permalink / raw)
  To: Jakub Kicinski; +Cc: linux-net-drivers, davem, netdev

On 01/07/2020 20:03, Jakub Kicinski wrote:
> On Wed, 1 Jul 2020 15:51:25 +0100 Edward Cree wrote:
>> Unprivileged functions (such as VFs) may set their MTU by use of the
>>  'control' field of MC_CMD_SET_MAC_EXT, as used in efx_mcdi_set_mtu().
>> If calling efx_ef10_mac_reconfigure() from efx_change_mtu(), the NIC
>>  supports the above (SET_MAC_ENHANCED capability), and regular
>>  efx_mcdi_set_mac() fails EPERM, then fall back to efx_mcdi_set_mtu().
> Is there no way of checking the permission the function has before
> issuing the firmware call?
We could condition on the LINKCTRL flag from the MC_CMD_DRV_ATTACH
 response we get at start of day; but usually in this driver we've
 tried to follow the EAFP principle rather than embedding knowledge
 of the firmware's permissions model into the driver.
I suppose it might make sense to go straight to efx_mcdi_set_mtu()
 in the mtu_only && SET_MAC_ENHANCED case, use efx_mcdi_set_mac()
 otherwise, and thus never have a fallback from one to the other.
WDYT?

-ed

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH net-next 06/15] sfc: commonise netif_set_real_num[tr]x_queues calls
  2020-07-01 19:05   ` Jakub Kicinski
@ 2020-07-01 22:17     ` Edward Cree
  0 siblings, 0 replies; 28+ messages in thread
From: Edward Cree @ 2020-07-01 22:17 UTC (permalink / raw)
  To: Jakub Kicinski; +Cc: linux-net-drivers, davem, netdev

On 01/07/2020 20:05, Jakub Kicinski wrote:
> On Wed, 1 Jul 2020 15:53:15 +0100 Edward Cree wrote:
>> +	netif_set_real_num_tx_queues(efx->net_dev, efx->n_tx_channels);
>> +	netif_set_real_num_rx_queues(efx->net_dev, efx->n_rx_channels);
> For a third time in last 7 days - these can fail :)
Yeah, I noticed the first twoand was wondering if you'd complain :)

> I know you're just moving them, but perhaps worth cleaning this up..
Ok, can do.

-ed

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH net-next 12/15] sfc_ef100: add EF100 to NIC-revision enumeration
  2020-07-01 19:44     ` David Miller
@ 2020-07-01 22:23       ` Edward Cree
  2020-07-01 22:33         ` David Miller
  0 siblings, 1 reply; 28+ messages in thread
From: Edward Cree @ 2020-07-01 22:23 UTC (permalink / raw)
  To: David Miller, kuba; +Cc: linux-net-drivers, netdev

On 01/07/2020 20:44, David Miller wrote:
> Or is this code used as a library by two "drivers"?
Yes, it is; there will be a second module 'sfc_ef100.ko'which this
 file will be linked into and which will set efx->type to one with
 an EF100 revision.

Although tbh I have been wondering about another approach to
 ethtool_get_drvinfo: we could have a const char [] in each driver's
 non-common parts, holding KBUILD_MODNAME, which ethtool_common.c
 could just reference, rather than looking at efx->type->revision
 and relying on the rest of the driver to set it up right.
Since it looks like I'll need to respin this series anyway, I'll try
 that and see if it works — it seems cleaner to me.

-ed

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH net-next 12/15] sfc_ef100: add EF100 to NIC-revision enumeration
  2020-07-01 22:23       ` Edward Cree
@ 2020-07-01 22:33         ` David Miller
  0 siblings, 0 replies; 28+ messages in thread
From: David Miller @ 2020-07-01 22:33 UTC (permalink / raw)
  To: ecree; +Cc: kuba, linux-net-drivers, netdev

From: Edward Cree <ecree@solarflare.com>
Date: Wed, 1 Jul 2020 23:23:40 +0100

> On 01/07/2020 20:44, David Miller wrote:
>> Or is this code used as a library by two "drivers"?
> Yes, it is; there will be a second module 'sfc_ef100.ko'which this
>  file will be linked into and which will set efx->type to one with
>  an EF100 revision.
> 
> Although tbh I have been wondering about another approach to
>  ethtool_get_drvinfo: we could have a const char [] in each driver's
>  non-common parts, holding KBUILD_MODNAME, which ethtool_common.c
>  could just reference, rather than looking at efx->type->revision
>  and relying on the rest of the driver to set it up right.
> Since it looks like I'll need to respin this series anyway, I'll try
>  that and see if it works — it seems cleaner to me.

It seems cleaner to me too.

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH net-next 01/15] sfc: support setting MTU even if not privileged to configure MAC fully
  2020-07-01 22:13     ` Edward Cree
@ 2020-07-01 23:16       ` Jakub Kicinski
  2020-07-02 12:52         ` Edward Cree
  0 siblings, 1 reply; 28+ messages in thread
From: Jakub Kicinski @ 2020-07-01 23:16 UTC (permalink / raw)
  To: Edward Cree; +Cc: linux-net-drivers, davem, netdev

On Wed, 1 Jul 2020 23:13:13 +0100 Edward Cree wrote:
> On 01/07/2020 20:03, Jakub Kicinski wrote:
> > On Wed, 1 Jul 2020 15:51:25 +0100 Edward Cree wrote:  
> >> Unprivileged functions (such as VFs) may set their MTU by use of the
> >>  'control' field of MC_CMD_SET_MAC_EXT, as used in efx_mcdi_set_mtu().
> >> If calling efx_ef10_mac_reconfigure() from efx_change_mtu(), the NIC
> >>  supports the above (SET_MAC_ENHANCED capability), and regular
> >>  efx_mcdi_set_mac() fails EPERM, then fall back to efx_mcdi_set_mtu().  
> > Is there no way of checking the permission the function has before
> > issuing the firmware call?  
> We could condition on the LINKCTRL flag from the MC_CMD_DRV_ATTACH
>  response we get at start of day; but usually in this driver we've
>  tried to follow the EAFP principle rather than embedding knowledge
>  of the firmware's permissions model into the driver.

I see. I'm actually asking because of efx_ef10_set_udp_tnl_ports().
I'd like to rewrite the UDP tunnel code so that 
NETIF_F_RX_UDP_TUNNEL_PORT only appears on the interface if it 
_really_ can do the offload. ef10 is the only driver I've seen where 
I can't be sure what FW will say.. (other than liquidio, but that's 
more of a kernel<->FW proxy than a driver, sigh).

Is there anything I can condition on there?

> I suppose it might make sense to go straight to efx_mcdi_set_mtu()
>  in the mtu_only && SET_MAC_ENHANCED case, use efx_mcdi_set_mac()
>  otherwise, and thus never have a fallback from one to the other.
> WDYT?

For the change of MTU that indeed seems much cleaner.

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH net-next 03/15] sfc: move modparam 'interrupt_mode' out of common channel code
  2020-07-01 14:52 ` [PATCH net-next 03/15] sfc: move modparam 'interrupt_mode' out of common channel code Edward Cree
@ 2020-07-02  4:41     ` kernel test robot
  0 siblings, 0 replies; 28+ messages in thread
From: kernel test robot @ 2020-07-02  4:41 UTC (permalink / raw)
  To: Edward Cree, linux-net-drivers, davem; +Cc: kbuild-all, netdev

[-- Attachment #1: Type: text/plain, Size: 1179 bytes --]

Hi Edward,

I love your patch! Yet something to improve:

[auto build test ERROR on net-next/master]

url:    https://github.com/0day-ci/linux/commits/Edward-Cree/sfc-prerequisites-for-EF100-driver-part-3/20200701-225818
base:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 2b04a66156159592156a97553057e8c36de2ee70
config: parisc-allyesconfig (attached as .config)
compiler: hppa-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=parisc 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

>> hppa-linux-ld: drivers/net/ethernet/sfc/efx_channels.o:(.bss+0x0): multiple definition of `interrupt_mode'; drivers/scsi/esas2r/esas2r_main.o:(.data+0xa0): first defined here

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 65318 bytes --]

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH net-next 03/15] sfc: move modparam 'interrupt_mode' out of common channel code
@ 2020-07-02  4:41     ` kernel test robot
  0 siblings, 0 replies; 28+ messages in thread
From: kernel test robot @ 2020-07-02  4:41 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1207 bytes --]

Hi Edward,

I love your patch! Yet something to improve:

[auto build test ERROR on net-next/master]

url:    https://github.com/0day-ci/linux/commits/Edward-Cree/sfc-prerequisites-for-EF100-driver-part-3/20200701-225818
base:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 2b04a66156159592156a97553057e8c36de2ee70
config: parisc-allyesconfig (attached as .config)
compiler: hppa-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=parisc 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

>> hppa-linux-ld: drivers/net/ethernet/sfc/efx_channels.o:(.bss+0x0): multiple definition of `interrupt_mode'; drivers/scsi/esas2r/esas2r_main.o:(.data+0xa0): first defined here

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 65318 bytes --]

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH net-next 01/15] sfc: support setting MTU even if not privileged to configure MAC fully
  2020-07-01 23:16       ` Jakub Kicinski
@ 2020-07-02 12:52         ` Edward Cree
  0 siblings, 0 replies; 28+ messages in thread
From: Edward Cree @ 2020-07-02 12:52 UTC (permalink / raw)
  To: Jakub Kicinski; +Cc: linux-net-drivers, davem, netdev, Matthew Slattery

On 02/07/2020 00:16, Jakub Kicinski wrote:
> I see. I'm actually asking because of efx_ef10_set_udp_tnl_ports().
> I'd like to rewrite the UDP tunnel code so that 
> NETIF_F_RX_UDP_TUNNEL_PORT only appears on the interface if it 
> _really_ can do the offload. ef10 is the only driver I've seen where 
> I can't be sure what FW will say.. (other than liquidio, but that's 
> more of a kernel<->FW proxy than a driver, sigh).
I suppose it's time for me to describe the gory details ofhow EF10
 tunnel offloads work, then.  When changing the list of UDP tunnel
 ports, the MC patches the header-recogniser firmware and reboots
 the datapath CPUs (packet parsing on EF10 is done on a pair of
 DPCPUs with specialised instruction set extensions, and it wasn't
 originally designed with tunnel offloads in mind).  Unfortunately,
 to synchronise everything afterwards, the MC then has to reboot
 itself too.
Needless to say, this is fairly disruptive, especially as it's
 global across _both_ ports of a two-port NIC (which is what that
 EIO check in efx_ef10_set_udp_tnl_ports() is about: when you bring
 up a tunnel device, both netdevs get the ndo callback, the first
 one offloads the port, causing a reboot, which interrupts the
 second port's MCDI.  Once the MC comes back up, the second netdev
 tries again to offload the UDP port, and this time the MC only has
 to increase a refcount, since the first netdev already added that
 port, so it can return success without another reboot).

> Is there anything I can condition on there?
I _believe_ this is determined by another drv_attach flag,
 MC_CMD_DRV_ATTACH_EXT_OUT_FLAG_TRUSTED, but again I'm not 100%
 sure; it might be the PRIMARY flag instead.  I've CCed Matthew
 Slattery from our firmware team who should be able to answer.
It also depends on the VXLAN_NVGRE firmware capability, which
 efx_ef10_set_udp_tnl_ports() already checks.  Note that firmware
 capabilities can also change on an MC reboot (see the code that
 handles nic_data->must_check_datapath_caps).

-ed

^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2020-07-02 12:52 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-01 14:50 [PATCH net-next 00/15] sfc: prerequisites for EF100 driver, part 3 Edward Cree
2020-07-01 14:51 ` [PATCH net-next 01/15] sfc: support setting MTU even if not privileged to configure MAC fully Edward Cree
2020-07-01 19:03   ` Jakub Kicinski
2020-07-01 22:13     ` Edward Cree
2020-07-01 23:16       ` Jakub Kicinski
2020-07-02 12:52         ` Edward Cree
2020-07-01 14:51 ` [PATCH net-next 02/15] sfc: remove max_interrupt_mode Edward Cree
2020-07-01 14:52 ` [PATCH net-next 03/15] sfc: move modparam 'interrupt_mode' out of common channel code Edward Cree
2020-07-02  4:41   ` kernel test robot
2020-07-02  4:41     ` kernel test robot
2020-07-01 14:52 ` [PATCH net-next 04/15] sfc: move modparam 'rss_cpus' " Edward Cree
2020-07-01 14:52 ` [PATCH net-next 05/15] sfc: make tx_queues_per_channel variable at runtime Edward Cree
2020-07-01 14:53 ` [PATCH net-next 06/15] sfc: commonise netif_set_real_num[tr]x_queues calls Edward Cree
2020-07-01 19:05   ` Jakub Kicinski
2020-07-01 22:17     ` Edward Cree
2020-07-01 14:53 ` [PATCH net-next 07/15] sfc: assign TXQs without gaps Edward Cree
2020-07-01 14:53 ` [PATCH net-next 08/15] sfc: don't call tx_limit_len if NIC type doesn't have one Edward Cree
2020-07-01 14:54 ` [PATCH net-next 09/15] sfc: factor out efx_mcdi_filter_table_down() from _remove() Edward Cree
2020-07-01 14:54 ` [PATCH net-next 10/15] sfc: commonise efx_fini_dmaq Edward Cree
2020-07-01 14:54 ` [PATCH net-next 11/15] sfc: initialise RSS context ID to 'no RSS context' in efx_init_struct() Edward Cree
2020-07-01 14:55 ` [PATCH net-next 12/15] sfc_ef100: add EF100 to NIC-revision enumeration Edward Cree
2020-07-01 19:11   ` Jakub Kicinski
2020-07-01 19:44     ` David Miller
2020-07-01 22:23       ` Edward Cree
2020-07-01 22:33         ` David Miller
2020-07-01 14:55 ` [PATCH net-next 13/15] sfc_ef100: populate BUFFER_SIZE_BYTES in INIT_RXQ Edward Cree
2020-07-01 14:55 ` [PATCH net-next 14/15] sfc_ef100: NVRAM selftest support code Edward Cree
2020-07-01 14:56 ` [PATCH net-next 15/15] sfc_ef100: helper function to set default RSS table of given size Edward Cree

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.