summaryrefslogtreecommitdiffstats
path: root/samples/bpf/xdp_router_ipv4_user.c
Commit message (Collapse)AuthorAgeFilesLines
* samples/bpf: use bpf_set_link_xdp_fdEric Leblond2018-02-021-5/+5
| | | | | | | | Use bpf_set_link_xdp_fd instead of set_link_xdp_fd to remove some code duplication and benefit of netlink ext ack errors message. Signed-off-by: Eric Leblond <eric@regit.org> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
* xdp: sample: Missing curly braces in read_route()Dan Carpenter2017-11-141-2/+3
| | | | | | | | | | The assert statement is supposed to be part of the else branch but the curly braces were accidentally left off. Fixes: 3e29cd0e6563 ("xdp: Sample xdp program implementing ip forward") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* xdp: Sample xdp program implementing ip forwardChristina Jacob2017-11-081-0/+659
Implements port to port forwarding with route table and arp table lookup for ipv4 packets using bpf_redirect helper function and lpm_trie map. Signed-off-by: Christina Jacob <Christina.Jacob@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>