aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Chan <mchan@broadcom.com>2015-11-05 16:25:48 -0500
committerDavid S. Miller <davem@davemloft.net>2015-11-05 16:33:08 -0500
commit614388ce39f3d61ad7f95db65f409d35d5943616 (patch)
tree49e7deb7fb3a077b4fc75bf60dd798ef0a582ad1
parentc5d7774db350e77f2506e36e1797c958d1b118c8 (diff)
bnxt_en: Determine tcp/ipv6 RSS hash type correctly.
The profile ID in the completion record needs to be ANDed with the profile ID mask of 0x1f. This bug was causing the SKB hash type and the gso_type to be wrong in some cases. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/broadcom/bnxt/bnxt.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.h b/drivers/net/ethernet/broadcom/bnxt/bnxt.h
index 4cae4928b27c..5afe65d1316b 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.h
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.h
@@ -166,9 +166,11 @@ struct rx_cmp {
166#define RX_CMP_HASH_VALID(rxcmp) \ 166#define RX_CMP_HASH_VALID(rxcmp) \
167 ((rxcmp)->rx_cmp_len_flags_type & cpu_to_le32(RX_CMP_FLAGS_RSS_VALID)) 167 ((rxcmp)->rx_cmp_len_flags_type & cpu_to_le32(RX_CMP_FLAGS_RSS_VALID))
168 168
169#define RSS_PROFILE_ID_MASK 0x1f
170
169#define RX_CMP_HASH_TYPE(rxcmp) \ 171#define RX_CMP_HASH_TYPE(rxcmp) \
170 ((le32_to_cpu((rxcmp)->rx_cmp_misc_v1) & RX_CMP_RSS_HASH_TYPE) >>\ 172 (((le32_to_cpu((rxcmp)->rx_cmp_misc_v1) & RX_CMP_RSS_HASH_TYPE) >>\
171 RX_CMP_RSS_HASH_TYPE_SHIFT) 173 RX_CMP_RSS_HASH_TYPE_SHIFT) & RSS_PROFILE_ID_MASK)
172 174
173struct rx_cmp_ext { 175struct rx_cmp_ext {
174 __le32 rx_cmp_flags2; 176 __le32 rx_cmp_flags2;
@@ -282,9 +284,9 @@ struct rx_tpa_start_cmp {
282 cpu_to_le32(RX_TPA_START_CMP_FLAGS_RSS_VALID)) 284 cpu_to_le32(RX_TPA_START_CMP_FLAGS_RSS_VALID))
283 285
284#define TPA_START_HASH_TYPE(rx_tpa_start) \ 286#define TPA_START_HASH_TYPE(rx_tpa_start) \
285 ((le32_to_cpu((rx_tpa_start)->rx_tpa_start_cmp_misc_v1) & \ 287 (((le32_to_cpu((rx_tpa_start)->rx_tpa_start_cmp_misc_v1) & \
286 RX_TPA_START_CMP_RSS_HASH_TYPE) >> \ 288 RX_TPA_START_CMP_RSS_HASH_TYPE) >> \
287 RX_TPA_START_CMP_RSS_HASH_TYPE_SHIFT) 289 RX_TPA_START_CMP_RSS_HASH_TYPE_SHIFT) & RSS_PROFILE_ID_MASK)
288 290
289#define TPA_START_AGG_ID(rx_tpa_start) \ 291#define TPA_START_AGG_ID(rx_tpa_start) \
290 ((le32_to_cpu((rx_tpa_start)->rx_tpa_start_cmp_misc_v1) & \ 292 ((le32_to_cpu((rx_tpa_start)->rx_tpa_start_cmp_misc_v1) & \