]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: Fix for packet buffer setting bug
authorYunsheng Lin <linyunsheng@huawei.com>
Wed, 26 Sep 2018 18:28:36 +0000 (19:28 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 28 Sep 2018 17:37:42 +0000 (10:37 -0700)
commit8c3d979940e1451f9ecc542d9e6671fb3a03d8d5
tree1b11cc00c0188bfc555df73c0dab4d3110099661
parent19c1eda2f58cb255701307155df4b5c8bae27fbe
net: hns3: Fix for packet buffer setting bug

The hardware expects a unit of 128 bytes when setting
packet buffer. When calculating the packet buffer size,
hclge_rx_buffer_calc does not round up the size as a unit
of 128 byte, which may casue packet lost problem when stress
testing.

This patch fixes it by rounding up packet size when calculating.

Fixes: 22c0e2ce21dd ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support")
Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c