]> git.baikalelectronics.ru Git - kernel.git/commit
samples: bpf: make the use of xdp samples consistent
authorDaniel T. Lee <danieltimlee@gmail.com>
Tue, 25 Jun 2019 00:55:36 +0000 (09:55 +0900)
committerDaniel Borkmann <daniel@iogearbox.net>
Wed, 26 Jun 2019 13:39:15 +0000 (15:39 +0200)
commite2f4db41c6bfa3920a3b1130bb70626fea23905d
treef34d75c6853c4d0f6e968f6792710c5f74217821
parent600c9d545f8dfe7cf7cc6d64ebf7a775ad83592b
samples: bpf: make the use of xdp samples consistent

Currently, each xdp samples are inconsistent in the use.
Most of the samples fetch the interface with it's name.
(ex. xdp1, xdp2skb, xdp_redirect_cpu, xdp_sample_pkts, etc.)

But some of the xdp samples are fetching the interface with
ifindex by command argument.

This commit enables xdp samples to fetch interface with it's name
without changing the original index interface fetching.
(<ifname|ifindex> fetching in the same way as xdp_sample_pkts_user.c does.)

Signed-off-by: Daniel T. Lee <danieltimlee@gmail.com>
Acked-by: Toke Høiland-Jørgensen <toke@redhat.com>
Acked-by: Jesper Dangaard Brouer <brouer@redhat.com>
Acked-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
samples/bpf/xdp_adjust_tail_user.c
samples/bpf/xdp_redirect_map_user.c
samples/bpf/xdp_redirect_user.c
samples/bpf/xdp_tx_iptunnel_user.c