]> 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)
commitbbad90c935092bf26de92beeed55db6399c91c80
tree08917cf45897fbfa359e13f60f39339713ab6b3f
parentb733412b575d2eed3ebff22bae968e8c79cd2f66
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: f5bf9f59ecf3 ("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