aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
diff options
context:
space:
mode:
authorliuzhongzhu <liuzhongzhu@huawei.com>2019-02-02 22:39:34 +0800
committerDavid S. Miller <davem@davemloft.net>2019-02-02 08:24:08 -0800
commitf9f07091b43e3a758bd197eb99ef5f011efce7fc (patch)
tree15785a6e497a5424ac25af6534b244d65eeb1bc3 /drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
parentnet: hns3: fix the problem that the supported port is empty (diff)
downloadlinux-dev-f9f07091b43e3a758bd197eb99ef5f011efce7fc.tar.xz
linux-dev-f9f07091b43e3a758bd197eb99ef5f011efce7fc.zip
net: hns3: optimize the maximum TC macro
Multiple macros with the largest number of TCs in the system, optimized to HCLGE_MAX_TC_NUM. Signed-off-by: liuzhongzhu <liuzhongzhu@huawei.com> Signed-off-by: Peng Li <lipeng321@huawei.com> Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
index 5f6fc23fab5d..f55835dee5c7 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
@@ -1331,7 +1331,7 @@ static int hclge_cmd_alloc_tx_buff(struct hclge_dev *hdev,
req = (struct hclge_tx_buff_alloc_cmd *)desc.data;
hclge_cmd_setup_basic_desc(&desc, HCLGE_OPC_TX_BUFF_ALLOC, 0);
- for (i = 0; i < HCLGE_TC_NUM; i++) {
+ for (i = 0; i < HCLGE_MAX_TC_NUM; i++) {
u32 buf_size = buf_alloc->priv_buf[i].tx_buf_size;
req->tx_pkt_buff[i] =