]> git.itanic.dy.fi Git - linux-stable/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)
commitaea8cfb35a82d6c2f3517c86694933ba766635e5
tree08917cf45897fbfa359e13f60f39339713ab6b3f
parent71c5e83bcf1e795e28a9dae6b1e74095452bf26e
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: cacde272dd00 ("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