]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: reallocate SSU' buffer size when pfc_en changes
authorYunsheng Lin <linyunsheng@huawei.com>
Thu, 14 Nov 2019 02:32:40 +0000 (10:32 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 15 Nov 2019 02:06:34 +0000 (18:06 -0800)
commite56f707762fef14b863b5e3e2ca993a629823634
tree08917cf45897fbfa359e13f60f39339713ab6b3f
parent213d1c05a948107f82e0ef6e7d7750bfa583f8d6
net: hns3: reallocate SSU' buffer size when pfc_en changes

When a TC's PFC is disabled or enabled, the RX private buffer for
this TC need to be changed too, otherwise this may cause packet
dropped problem.

This patch fixes it by calling hclge_buffer_alloc to reallocate
buffer when pfc_en changes.

Fixes: 0eda0d74aa27 ("net: hns3: Add hclge_dcb module for the support of DCB feature")
Signed-off-by: Yunsheng Lin <linyunsheng@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