diff options
author | Ron Mercer <ron.mercer@qlogic.com> | 2009-10-08 05:54:37 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-10-09 01:54:42 -0400 |
commit | 541ae28c2df91e805c6df924a8e8522c2602db47 (patch) | |
tree | 9db5933351d1538b8556cdfa82516489dc27bd95 /drivers/net/qlge/qlge_main.c | |
parent | 67972e0c238fa802580b5919f11e1de3da5179da (diff) |
qlge: Fix RSS hashing values.
Fix RX queue table size and change from random to default hash values.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/qlge/qlge_main.c')
-rw-r--r-- | drivers/net/qlge/qlge_main.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/drivers/net/qlge/qlge_main.c b/drivers/net/qlge/qlge_main.c index 61680715cde0..04fc7117ce49 100644 --- a/drivers/net/qlge/qlge_main.c +++ b/drivers/net/qlge/qlge_main.c | |||
@@ -3077,6 +3077,12 @@ err_irq: | |||
3077 | 3077 | ||
3078 | static int ql_start_rss(struct ql_adapter *qdev) | 3078 | static int ql_start_rss(struct ql_adapter *qdev) |
3079 | { | 3079 | { |
3080 | u8 init_hash_seed[] = {0x6d, 0x5a, 0x56, 0xda, 0x25, 0x5b, 0x0e, 0xc2, | ||
3081 | 0x41, 0x67, 0x25, 0x3d, 0x43, 0xa3, 0x8f, | ||
3082 | 0xb0, 0xd0, 0xca, 0x2b, 0xcb, 0xae, 0x7b, | ||
3083 | 0x30, 0xb4, 0x77, 0xcb, 0x2d, 0xa3, 0x80, | ||
3084 | 0x30, 0xf2, 0x0c, 0x6a, 0x42, 0xb7, 0x3b, | ||
3085 | 0xbe, 0xac, 0x01, 0xfa}; | ||
3080 | struct ricb *ricb = &qdev->ricb; | 3086 | struct ricb *ricb = &qdev->ricb; |
3081 | int status = 0; | 3087 | int status = 0; |
3082 | int i; | 3088 | int i; |
@@ -3086,21 +3092,17 @@ static int ql_start_rss(struct ql_adapter *qdev) | |||
3086 | 3092 | ||
3087 | ricb->base_cq = RSS_L4K; | 3093 | ricb->base_cq = RSS_L4K; |
3088 | ricb->flags = | 3094 | ricb->flags = |
3089 | (RSS_L6K | RSS_LI | RSS_LB | RSS_LM | RSS_RI4 | RSS_RI6 | RSS_RT4 | | 3095 | (RSS_L6K | RSS_LI | RSS_LB | RSS_LM | RSS_RT4 | RSS_RT6); |
3090 | RSS_RT6); | 3096 | ricb->mask = cpu_to_le16((u16)(0x3ff)); |
3091 | ricb->mask = cpu_to_le16(qdev->rss_ring_count - 1); | ||
3092 | 3097 | ||
3093 | /* | 3098 | /* |
3094 | * Fill out the Indirection Table. | 3099 | * Fill out the Indirection Table. |
3095 | */ | 3100 | */ |
3096 | for (i = 0; i < 256; i++) | 3101 | for (i = 0; i < 1024; i++) |
3097 | hash_id[i] = i & (qdev->rss_ring_count - 1); | 3102 | hash_id[i] = (i & (qdev->rss_ring_count - 1)); |
3098 | 3103 | ||
3099 | /* | 3104 | memcpy((void *)&ricb->ipv6_hash_key[0], init_hash_seed, 40); |
3100 | * Random values for the IPv6 and IPv4 Hash Keys. | 3105 | memcpy((void *)&ricb->ipv4_hash_key[0], init_hash_seed, 16); |
3101 | */ | ||
3102 | get_random_bytes((void *)&ricb->ipv6_hash_key[0], 40); | ||
3103 | get_random_bytes((void *)&ricb->ipv4_hash_key[0], 16); | ||
3104 | 3106 | ||
3105 | QPRINTK(qdev, IFUP, DEBUG, "Initializing RSS.\n"); | 3107 | QPRINTK(qdev, IFUP, DEBUG, "Initializing RSS.\n"); |
3106 | 3108 | ||