aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c
diff options
context:
space:
mode:
authorYunsheng Lin <linyunsheng@huawei.com>2021-06-16 14:36:16 +0800
committerDavid S. Miller <davem@davemloft.net>2021-06-16 00:36:06 -0700
commitfa7711b888f24ee9291d90f8fbdaccfc80ed72c7 (patch)
tree760bc9d375ca5b78ab244c9c1eddd10f1a96d283 /drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c
parentnet: hns3: support dma_map_sg() for multi frags skb (diff)
downloadlinux-dev-fa7711b888f24ee9291d90f8fbdaccfc80ed72c7.tar.xz
linux-dev-fa7711b888f24ee9291d90f8fbdaccfc80ed72c7.zip
net: hns3: optimize the rx page reuse handling process
Current rx page offset only reset to zero when all the below conditions are satisfied: 1. rx page is only owned by driver. 2. rx page is reusable. 3. the page offset that is above to be given to the stack has reached the end of the page. If the page offset is over the hns3_buf_size(), it means the buffer below the offset of the page is usable when the above condition 1 & 2 are satisfied, so page offset can be reset to zero instead of increasing the offset. We may be able to always reuse the first 4K buffer of a 64K page, which means we can limit the hot buffer size as much as possible. The above optimization is a side effect when refacting the rx page reuse handling in order to support the rx copybreak. Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com> Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c')
0 files changed, 0 insertions, 0 deletions