OSDN Git Service

net: hns3: fix incorrect handling of sctp6 rss tuple
authorJian Shen <shenjian15@huawei.com>
Tue, 5 Jan 2021 03:37:28 +0000 (11:37 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 6 Jan 2021 00:46:41 +0000 (16:46 -0800)
commitab6e32d2913a594bc8f822ce4a75c400190b2ecc
treee357e2d2c4687a74320fa0512ccdffc0212e729c
parent65e61e3c2a619c4d4b873885b2d5394025ed117b
net: hns3: fix incorrect handling of sctp6 rss tuple

For DEVICE_VERSION_V2, the hardware only supports src-ip,
dst-ip and verification-tag for rss tuple set of sctp6
packet. For DEVICE_VERSION_V3, the hardware supports
src-port and dst-port as well.

Currently, when user queries the sctp6 rss tuples info,
some unsupported information will be showed on V2. So add
a check for hardware version when initializing and queries
sctp6 rss tuple to fix this issue.

Fixes: 46a3df9f9718 ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support")
Signed-off-by: Jian Shen <shenjian15@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.h