Home
last modified time | relevance | path

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

/Linux-v5.10/include/linux/
Dcgroup-defs.h819 static inline u16 sock_cgroup_prioidx(const struct sock_cgroup_data *skcd) in sock_cgroup_prioidx() argument
822 return (skcd->is_data & 1) ? skcd->prioidx : 1; in sock_cgroup_prioidx()
825 static inline u32 sock_cgroup_classid(const struct sock_cgroup_data *skcd) in sock_cgroup_classid() argument
828 return (skcd->is_data & 1) ? skcd->classid : 0; in sock_cgroup_classid()
835 static inline void sock_cgroup_set_prioidx(struct sock_cgroup_data *skcd, in sock_cgroup_set_prioidx() argument
838 struct sock_cgroup_data skcd_buf = {{ .val = READ_ONCE(skcd->val) }}; in sock_cgroup_set_prioidx()
849 WRITE_ONCE(skcd->val, skcd_buf.val); /* see sock_cgroup_ptr() */ in sock_cgroup_set_prioidx()
852 static inline void sock_cgroup_set_classid(struct sock_cgroup_data *skcd, in sock_cgroup_set_classid() argument
855 struct sock_cgroup_data skcd_buf = {{ .val = READ_ONCE(skcd->val) }}; in sock_cgroup_set_classid()
866 WRITE_ONCE(skcd->val, skcd_buf.val); /* see sock_cgroup_ptr() */ in sock_cgroup_set_classid()
Dcgroup.h824 void cgroup_sk_alloc(struct sock_cgroup_data *skcd);
825 void cgroup_sk_clone(struct sock_cgroup_data *skcd);
826 void cgroup_sk_free(struct sock_cgroup_data *skcd);
828 static inline struct cgroup *sock_cgroup_ptr(struct sock_cgroup_data *skcd) in sock_cgroup_ptr() argument
837 v = READ_ONCE(skcd->val); in sock_cgroup_ptr()
844 return (struct cgroup *)(unsigned long)skcd->val; in sock_cgroup_ptr()
850 static inline void cgroup_sk_alloc(struct sock_cgroup_data *skcd) {} in cgroup_sk_alloc() argument
851 static inline void cgroup_sk_clone(struct sock_cgroup_data *skcd) {} in cgroup_sk_clone() argument
852 static inline void cgroup_sk_free(struct sock_cgroup_data *skcd) {} in cgroup_sk_free() argument
/Linux-v5.10/include/net/
Dnetprio_cgroup.h34 static inline void sock_update_netprioidx(struct sock_cgroup_data *skcd) in sock_update_netprioidx() argument
39 sock_cgroup_set_prioidx(skcd, task_netprioidx(current)); in sock_update_netprioidx()
49 static inline void sock_update_netprioidx(struct sock_cgroup_data *skcd) in sock_update_netprioidx() argument
Dcls_cgroup.h40 static inline void sock_update_classid(struct sock_cgroup_data *skcd) in sock_update_classid() argument
45 sock_cgroup_set_classid(skcd, classid); in sock_update_classid()
79 static inline void sock_update_classid(struct sock_cgroup_data *skcd) in sock_update_classid() argument
/Linux-v5.10/net/netfilter/
Dxt_cgroup.c116 struct sock_cgroup_data *skcd = &skb->sk->sk_cgrp_data; in cgroup_mt_v1() local
124 return cgroup_is_descendant(sock_cgroup_ptr(skcd), ancestor) ^ in cgroup_mt_v1()
127 return (info->classid == sock_cgroup_classid(skcd)) ^ in cgroup_mt_v1()
134 struct sock_cgroup_data *skcd = &skb->sk->sk_cgrp_data; in cgroup_mt_v2() local
142 return cgroup_is_descendant(sock_cgroup_ptr(skcd), ancestor) ^ in cgroup_mt_v2()
145 return (info->classid == sock_cgroup_classid(skcd)) ^ in cgroup_mt_v2()
/Linux-v5.10/kernel/cgroup/
Dcgroup.c6442 void cgroup_sk_alloc(struct sock_cgroup_data *skcd) in cgroup_sk_alloc() argument
6445 skcd->no_refcnt = 1; in cgroup_sk_alloc()
6460 skcd->val = (unsigned long)cset->dfl_cgrp; in cgroup_sk_alloc()
6470 void cgroup_sk_clone(struct sock_cgroup_data *skcd) in cgroup_sk_clone() argument
6472 if (skcd->val) { in cgroup_sk_clone()
6473 if (skcd->no_refcnt) in cgroup_sk_clone()
6480 cgroup_get(sock_cgroup_ptr(skcd)); in cgroup_sk_clone()
6481 cgroup_bpf_get(sock_cgroup_ptr(skcd)); in cgroup_sk_clone()
6485 void cgroup_sk_free(struct sock_cgroup_data *skcd) in cgroup_sk_free() argument
6487 struct cgroup *cgrp = sock_cgroup_ptr(skcd); in cgroup_sk_free()
[all …]