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.h771 static inline struct bpf_net_context *bpf_net_ctx_set(struct bpf_net_context *bpf_net_ctx) in bpf_net_ctx_set() argument
777 bpf_net_ctx->ri.kern_flags = 0; in bpf_net_ctx_set()
779 tsk->bpf_net_context = bpf_net_ctx; in bpf_net_ctx_set()
780 return bpf_net_ctx; in bpf_net_ctx_set()
783 static inline void bpf_net_ctx_clear(struct bpf_net_context *bpf_net_ctx) in bpf_net_ctx_clear() argument
785 if (bpf_net_ctx) in bpf_net_ctx_clear()
796 struct bpf_net_context *bpf_net_ctx = bpf_net_ctx_get(); in bpf_net_ctx_get_ri() local
798 if (!(bpf_net_ctx->ri.kern_flags & BPF_RI_F_RI_INIT)) { in bpf_net_ctx_get_ri()
799 memset(&bpf_net_ctx->ri, 0, offsetof(struct bpf_net_context, ri.nh)); in bpf_net_ctx_get_ri()
800 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.c43 struct bpf_net_context __bpf_net_ctx, *bpf_net_ctx; in run_lwt_bpf() local
50 bpf_net_ctx = bpf_net_ctx_set(&__bpf_net_ctx); in run_lwt_bpf()
83 bpf_net_ctx_clear(bpf_net_ctx); in run_lwt_bpf()
H A Ddev.c4284 struct bpf_net_context __bpf_net_ctx, *bpf_net_ctx; in sch_handle_ingress() local
4290 bpf_net_ctx = bpf_net_ctx_set(&__bpf_net_ctx); in sch_handle_ingress()
4319 bpf_net_ctx_clear(bpf_net_ctx); in sch_handle_ingress()
4324 bpf_net_ctx_clear(bpf_net_ctx); in sch_handle_ingress()
4334 bpf_net_ctx_clear(bpf_net_ctx); in sch_handle_ingress()
4337 bpf_net_ctx_clear(bpf_net_ctx); in sch_handle_ingress()
4347 struct bpf_net_context __bpf_net_ctx, *bpf_net_ctx; in sch_handle_egress() local
4353 bpf_net_ctx = bpf_net_ctx_set(&__bpf_net_ctx); in sch_handle_egress()
4370 bpf_net_ctx_clear(bpf_net_ctx); in sch_handle_egress()
4375 bpf_net_ctx_clear(bpf_net_ctx); in sch_handle_egress()
[all …]
/linux/net/bpf/
H A Dtest_run.c288 struct bpf_net_context __bpf_net_ctx, *bpf_net_ctx; in xdp_test_run_batch() local
301 bpf_net_ctx = bpf_net_ctx_set(&__bpf_net_ctx); in xdp_test_run_batch()
367 bpf_net_ctx_clear(bpf_net_ctx); in xdp_test_run_batch()
403 struct bpf_net_context __bpf_net_ctx, *bpf_net_ctx; in bpf_test_run() local
429 bpf_net_ctx = bpf_net_ctx_set(&__bpf_net_ctx); in bpf_test_run()
436 bpf_net_ctx_clear(bpf_net_ctx); in bpf_test_run()
/linux/drivers/net/
H A Dnetkit.c81 struct bpf_net_context __bpf_net_ctx, *bpf_net_ctx; in netkit_xmit() local
89 bpf_net_ctx = bpf_net_ctx_set(&__bpf_net_ctx); in netkit_xmit()
129 bpf_net_ctx_clear(bpf_net_ctx); in netkit_xmit()
H A Dtun.c1665 struct bpf_net_context __bpf_net_ctx, *bpf_net_ctx; in tun_build_skb() local
1705 bpf_net_ctx = bpf_net_ctx_set(&__bpf_net_ctx); in tun_build_skb()
1734 bpf_net_ctx_clear(bpf_net_ctx); in tun_build_skb()
1741 bpf_net_ctx_clear(bpf_net_ctx); in tun_build_skb()
2577 struct bpf_net_context __bpf_net_ctx, *bpf_net_ctx; in tun_sendmsg() local
2586 bpf_net_ctx = bpf_net_ctx_set(&__bpf_net_ctx); in tun_sendmsg()
2601 bpf_net_ctx_clear(bpf_net_ctx); in tun_sendmsg()