bpf_tc_hook
LIBBPF_API int bpf_tc_hook_create(struct bpf_tc_hook *hook);
LIBBPF_API int bpf_tc_hook_destroy(struct bpf_tc_hook *hook);
LIBBPF_API int bpf_tc_attach(const struct bpf_tc_hook *hook,
LIBBPF_API int bpf_tc_detach(const struct bpf_tc_hook *hook,
LIBBPF_API int bpf_tc_query(const struct bpf_tc_hook *hook,
typedef int (*qdisc_config_t)(struct libbpf_nla_req *req, const struct bpf_tc_hook *hook);
static int clsact_config(struct libbpf_nla_req *req, const struct bpf_tc_hook *hook)
static int qdisc_config(struct libbpf_nla_req *req, const struct bpf_tc_hook *hook)
static int attach_point_to_config(struct bpf_tc_hook *hook,
static int tc_qdisc_modify(struct bpf_tc_hook *hook, int cmd, int flags)
static int tc_qdisc_create_excl(struct bpf_tc_hook *hook)
static int tc_qdisc_delete(struct bpf_tc_hook *hook)
int bpf_tc_hook_create(struct bpf_tc_hook *hook)
if (!hook || !OPTS_VALID(hook, bpf_tc_hook) ||
static int __bpf_tc_detach(const struct bpf_tc_hook *hook,
int bpf_tc_hook_destroy(struct bpf_tc_hook *hook)
if (!hook || !OPTS_VALID(hook, bpf_tc_hook) ||
int bpf_tc_attach(const struct bpf_tc_hook *hook, struct bpf_tc_opts *opts)
!OPTS_VALID(hook, bpf_tc_hook) ||
static int __bpf_tc_detach(const struct bpf_tc_hook *hook,
!OPTS_VALID(hook, bpf_tc_hook) ||
int bpf_tc_detach(const struct bpf_tc_hook *hook,
int bpf_tc_query(const struct bpf_tc_hook *hook, struct bpf_tc_opts *opts)
!OPTS_VALID(hook, bpf_tc_hook) ||
DECLARE_LIBBPF_OPTS(bpf_tc_hook, hook, .ifindex = ifindex,
DECLARE_LIBBPF_OPTS(bpf_tc_hook, tc_hook,
DECLARE_LIBBPF_OPTS(bpf_tc_hook, hook, .ifindex = LO_IFINDEX,
DECLARE_LIBBPF_OPTS(bpf_tc_hook, hook, .ifindex = LO_IFINDEX,
DECLARE_LIBBPF_OPTS(bpf_tc_hook, hook,
LIBBPF_OPTS(bpf_tc_hook, qdisc_lo, .attach_point = BPF_TC_INGRESS);
struct bpf_tc_hook qdisc;
LIBBPF_OPTS(bpf_tc_hook, qdisc_hook, .attach_point = BPF_TC_EGRESS);
LIBBPF_OPTS(bpf_tc_hook, qdisc_hook, .attach_point = BPF_TC_EGRESS);
static int test_tc_bpf_basic(const struct bpf_tc_hook *hook, int fd)
DECLARE_LIBBPF_OPTS(bpf_tc_hook, hook, .ifindex = LO_IFINDEX,
static int test_tc_bpf_api(struct bpf_tc_hook *hook, int fd)
DECLARE_LIBBPF_OPTS(bpf_tc_hook, inv_hook, .attach_point = BPF_TC_INGRESS);
LIBBPF_OPTS(bpf_tc_hook, tc_hook, .ifindex = loopback);
LIBBPF_OPTS(bpf_tc_hook, tc_hook,
LIBBPF_OPTS(bpf_tc_hook, tc_hook);
LIBBPF_OPTS(bpf_tc_hook, tc_hook, .ifindex = loopback);
LIBBPF_OPTS(bpf_tc_hook, tc_hook, .ifindex = loopback);
LIBBPF_OPTS(bpf_tc_hook, tc_hook, .ifindex = loopback);
LIBBPF_OPTS(bpf_tc_hook, tc_hook, .ifindex = loopback);
LIBBPF_OPTS(bpf_tc_hook, qdisc_tun_fwd);
LIBBPF_OPTS(bpf_tc_hook, qdisc_dst_fwd);
static int qdisc_clsact_create(struct bpf_tc_hook *qdisc_hook, int ifindex)
static int xgress_filter_add(struct bpf_tc_hook *qdisc_hook,
LIBBPF_OPTS(bpf_tc_hook, qdisc_src_fwd);
LIBBPF_OPTS(bpf_tc_hook, qdisc_dst_fwd);
LIBBPF_OPTS(bpf_tc_hook, qdisc_src_fwd);
LIBBPF_OPTS(bpf_tc_hook, qdisc_dst_fwd);
LIBBPF_OPTS(bpf_tc_hook, qdisc_src);
LIBBPF_OPTS(bpf_tc_hook, qdisc_dst);
LIBBPF_OPTS(bpf_tc_hook, qdisc_lo, .attach_point = BPF_TC_INGRESS);
LIBBPF_OPTS(bpf_tc_hook, hook, .attach_point = BPF_TC_INGRESS);
LIBBPF_OPTS(bpf_tc_hook, tc_hook, .attach_point = BPF_TC_INGRESS);
LIBBPF_OPTS(bpf_tc_hook, tc_hook, .attach_point = BPF_TC_INGRESS);
LIBBPF_OPTS(bpf_tc_hook, tc_hook, .attach_point = BPF_TC_INGRESS);
DECLARE_LIBBPF_OPTS(bpf_tc_hook, tc_hook,
static int attach_tc_prog(struct bpf_tc_hook *hook, int fd)
LIBBPF_OPTS(bpf_tc_hook, tc_hook, .attach_point = BPF_TC_EGRESS);
LIBBPF_OPTS(bpf_tc_hook, tc_hook, .attach_point = BPF_TC_INGRESS);
static int attach_tc_prog(struct bpf_tc_hook *hook, int igr_fd, int egr_fd)
LIBBPF_OPTS(bpf_tc_hook, hook,
LIBBPF_OPTS(bpf_tc_hook, hook,