net: hns3: fix PFC not setting problem for DCB module
authorYunsheng Lin <linyunsheng@huawei.com>
Tue, 22 Jan 2019 23:39:38 +0000 (07:39 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 23 Jan 2019 19:13:02 +0000 (11:13 -0800)
commitd3ad430ac531e65f29c9737f86744c425c9173ef
tree318daaa72439c31e1dd3c7c3e970e9c2f1ebe685
parentd174ea75c96a12287354af53dc17cb24f328f90a
net: hns3: fix PFC not setting problem for DCB module

The PFC enabling is based on user priority, currently it is
based on TC, which may cause PFC not setting correctly when pri
to TC mapping is not one to one relation.

This patch adds pfc_en in tm_info to fix it.

Fixes: cacde272dd00 ("net: hns3: Add hclge_dcb module for the support of DCB feature")
Signed-off-by: Yunsheng Lin <linyunsheng@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>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_dcb.c
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c