]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: hns3: fix bug of ethtool_ops.get_channels for VF
authorHuazhong Tan <tanhuazhong@huawei.com>
Tue, 22 Jan 2019 23:39:32 +0000 (07:39 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 23 Jan 2019 19:13:01 +0000 (11:13 -0800)
commit8be7362186bd5ccb5f6f72be49751ad2778e2636
tree7613dc89f8104036735e78236e387e9bdd0bb65f
parent9e5157ba440f2bf87071c017545d6c4ba627e501
net: hns3: fix bug of ethtool_ops.get_channels for VF

The current code returns the number of all queues that can be used and
the number of queues that have been allocated, which is incorrect.
What should be returned is the number of queues allocated for each enabled
TC and the number of queues that can be allocated.

This patch fixes it.

Fixes: 849e46077689 ("net: hns3: add ethtool_ops.get_channels support for VF")
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c