]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
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)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Mon, 14 Jan 2019 09:28:55 +0000 (09:28 +0000)
commit023a793fd2d4acb378921f2cc91736638e6eae35
treedb016b7ea0700d19e05a7b2490ee42d5cbbd5e9c
parent626cb23bf9bedf4ec21da4feb705046205bc0712
net: hns3: fix the descriptor index when get rss type

BugLink: https://bugs.launchpad.net/bugs/1810457
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: 232fc64b6e62 ("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>
(cherry picked from commit 31a16f99e02c2e0b40a5fb05d66f5e56721027e2)
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c