]> asedeno.scripts.mit.edu Git - linux.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)
commit509fda105ba8f9a1a5c6f8b79e4c7fc50b35c1e3
treec71cfab13dad3b8bab03a29004d286dc514daf07
parent0d25c43ab988766ad52ff2930af3bf47d92c20ac
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