Commit 30972a4e authored by Jakub Kicinski's avatar Jakub Kicinski
Browse files

Merge branch 'ethtool-track-custom-rss-contexts-in-the-core'

Edward Cree says:

====================
ethtool: track custom RSS contexts in the core

Make the core responsible for tracking the set of custom RSS contexts,
 their IDs, indirection tables, hash keys, and hash functions; this
 lets us get rid of duplicative code in drivers, and will allow us to
 support netlink dumps later.

This series only moves the sfc EF10 & EF100 driver over to the new API;
 other drivers (mvpp2, octeontx2, mlx5, sfc/siena, bnxt_en) can be converted
 afterwards and the legacy API removed.
====================

Link: https://patch.msgid.link/cover.1719502239.git.ecree.xilinx@gmail.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents c2dd2139 b859316e
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1608,7 +1608,7 @@ static void __rtl8169_set_wol(struct rtl8169_private *tp, u32 wolopts)

	if (!tp->dash_enabled) {
		rtl_set_d3_pll_down(tp, !wolopts);
		tp->dev->wol_enabled = wolopts ? 1 : 0;
		tp->dev->ethtool->wol_enabled = wolopts ? 1 : 0;
	}
}

@@ -5478,7 +5478,7 @@ static int rtl_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
		rtl_set_d3_pll_down(tp, true);
	} else {
		rtl_set_d3_pll_down(tp, false);
		dev->wol_enabled = 1;
		dev->ethtool->wol_enabled = 1;
	}

	jumbo_max = rtl_jumbo_max(tp);
+1 −1
Original line number Diff line number Diff line
@@ -1396,7 +1396,7 @@ static void efx_ef10_table_reset_mc_allocations(struct efx_nic *efx)
	efx_mcdi_filter_table_reset_mc_allocations(efx);
	nic_data->must_restore_piobufs = true;
	efx_ef10_forget_old_piobufs(efx);
	efx->rss_context.context_id = EFX_MCDI_RSS_CONTEXT_INVALID;
	efx->rss_context.priv.context_id = EFX_MCDI_RSS_CONTEXT_INVALID;

	/* Driver-created vswitches and vports must be re-created */
	nic_data->must_probe_vswitching = true;
+4 −0
Original line number Diff line number Diff line
@@ -59,8 +59,12 @@ const struct ethtool_ops ef100_ethtool_ops = {

	.get_rxfh_indir_size	= efx_ethtool_get_rxfh_indir_size,
	.get_rxfh_key_size	= efx_ethtool_get_rxfh_key_size,
	.rxfh_priv_size		= sizeof(struct efx_rss_context_priv),
	.get_rxfh		= efx_ethtool_get_rxfh,
	.set_rxfh		= efx_ethtool_set_rxfh,
	.create_rxfh_context	= efx_ethtool_create_rxfh_context,
	.modify_rxfh_context	= efx_ethtool_modify_rxfh_context,
	.remove_rxfh_context	= efx_ethtool_remove_rxfh_context,

	.get_module_info	= efx_ethtool_get_module_info,
	.get_module_eeprom	= efx_ethtool_get_module_eeprom,
+1 −1
Original line number Diff line number Diff line
@@ -299,7 +299,7 @@ static int efx_probe_nic(struct efx_nic *efx)
	if (efx->n_channels > 1)
		netdev_rss_key_fill(efx->rss_context.rx_hash_key,
				    sizeof(efx->rss_context.rx_hash_key));
	efx_set_default_rx_indir_table(efx, &efx->rss_context);
	efx_set_default_rx_indir_table(efx, efx->rss_context.rx_indir_table);

	/* Initialise the interrupt moderation settings */
	efx->irq_mod_step_us = DIV_ROUND_UP(efx->timer_quantum_ns, 1000);
+1 −1
Original line number Diff line number Diff line
@@ -158,7 +158,7 @@ static inline s32 efx_filter_get_rx_ids(struct efx_nic *efx,
}

/* RSS contexts */
static inline bool efx_rss_active(struct efx_rss_context *ctx)
static inline bool efx_rss_active(struct efx_rss_context_priv *ctx)
{
	return ctx->context_id != EFX_MCDI_RSS_CONTEXT_INVALID;
}
Loading