aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc/efx.c
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2010-06-30 01:06:28 -0400
committerDavid S. Miller <davem@davemloft.net>2010-06-30 17:10:04 -0400
commit765c9f46867c3253c02275cbb7a453f2eb56eda1 (patch)
tree42a2f70e2a9104c620849412d8f6ce91f30815f7 /drivers/net/sfc/efx.c
parenta5b6ee291e39e285e021cf251dbcf770c83cd74e (diff)
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 <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/sfc/efx.c')
-rw-r--r--drivers/net/sfc/efx.c3
1 files changed, 3 insertions, 0 deletions
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)
1121 1121
1122static int efx_probe_nic(struct efx_nic *efx) 1122static int efx_probe_nic(struct efx_nic *efx)
1123{ 1123{
1124 size_t i;
1124 int rc; 1125 int rc;
1125 1126
1126 netif_dbg(efx, probe, efx->net_dev, "creating NIC\n"); 1127 netif_dbg(efx, probe, efx->net_dev, "creating NIC\n");
@@ -1136,6 +1137,8 @@ static int efx_probe_nic(struct efx_nic *efx)
1136 1137
1137 if (efx->n_channels > 1) 1138 if (efx->n_channels > 1)
1138 get_random_bytes(&efx->rx_hash_key, sizeof(efx->rx_hash_key)); 1139 get_random_bytes(&efx->rx_hash_key, sizeof(efx->rx_hash_key));
1140 for (i = 0; i < ARRAY_SIZE(efx->rx_indir_table); i++)
1141 efx->rx_indir_table[i] = i % efx->n_rx_channels;
1139 1142
1140 efx_set_channels(efx); 1143 efx_set_channels(efx);
1141 efx->net_dev->real_num_tx_queues = efx->n_tx_channels; 1144 efx->net_dev->real_num_tx_queues = efx->n_tx_channels;