]> git.baikalelectronics.ru Git - kernel.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)
commite4cda40ecf04aa34910cd031dc5d7ddf5d6c5e0b
tree7613dc89f8104036735e78236e387e9bdd0bb65f
parent4e8c50289ee2d6083d96e7da9cd9b003196a8c90
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: c8e127aba473 ("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