]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: fix the descriptor index when get rss type
authorPeng Li <lipeng321@huawei.com>
Thu, 20 Dec 2018 03:52:05 +0000 (11:52 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 20 Dec 2018 07:47:59 +0000 (23:47 -0800)
commit307b10c26f4685e0b8f95663dcd4d1d0b234da22
tree9137713e33a8ba7c136705d1116e9252ec53701f
parent9ae803e8c9ef8934faabfaec097641c01f77efdf
net: hns3: fix the descriptor index when get rss type

Driver gets rss information from the last descriptor of the packet.
When driver handle the rss type, ring->next_to_clean indicates the
first descriptor of next packet.

This patch fix the descriptor index with "ring->next_to_clean - 1".

Fixes: 52f0133a4b0f ("net: hns3: Add HW RSS hash information to RX skb")
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c