diff options
author | Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp> | 2018-08-03 16:58:17 +0900 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2018-08-10 16:12:21 +0200 |
commit | d1396004dd868642ea2596abe058d96dcf97990f (patch) | |
tree | c008723e6af6ff7cf5754fba291fbe65a5d25ab8 /security | |
parent | 2539650fadbf63a431e76535a9de7bff6ea5e409 (diff) | |
download | linux-rt-d1396004dd868642ea2596abe058d96dcf97990f.tar.gz |
veth: Add XDP TX and REDIRECT
This allows further redirection of xdp_frames like
NIC -> veth--veth -> veth--veth
(XDP) (XDP) (XDP)
The intermediate XDP, redirecting packets from NIC to the other veth,
reuses xdp_mem_info from NIC so that page recycling of the NIC works on
the destination veth's XDP.
In this way return_frame is not fully guarded by NAPI, since another
NAPI handler on another cpu may use the same xdp_mem_info concurrently.
Thus disable napi_direct by xdp_set_return_frame_no_direct() during the
NAPI context.
v8:
- Don't use xdp_frame pointer address for data_hard_start of xdp_buff.
v4:
- Use xdp_[set|clear]_return_frame_no_direct() instead of a flag in
xdp_mem_info.
v3:
- Fix double free when veth_xdp_tx() returns a positive value.
- Convert xdp_xmit and xdp_redir variables into flags.
Signed-off-by: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'security')
0 files changed, 0 insertions, 0 deletions