Home
last modified time | relevance | path

Searched refs:bpf_net_ctx (Results 1 – 4 of 4) sorted by relevance

/linux/include/linux/
H A Dfilter.h815 static inline struct bpf_net_context *bpf_net_ctx_set(struct bpf_net_context *bpf_net_ctx) in bpf_net_ctx_set() argument
821 bpf_net_ctx->ri.kern_flags = 0; in bpf_net_ctx_set()
823 tsk->bpf_net_context = bpf_net_ctx; in bpf_net_ctx_set()
824 return bpf_net_ctx; in bpf_net_ctx_set()
827 static inline void bpf_net_ctx_clear(struct bpf_net_context *bpf_net_ctx) in bpf_net_ctx_clear() argument
829 if (bpf_net_ctx) in bpf_net_ctx_clear()
840 struct bpf_net_context *bpf_net_ctx = bpf_net_ctx_get(); in bpf_net_ctx_get_ri() local
842 if (!(bpf_net_ctx->ri.kern_flags & BPF_RI_F_RI_INIT)) { in bpf_net_ctx_get_ri()
843 memset(&bpf_net_ctx->ri, 0, offsetof(struct bpf_net_context, ri.nh)); in bpf_net_ctx_get_ri()
844 bpf_net_ctx->ri.kern_flags |= BPF_RI_F_RI_INIT; in bpf_net_ctx_get_ri()
[all …]
/linux/kernel/bpf/
H A Dcpumap.c254 struct bpf_net_context __bpf_net_ctx, *bpf_net_ctx; in cpu_map_bpf_prog_run() local
260 bpf_net_ctx = bpf_net_ctx_set(&__bpf_net_ctx); in cpu_map_bpf_prog_run()
272 bpf_net_ctx_clear(bpf_net_ctx); in cpu_map_bpf_prog_run()
/linux/net/bpf/
H A Dtest_run.c276 struct bpf_net_context __bpf_net_ctx, *bpf_net_ctx; in xdp_test_run_batch() local
289 bpf_net_ctx = bpf_net_ctx_set(&__bpf_net_ctx); in xdp_test_run_batch()
355 bpf_net_ctx_clear(bpf_net_ctx); in xdp_test_run_batch()
391 struct bpf_net_context __bpf_net_ctx, *bpf_net_ctx; in bpf_test_run() local
417 bpf_net_ctx = bpf_net_ctx_set(&__bpf_net_ctx); in bpf_test_run()
424 bpf_net_ctx_clear(bpf_net_ctx); in bpf_test_run()
/linux/net/core/
H A Ddev.c4467 struct bpf_net_context __bpf_net_ctx, *bpf_net_ctx; in sch_handle_ingress() local
4473 bpf_net_ctx = bpf_net_ctx_set(&__bpf_net_ctx); in sch_handle_ingress()
4502 bpf_net_ctx_clear(bpf_net_ctx); in sch_handle_ingress()
4507 bpf_net_ctx_clear(bpf_net_ctx); in sch_handle_ingress()
4517 bpf_net_ctx_clear(bpf_net_ctx); in sch_handle_ingress()
4520 bpf_net_ctx_clear(bpf_net_ctx); in sch_handle_ingress()
4530 struct bpf_net_context __bpf_net_ctx, *bpf_net_ctx; in sch_handle_egress() local
4536 bpf_net_ctx = bpf_net_ctx_set(&__bpf_net_ctx); in sch_handle_egress()
4553 bpf_net_ctx_clear(bpf_net_ctx); in sch_handle_egress()
4558 bpf_net_ctx_clear(bpf_net_ctx); in sch_handle_egress()
[all …]