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.h793 static inline struct bpf_net_context *bpf_net_ctx_set(struct bpf_net_context *bpf_net_ctx) in bpf_net_ctx_set() argument
799 bpf_net_ctx->ri.kern_flags = 0; in bpf_net_ctx_set()
801 tsk->bpf_net_context = bpf_net_ctx; in bpf_net_ctx_set()
802 return bpf_net_ctx; in bpf_net_ctx_set()
805 static inline void bpf_net_ctx_clear(struct bpf_net_context *bpf_net_ctx) in bpf_net_ctx_clear() argument
807 if (bpf_net_ctx) in bpf_net_ctx_clear()
818 struct bpf_net_context *bpf_net_ctx = bpf_net_ctx_get(); in bpf_net_ctx_get_ri() local
820 if (!(bpf_net_ctx->ri.kern_flags & BPF_RI_F_RI_INIT)) { in bpf_net_ctx_get_ri()
821 memset(&bpf_net_ctx->ri, 0, offsetof(struct bpf_net_context, ri.nh)); in bpf_net_ctx_get_ri()
822 bpf_net_ctx->ri.kern_flags |= BPF_RI_F_RI_INIT; in bpf_net_ctx_get_ri()
[all …]
/linux/kernel/bpf/
H A Dcpumap.c249 struct bpf_net_context __bpf_net_ctx, *bpf_net_ctx; in cpu_map_bpf_prog_run() local
255 bpf_net_ctx = bpf_net_ctx_set(&__bpf_net_ctx); in cpu_map_bpf_prog_run()
267 bpf_net_ctx_clear(bpf_net_ctx); in cpu_map_bpf_prog_run()
/linux/net/bpf/
H A Dtest_run.c277 struct bpf_net_context __bpf_net_ctx, *bpf_net_ctx; in xdp_test_run_batch() local
290 bpf_net_ctx = bpf_net_ctx_set(&__bpf_net_ctx); in xdp_test_run_batch()
356 bpf_net_ctx_clear(bpf_net_ctx); in xdp_test_run_batch()
392 struct bpf_net_context __bpf_net_ctx, *bpf_net_ctx; in bpf_test_run() local
418 bpf_net_ctx = bpf_net_ctx_set(&__bpf_net_ctx); in bpf_test_run()
425 bpf_net_ctx_clear(bpf_net_ctx); in bpf_test_run()
/linux/net/core/
H A Ddev.c4423 struct bpf_net_context __bpf_net_ctx, *bpf_net_ctx; in sch_handle_ingress() local
4429 bpf_net_ctx = bpf_net_ctx_set(&__bpf_net_ctx); in sch_handle_ingress()
4458 bpf_net_ctx_clear(bpf_net_ctx); in sch_handle_ingress()
4463 bpf_net_ctx_clear(bpf_net_ctx); in sch_handle_ingress()
4473 bpf_net_ctx_clear(bpf_net_ctx); in sch_handle_ingress()
4476 bpf_net_ctx_clear(bpf_net_ctx); in sch_handle_ingress()
4486 struct bpf_net_context __bpf_net_ctx, *bpf_net_ctx; in sch_handle_egress() local
4492 bpf_net_ctx = bpf_net_ctx_set(&__bpf_net_ctx); in sch_handle_egress()
4509 bpf_net_ctx_clear(bpf_net_ctx); in sch_handle_egress()
4514 bpf_net_ctx_clear(bpf_net_ctx); in sch_handle_egress()
[all …]