Home
last modified time | relevance | path

Searched refs:sock_ops (Results 1 - 10 of 10) sorted by relevance

/kernel/linux/linux-5.10/include/linux/
H A Dbpf-cgroup.h129 struct bpf_sock_ops_kern *sock_ops,
275 /* The SOCK_OPS"_SK" macro should be used when sock_ops->sk is not a
279 * e.g. sock_ops->sk is a request_sock and it is under syncookie mode.
282 * set its sock_ops->sk to req_sk, and call this SOCK_OPS"_SK" with
288 * so passing 'sock_ops->sk == req_sk' to the bpf prog is appropriate here.
290 #define BPF_CGROUP_RUN_PROG_SOCK_OPS_SK(sock_ops, sk) \
295 sock_ops, \
300 #define BPF_CGROUP_RUN_PROG_SOCK_OPS(sock_ops) \
303 if (cgroup_bpf_enabled && (sock_ops)->sk) { \
304 typeof(sk) __sk = sk_to_full_sk((sock_ops)
[all...]
/kernel/linux/linux-6.6/include/linux/
H A Dbpf-cgroup.h129 struct bpf_sock_ops_kern *sock_ops,
304 /* The SOCK_OPS"_SK" macro should be used when sock_ops->sk is not a
308 * e.g. sock_ops->sk is a request_sock and it is under syncookie mode.
311 * set its sock_ops->sk to req_sk, and call this SOCK_OPS"_SK" with
317 * so passing 'sock_ops->sk == req_sk' to the bpf prog is appropriate here.
319 #define BPF_CGROUP_RUN_PROG_SOCK_OPS_SK(sock_ops, sk) \
324 sock_ops, \
329 #define BPF_CGROUP_RUN_PROG_SOCK_OPS(sock_ops) \
332 if (cgroup_bpf_enabled(CGROUP_SOCK_OPS) && (sock_ops)->sk) { \
333 typeof(sk) __sk = sk_to_full_sk((sock_ops)
[all...]
/kernel/linux/linux-5.10/net/ipv4/
H A Dtcp_output.c476 struct bpf_sock_ops_kern sock_ops; in bpf_skops_hdr_opt_len() local
486 /* init sock_ops */ in bpf_skops_hdr_opt_len()
487 memset(&sock_ops, 0, offsetof(struct bpf_sock_ops_kern, temp)); in bpf_skops_hdr_opt_len()
489 sock_ops.op = BPF_SOCK_OPS_HDR_OPT_LEN_CB; in bpf_skops_hdr_opt_len()
505 sock_ops.sk = (struct sock *)req; in bpf_skops_hdr_opt_len()
506 sock_ops.syn_skb = syn_skb; in bpf_skops_hdr_opt_len()
510 sock_ops.is_fullsock = 1; in bpf_skops_hdr_opt_len()
511 sock_ops.sk = sk; in bpf_skops_hdr_opt_len()
514 sock_ops.args[0] = bpf_skops_write_hdr_opt_arg0(skb, synack_type); in bpf_skops_hdr_opt_len()
515 sock_ops in bpf_skops_hdr_opt_len()
539 struct bpf_sock_ops_kern sock_ops; bpf_skops_write_hdr_opt() local
[all...]
H A Dtcp_input.c152 struct bpf_sock_ops_kern sock_ops; in bpf_skops_parse_hdr() local
170 memset(&sock_ops, 0, offsetof(struct bpf_sock_ops_kern, temp)); in bpf_skops_parse_hdr()
171 sock_ops.op = BPF_SOCK_OPS_PARSE_HDR_OPT_CB; in bpf_skops_parse_hdr()
172 sock_ops.is_fullsock = 1; in bpf_skops_parse_hdr()
173 sock_ops.sk = sk; in bpf_skops_parse_hdr()
174 bpf_skops_init_skb(&sock_ops, skb, tcp_hdrlen(skb)); in bpf_skops_parse_hdr()
176 BPF_CGROUP_RUN_PROG_SOCK_OPS(&sock_ops); in bpf_skops_parse_hdr()
182 struct bpf_sock_ops_kern sock_ops; in bpf_skops_established() local
186 memset(&sock_ops, 0, offsetof(struct bpf_sock_ops_kern, temp)); in bpf_skops_established()
187 sock_ops in bpf_skops_established()
[all...]
/kernel/linux/linux-6.6/net/ipv4/
H A Dtcp_output.c485 struct bpf_sock_ops_kern sock_ops; in bpf_skops_hdr_opt_len() local
495 /* init sock_ops */ in bpf_skops_hdr_opt_len()
496 memset(&sock_ops, 0, offsetof(struct bpf_sock_ops_kern, temp)); in bpf_skops_hdr_opt_len()
498 sock_ops.op = BPF_SOCK_OPS_HDR_OPT_LEN_CB; in bpf_skops_hdr_opt_len()
514 sock_ops.sk = (struct sock *)req; in bpf_skops_hdr_opt_len()
515 sock_ops.syn_skb = syn_skb; in bpf_skops_hdr_opt_len()
519 sock_ops.is_fullsock = 1; in bpf_skops_hdr_opt_len()
520 sock_ops.sk = sk; in bpf_skops_hdr_opt_len()
523 sock_ops.args[0] = bpf_skops_write_hdr_opt_arg0(skb, synack_type); in bpf_skops_hdr_opt_len()
524 sock_ops in bpf_skops_hdr_opt_len()
548 struct bpf_sock_ops_kern sock_ops; bpf_skops_write_hdr_opt() local
[all...]
H A Dtcp_input.c150 struct bpf_sock_ops_kern sock_ops; in bpf_skops_parse_hdr() local
168 memset(&sock_ops, 0, offsetof(struct bpf_sock_ops_kern, temp)); in bpf_skops_parse_hdr()
169 sock_ops.op = BPF_SOCK_OPS_PARSE_HDR_OPT_CB; in bpf_skops_parse_hdr()
170 sock_ops.is_fullsock = 1; in bpf_skops_parse_hdr()
171 sock_ops.sk = sk; in bpf_skops_parse_hdr()
172 bpf_skops_init_skb(&sock_ops, skb, tcp_hdrlen(skb)); in bpf_skops_parse_hdr()
174 BPF_CGROUP_RUN_PROG_SOCK_OPS(&sock_ops); in bpf_skops_parse_hdr()
180 struct bpf_sock_ops_kern sock_ops; in bpf_skops_established() local
184 memset(&sock_ops, 0, offsetof(struct bpf_sock_ops_kern, temp)); in bpf_skops_established()
185 sock_ops in bpf_skops_established()
[all...]
/kernel/linux/linux-5.10/include/net/
H A Dtcp.h2296 struct bpf_sock_ops_kern sock_ops; in tcp_call_bpf() local
2299 memset(&sock_ops, 0, offsetof(struct bpf_sock_ops_kern, temp)); in tcp_call_bpf()
2301 sock_ops.is_fullsock = 1; in tcp_call_bpf()
2305 sock_ops.sk = sk; in tcp_call_bpf()
2306 sock_ops.op = op; in tcp_call_bpf()
2308 memcpy(sock_ops.args, args, nargs * sizeof(*args)); in tcp_call_bpf()
2310 ret = BPF_CGROUP_RUN_PROG_SOCK_OPS(&sock_ops); in tcp_call_bpf()
2312 ret = sock_ops.reply; in tcp_call_bpf()
/kernel/linux/linux-6.6/include/net/
H A Dtcp.h2418 struct bpf_sock_ops_kern sock_ops; in tcp_call_bpf() local
2421 memset(&sock_ops, 0, offsetof(struct bpf_sock_ops_kern, temp)); in tcp_call_bpf()
2423 sock_ops.is_fullsock = 1; in tcp_call_bpf()
2427 sock_ops.sk = sk; in tcp_call_bpf()
2428 sock_ops.op = op; in tcp_call_bpf()
2430 memcpy(sock_ops.args, args, nargs * sizeof(*args)); in tcp_call_bpf()
2432 ret = BPF_CGROUP_RUN_PROG_SOCK_OPS(&sock_ops); in tcp_call_bpf()
2434 ret = sock_ops.reply; in tcp_call_bpf()
/kernel/linux/linux-5.10/kernel/bpf/
H A Dcgroup.c1151 * @sock_ops: bpf_sock_ops_kern struct to pass to program. Contains
1158 * The program type passed in via @type must be suitable for sock_ops
1165 struct bpf_sock_ops_kern *sock_ops, in __cgroup_bpf_run_filter_sock_ops()
1171 ret = BPF_PROG_RUN_ARRAY(cgrp->bpf.effective[type], sock_ops, in __cgroup_bpf_run_filter_sock_ops()
1164 __cgroup_bpf_run_filter_sock_ops(struct sock *sk, struct bpf_sock_ops_kern *sock_ops, enum bpf_attach_type type) __cgroup_bpf_run_filter_sock_ops() argument
/kernel/linux/linux-6.6/kernel/bpf/
H A Dcgroup.c1510 * @sock_ops: bpf_sock_ops_kern struct to pass to program. Contains
1517 * The program type passed in via @type must be suitable for sock_ops
1524 struct bpf_sock_ops_kern *sock_ops, in __cgroup_bpf_run_filter_sock_ops()
1529 return bpf_prog_run_array_cg(&cgrp->bpf, atype, sock_ops, bpf_prog_run, in __cgroup_bpf_run_filter_sock_ops()
1523 __cgroup_bpf_run_filter_sock_ops(struct sock *sk, struct bpf_sock_ops_kern *sock_ops, enum cgroup_bpf_attach_type atype) __cgroup_bpf_run_filter_sock_ops() argument

Completed in 27 milliseconds