diff options
author | Yunsheng Lin <[email protected]> | 2021-06-16 14:36:13 +0800 |
---|---|---|
committer | David S. Miller <[email protected]> | 2021-06-16 00:36:06 -0700 |
commit | 907676b130711fd1f627824559e92259db2061d1 (patch) | |
tree | b5a7a41d1f7c3194ea21d216aa2b716d53078ef5 /tools/testing/selftests/bpf/prog_tests/autoload.c | |
parent | 8677d78c3d860c156ccd335e2b97728298c2cbb1 (diff) |
net: hns3: use tx bounce buffer for small packets
when the packet or frag size is small, it causes both security and
performance issue. As dma can't map sub-page, this means some extra
kernel data is visible to devices. On the other hand, the overhead
of dma map and unmap is huge when IOMMU is on.
So add a queue based tx shared bounce buffer to memcpy the small
packet when the len of the xmitted skb is below tx_copybreak.
Add tx_spare_buf_size module param to set the size of tx spare
buffer, and add set/get_tunable to set or query the tx_copybreak.
The throughtput improves from 30 Gbps to 90+ Gbps when running 16
netperf threads with 32KB UDP message size when IOMMU is in the
strict mode(tx_copybreak = 2000 and mtu = 1500).
Suggested-by: Barry Song <[email protected]>
Signed-off-by: Yunsheng Lin <[email protected]>
Signed-off-by: Guangbin Huang <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/autoload.c')
0 files changed, 0 insertions, 0 deletions