ethtool: Define and apply a default policy for RX flow hash indirection
All drivers that support modification of the RX flow hash indirection table initialise it in the same way: RX rings are assigned to table entries in rotation. Make that default policy explicit by having them call a ethtool_rxfh_indir_default() function. In the ethtool core, add support for a zero size value for ETHTOOL_SRXFHINDIR, which resets the table to this default. Partly-suggested-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Acked-by: Shreyas N Bhatewara <sbhatewara@vmware.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
7850f63f16
commit
278bc4296b
@@ -1336,7 +1336,8 @@ static int efx_probe_nic(struct efx_nic *efx)
|
||||
if (efx->n_channels > 1)
|
||||
get_random_bytes(&efx->rx_hash_key, sizeof(efx->rx_hash_key));
|
||||
for (i = 0; i < ARRAY_SIZE(efx->rx_indir_table); i++)
|
||||
efx->rx_indir_table[i] = i % efx->n_rx_channels;
|
||||
efx->rx_indir_table[i] =
|
||||
ethtool_rxfh_indir_default(i, efx->n_rx_channels);
|
||||
|
||||
efx_set_channels(efx);
|
||||
netif_set_real_num_tx_queues(efx->net_dev, efx->n_tx_channels);
|
||||
|
Reference in New Issue
Block a user