From 765c9f46867c3253c02275cbb7a453f2eb56eda1 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Wed, 30 Jun 2010 05:06:28 +0000 Subject: sfc: Add support for RX flow hash control Allow ethtool to query the number of RX rings, the fields used in RX flow hashing and the hash indirection table. Allow ethtool to update the RX flow hash indirection table. Signed-off-by: Ben Hutchings Signed-off-by: David S. Miller --- drivers/net/sfc/efx.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers/net/sfc/efx.c') diff --git a/drivers/net/sfc/efx.c b/drivers/net/sfc/efx.c index 2a90bf9df91..35b3f2922e5 100644 --- a/drivers/net/sfc/efx.c +++ b/drivers/net/sfc/efx.c @@ -1121,6 +1121,7 @@ static void efx_set_channels(struct efx_nic *efx) static int efx_probe_nic(struct efx_nic *efx) { + size_t i; int rc; netif_dbg(efx, probe, efx->net_dev, "creating NIC\n"); @@ -1136,6 +1137,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_set_channels(efx); efx->net_dev->real_num_tx_queues = efx->n_tx_channels; -- cgit v1.2.3-18-g5258