]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: Fix for rx priv buf allocation when DCB is not supported
authorYunsheng Lin <linyunsheng@huawei.com>
Wed, 20 Sep 2017 10:52:55 +0000 (18:52 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 20 Sep 2017 23:15:39 +0000 (16:15 -0700)
commitc8d9d3538436970553e1f1c3f9489e4841cafe13
treeda8352640716efba6e7aa006cd5fc8059348c3ab
parentb081496f346869b8aa4de474313c2543d2ccafb4
net: hns3: Fix for rx priv buf allocation when DCB is not supported

When hdev doesn't support DCB, rx private buffer is not allocated,
otherwise there is not enough buffer for rx shared buffer, causing
buffer allocation process to fail.
This patch fixes by checking the dcb capability in
hclge_rx_buffer_calc.

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