net: hns3: Add support for using order 1 pages with a 4K buffer
driver inclusion category: bugfix bugzilla: NA CVE: NA Hardware supports 512, 1024, 2048, 4096 rx buffer size, the rx buffer can not be reused because the hns3_page_order return 0 when page size and rx buffer size are both 4096. So this patch changes the hns3_page_order to return 1 when rx buffer is greater than half of the page size and page size is less the 8192, and dev_alloc_pages has already been used to allocate the compound page for rx buffer. This patch also changes hnae3_* to hns3_* for page order and rx buffer size calculation because they are used in hns3 module. Feature or Bugfix:Bugfix Signed-off-by: NYunsheng Lin <linyunsheng@huawei.com> Reviewed-by: Nlipeng <lipeng321@huawei.com> Reviewed-by: NYang Yingliang <yangyingliang@huawei.com> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
Showing
想要评论请 注册 或 登录