]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 13 Dec 2019 07:48:45 +0000 (08:48 +0100)
commit8e5e98f908c687d309b7de8ae295e03de977d40a
treedefa4cc8f2f192d7789d929d00922e23509cdb15
parent3b735f5f62aae1b53edd8d0e57f3fd3b4cf31abd
net: hns3: reallocate SSU' buffer size when pfc_en changes

[ Upstream commit aea8cfb35a82d6c2f3517c86694933ba766635e5 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_dcb.c