]> git.baikalelectronics.ru Git - kernel.git/commit
samples/bpf: xdp_rxq_info action XDP_TX must adjust MAC-addrs
authorJesper Dangaard Brouer <brouer@redhat.com>
Mon, 25 Jun 2018 14:27:48 +0000 (16:27 +0200)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 28 Jun 2018 21:50:20 +0000 (23:50 +0200)
commitef0ecad35b24e15a2da5e9804732ceac99f4e981
treec71cfab13dad3b8bab03a29004d286dc514daf07
parent99d25c30e2f10b4545878fa82aa941cd2f794f0e
samples/bpf: xdp_rxq_info action XDP_TX must adjust MAC-addrs

XDP_TX requires also changing the MAC-addrs, else some hardware
may drop the TX packet before reaching the wire.  This was
observed with driver mlx5.

If xdp_rxq_info select --action XDP_TX the swapmac functionality
is activated.  It is also possible to manually enable via cmdline
option --swapmac.  This is practical if wanting to measure the
overhead of writing/updating payload for other action types.

Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk>
Acked-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
samples/bpf/xdp_rxq_info_kern.c
samples/bpf/xdp_rxq_info_user.c