aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc/siena.c
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2010-06-25 03:05:56 -0400
committerDavid S. Miller <davem@davemloft.net>2010-06-26 00:03:32 -0400
commit477e54eba4fd092704e50e65ade79463bd17fa85 (patch)
treecdef631b8e1e3a48578effbced82907026ef3ef8 /drivers/net/sfc/siena.c
parent5d3a6fca955c18b066f01233f9faeb351c0d966b (diff)
sfc: Use Toeplitz IPv4 hash for RSS and hash insertion
Insertion of the Falcon hash is unreliable. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/sfc/siena.c')
-rw-r--r--drivers/net/sfc/siena.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/net/sfc/siena.c b/drivers/net/sfc/siena.c
index 7fd258ce3c06..3fab030f8ab5 100644
--- a/drivers/net/sfc/siena.c
+++ b/drivers/net/sfc/siena.c
@@ -327,10 +327,19 @@ static int siena_init_nic(struct efx_nic *efx)
327 327
328 efx_reado(efx, &temp, FR_AZ_RX_CFG); 328 efx_reado(efx, &temp, FR_AZ_RX_CFG);
329 EFX_SET_OWORD_FIELD(temp, FRF_BZ_RX_DESC_PUSH_EN, 0); 329 EFX_SET_OWORD_FIELD(temp, FRF_BZ_RX_DESC_PUSH_EN, 0);
330 EFX_SET_OWORD_FIELD(temp, FRF_BZ_RX_HASH_INSRT_HDR, 1);
331 EFX_SET_OWORD_FIELD(temp, FRF_BZ_RX_INGR_EN, 1); 330 EFX_SET_OWORD_FIELD(temp, FRF_BZ_RX_INGR_EN, 1);
331 /* Enable hash insertion. This is broken for the 'Falcon' hash
332 * if IPv6 hashing is also enabled, so also select Toeplitz
333 * TCP/IPv4 and IPv4 hashes. */
334 EFX_SET_OWORD_FIELD(temp, FRF_BZ_RX_HASH_INSRT_HDR, 1);
335 EFX_SET_OWORD_FIELD(temp, FRF_BZ_RX_HASH_ALG, 1);
336 EFX_SET_OWORD_FIELD(temp, FRF_BZ_RX_IP_HASH, 1);
332 efx_writeo(efx, &temp, FR_AZ_RX_CFG); 337 efx_writeo(efx, &temp, FR_AZ_RX_CFG);
333 338
339 /* Set hash key for IPv4 */
340 memcpy(&temp, efx->rx_hash_key, sizeof(temp));
341 efx_writeo(efx, &temp, FR_BZ_RX_RSS_TKEY);
342
334 /* Enable IPv6 RSS */ 343 /* Enable IPv6 RSS */
335 BUILD_BUG_ON(sizeof(efx->rx_hash_key) < 344 BUILD_BUG_ON(sizeof(efx->rx_hash_key) <
336 2 * sizeof(temp) + FRF_CZ_RX_RSS_IPV6_TKEY_HI_WIDTH / 8 || 345 2 * sizeof(temp) + FRF_CZ_RX_RSS_IPV6_TKEY_HI_WIDTH / 8 ||