diff options
author | Xuan Zhuo <xuanzhuo@linux.alibaba.com> | 2021-02-18 23:50:45 +0300 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2021-02-25 02:56:43 +0300 |
commit | 9c8f21e6f8856a96634e542a58ef3abf27486801 (patch) | |
tree | 2016fb3ace16bc5237d695000406c793d442f4cb /kernel/bpf/bpf_task_storage.c | |
parent | 3914d88f7608e6c2e80e344474fa289370c32451 (diff) | |
download | linux-9c8f21e6f8856a96634e542a58ef3abf27486801.tar.xz |
xsk: Build skb by page (aka generic zerocopy xmit)
This patch is used to construct skb based on page to save memory copy
overhead.
This function is implemented based on IFF_TX_SKB_NO_LINEAR. Only the
network card priv_flags supports IFF_TX_SKB_NO_LINEAR will use page to
directly construct skb. If this feature is not supported, it is still
necessary to copy data to construct skb.
---------------- Performance Testing ------------
The test environment is Aliyun ECS server.
Test cmd:
```
xdpsock -i eth0 -t -S -s <msg size>
```
Test result data:
size 64 512 1024 1500
copy 1916747 1775988 1600203 1440054
page 1974058 1953655 1945463 1904478
percent 3.0% 10.0% 21.58% 32.3%
Signed-off-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
Signed-off-by: Alexander Lobakin <alobakin@pm.me>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Reviewed-by: Dust Li <dust.li@linux.alibaba.com>
Acked-by: Magnus Karlsson <magnus.karlsson@intel.com>
Acked-by: John Fastabend <john.fastabend@gmail.com>
Link: https://lore.kernel.org/bpf/20210218204908.5455-6-alobakin@pm.me
Diffstat (limited to 'kernel/bpf/bpf_task_storage.c')
0 files changed, 0 insertions, 0 deletions