Home
last modified time | relevance | path

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

/linux/include/linux/
H A Dfilter.h870 static inline struct bpf_net_context *bpf_net_ctx_set(struct bpf_net_context *bpf_net_ctx) in bpf_net_ctx_set() argument
876 bpf_net_ctx->ri.kern_flags = 0; in bpf_net_ctx_set()
878 tsk->bpf_net_context = bpf_net_ctx; in bpf_net_ctx_set()
879 return bpf_net_ctx; in bpf_net_ctx_set()
882 static inline void bpf_net_ctx_clear(struct bpf_net_context *bpf_net_ctx) in bpf_net_ctx_clear() argument
884 if (bpf_net_ctx) in bpf_net_ctx_clear()
895 struct bpf_net_context *bpf_net_ctx = bpf_net_ctx_get(); in bpf_net_ctx_get_ri() local
897 if (!(bpf_net_ctx->ri.kern_flags & BPF_RI_F_RI_INIT)) { in bpf_net_ctx_get_ri()
898 memset(&bpf_net_ctx->ri, 0, offsetof(struct bpf_net_context, ri.nh)); in bpf_net_ctx_get_ri()
899 bpf_net_ctx->ri.kern_flags |= BPF_RI_F_RI_INIT; in bpf_net_ctx_get_ri()
[all …]
/linux/net/core/
H A Dlwt_bpf.c42 struct bpf_net_context __bpf_net_ctx, *bpf_net_ctx; in run_lwt_bpf() local
49 bpf_net_ctx = bpf_net_ctx_set(&__bpf_net_ctx); in run_lwt_bpf()
82 bpf_net_ctx_clear(bpf_net_ctx); in run_lwt_bpf()
H A Ddev.c4518 struct bpf_net_context __bpf_net_ctx, *bpf_net_ctx; in sch_handle_ingress() local
4524 bpf_net_ctx = bpf_net_ctx_set(&__bpf_net_ctx); in sch_handle_ingress()
4553 bpf_net_ctx_clear(bpf_net_ctx); in sch_handle_ingress()
4558 bpf_net_ctx_clear(bpf_net_ctx); in sch_handle_ingress()
4568 bpf_net_ctx_clear(bpf_net_ctx); in sch_handle_ingress()
4571 bpf_net_ctx_clear(bpf_net_ctx); in sch_handle_ingress()
4581 struct bpf_net_context __bpf_net_ctx, *bpf_net_ctx; in sch_handle_egress() local
4587 bpf_net_ctx = bpf_net_ctx_set(&__bpf_net_ctx); in sch_handle_egress()
4604 bpf_net_ctx_clear(bpf_net_ctx); in sch_handle_egress()
4609 bpf_net_ctx_clear(bpf_net_ctx); in sch_handle_egress()
[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/drivers/net/
H A Dtun.c1689 struct bpf_net_context __bpf_net_ctx, *bpf_net_ctx; in tun_build_skb() local
1730 bpf_net_ctx = bpf_net_ctx_set(&__bpf_net_ctx); in tun_build_skb()
1764 bpf_net_ctx_clear(bpf_net_ctx); in tun_build_skb()
1772 bpf_net_ctx_clear(bpf_net_ctx); in tun_build_skb()
2670 struct bpf_net_context __bpf_net_ctx, *bpf_net_ctx; in tun_sendmsg() local
2679 bpf_net_ctx = bpf_net_ctx_set(&__bpf_net_ctx); in tun_sendmsg()
2694 bpf_net_ctx_clear(bpf_net_ctx); in tun_sendmsg()