]> git.proxmox.com Git - mirror_ubuntu-bionic-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)
commitd602a52540c9b92e0dd152cfe1d0848c23f08894
treeda8352640716efba6e7aa006cd5fc8059348c3ab
parentb8c8bf47da5576657370798da6f18a8cb0245d5b
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: 46a3df9f9718 ("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