]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: add support for tc mqprio offload
authorJian Shen <shenjian15@huawei.com>
Thu, 10 Dec 2020 03:42:07 +0000 (11:42 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 10 Dec 2020 04:33:19 +0000 (20:33 -0800)
commit3fdd36666b6d7a7267203195d74debad338cfa87
tree026f55383fcee49ab9ac932aa92953a2fa749411
parente5aa1b1fabe29437b93ffec67cd049054840aa26
net: hns3: add support for tc mqprio offload

Currently, the HNS3 driver only supports offload for tc number
and prio_tc. This patch adds support for other qopts, including
queues count and offset for each tc.

When enable tc mqprio offload, it's not allowed to change
queue numbers by ethtool. For hardware limitation, the queue
number of each tc should be power of 2.

For the queues is not assigned to each tc by average, so it's
should return vport->alloc_tqps for hclge_get_max_channels().

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/hnae3.h
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_dcb.c
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c