]> git.baikalelectronics.ru Git - kernel.git/commit
mlx5: fix bug reading rss_hash_type from CQE
authorJesper Dangaard Brouer <brouer@redhat.com>
Mon, 22 May 2017 18:13:07 +0000 (20:13 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 23 May 2017 15:03:31 +0000 (11:03 -0400)
commit568cf36e6992cc97ca82b5d8ca82cbe457f99ec0
tree2f34453038bbccd9cea3cb0bce8ec21ce655d43d
parent8f9f7d1e7f9af13ec0e6ead509e90ad3df81ac58
mlx5: fix bug reading rss_hash_type from CQE

Masks for extracting part of the Completion Queue Entry (CQE)
field rss_hash_type was swapped, namely CQE_RSS_HTYPE_IP and
CQE_RSS_HTYPE_L4.

The bug resulted in setting skb->l4_hash, even-though the
rss_hash_type indicated that hash was NOT computed over the
L4 (UDP or TCP) part of the packet.

Added comments from the datasheet, to make it more clear what
these masks are selecting.

Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Acked-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/mlx5/device.h