linux-stable/tools/testing/selftests/bpf/progs/test_xdp_link.c
Andrii Nakryiko fe48230cf2 selftests/bpf: Add BPF XDP link selftests
Add selftest validating all the attachment logic around BPF XDP link. Test
also link updates and get_obj_info() APIs.

Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20200722064603.3350758-9-andriin@fb.com
2020-07-25 20:37:02 -07:00

12 lines
233 B
C

// SPDX-License-Identifier: GPL-2.0
/* Copyright (c) 2020 Facebook */
#include <linux/bpf.h>
#include <bpf/bpf_helpers.h>
char LICENSE[] SEC("license") = "GPL";
SEC("xdp/handler")
int xdp_handler(struct xdp_md *xdp)
{
return 0;
}