]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: Add support for dynamically buffer reallocation
authorYunsheng Lin <linyunsheng@huawei.com>
Wed, 27 Sep 2017 01:45:24 +0000 (09:45 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 28 Sep 2017 17:35:11 +0000 (10:35 -0700)
commitd01e5ebe4e00a69217b87aac3b7f84352db20616
tree48d6c201ac9e18fa6fe94e291efe7fa40c66150d
parent23d8cb26ea57f18397cf54ddf525a8b5ac2a2d89
net: hns3: Add support for dynamically buffer reallocation

Current buffer allocation can only happen at init, when
doing buffer reallocation after init, care must be taken
care of memory which priv_buf points to.
This patch fixes it by using a dynamic allocated temporary
memory. Because we only do buffer reallocation at init or
when setting up the DCB parameter, and priv_buf is only
used at buffer allocation process, so it is ok to use a
dynamic allocated temporary memory.

Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h