diff options
author | Yunsheng Lin <linyunsheng@huawei.com> | 2021-06-16 09:36:15 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-06-16 10:36:06 +0300 |
commit | 7459775e9f658a2d5f3ff9d4d087e86f4d4e5b83 (patch) | |
tree | 3bb90da3012bca45f572fa62565a2c7d4870c9b5 /drivers/irqchip/irq-st.c | |
parent | 1a00197b7d2fe57f0be93037d5090e19a9b178c8 (diff) | |
download | linux-7459775e9f658a2d5f3ff9d4d087e86f4d4e5b83.tar.xz |
net: hns3: support dma_map_sg() for multi frags skb
Using the queue based tx buffer, it is also possible to allocate a
sgl buffer, and use skb_to_sgvec() to convert the skb to the sgvec
in order to support the dma_map_sg() to decreases the overhead of
IOMMU mapping and unmapping.
Firstly, it reduces the number of buffers. For example, a tcp skb
may have a 66-byte header and 3 fragments of 4328, 32768, and 28064
bytes. With this patch, dma_map_sg() will combine them into two
buffers, 66-bytes header and one 65160-bytes fragment by using IOMMU.
Secondly, it reduces the number of dma mapping and unmapping. All the
original 4 buffers are mapped only once rather than 4 times.
The throughput improves above 10% when running single thread of iperf
using TCP when IOMMU is in strict mode.
Suggested-by: Barry Song <song.bao.hua@hisilicon.com>
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/irqchip/irq-st.c')
0 files changed, 0 insertions, 0 deletions