Lines Matching refs:prot

1072 int proto_register(struct proto *prot, int alloc_slab);
1073 void proto_unregister(struct proto *prot);
1161 struct proto *prot = sk->sk_prot; in sk_leave_memory_pressure() local
1163 for (; cg_proto; cg_proto = parent_cg_proto(prot, cg_proto)) in sk_leave_memory_pressure()
1176 struct proto *prot = sk->sk_prot; in sk_enter_memory_pressure() local
1178 for (; cg_proto; cg_proto = parent_cg_proto(prot, cg_proto)) in sk_enter_memory_pressure()
1187 long *prot = sk->sk_prot->sysctl_mem; in sk_prot_mem_limits() local
1189 prot = sk->sk_cgrp->sysctl_mem; in sk_prot_mem_limits()
1190 return prot[index]; in sk_prot_mem_limits()
1193 static inline void memcg_memory_allocated_add(struct cg_proto *prot, in memcg_memory_allocated_add() argument
1197 page_counter_charge(&prot->memory_allocated, amt); in memcg_memory_allocated_add()
1199 if (page_counter_read(&prot->memory_allocated) > in memcg_memory_allocated_add()
1200 prot->memory_allocated.limit) in memcg_memory_allocated_add()
1204 static inline void memcg_memory_allocated_sub(struct cg_proto *prot, in memcg_memory_allocated_sub() argument
1207 page_counter_uncharge(&prot->memory_allocated, amt); in memcg_memory_allocated_sub()
1213 struct proto *prot = sk->sk_prot; in sk_memory_allocated() local
1218 return atomic_long_read(prot->memory_allocated); in sk_memory_allocated()
1224 struct proto *prot = sk->sk_prot; in sk_memory_allocated_add() local
1229 atomic_long_add_return(amt, prot->memory_allocated); in sk_memory_allocated_add()
1233 return atomic_long_add_return(amt, prot->memory_allocated); in sk_memory_allocated_add()
1239 struct proto *prot = sk->sk_prot; in sk_memory_allocated_sub() local
1244 atomic_long_sub(amt, prot->memory_allocated); in sk_memory_allocated_sub()
1249 struct proto *prot = sk->sk_prot; in sk_sockets_allocated_dec() local
1254 for (; cg_proto; cg_proto = parent_cg_proto(prot, cg_proto)) in sk_sockets_allocated_dec()
1258 percpu_counter_dec(prot->sockets_allocated); in sk_sockets_allocated_dec()
1263 struct proto *prot = sk->sk_prot; in sk_sockets_allocated_inc() local
1268 for (; cg_proto; cg_proto = parent_cg_proto(prot, cg_proto)) in sk_sockets_allocated_inc()
1272 percpu_counter_inc(prot->sockets_allocated); in sk_sockets_allocated_inc()
1278 struct proto *prot = sk->sk_prot; in sk_sockets_allocated_read_positive() local
1283 return percpu_counter_read_positive(prot->sockets_allocated); in sk_sockets_allocated_read_positive()
1287 proto_sockets_allocated_sum_positive(struct proto *prot) in proto_sockets_allocated_sum_positive() argument
1289 return percpu_counter_sum_positive(prot->sockets_allocated); in proto_sockets_allocated_sum_positive()
1293 proto_memory_allocated(struct proto *prot) in proto_memory_allocated() argument
1295 return atomic_long_read(prot->memory_allocated); in proto_memory_allocated()
1299 proto_memory_pressure(struct proto *prot) in proto_memory_pressure() argument
1301 if (!prot->memory_pressure) in proto_memory_pressure()
1303 return !!*prot->memory_pressure; in proto_memory_pressure()
1309 void sock_prot_inuse_add(struct net *net, struct proto *prot, int inc);
1312 static inline void sock_prot_inuse_add(struct net *net, struct proto *prot, in sock_prot_inuse_add() argument
1512 struct proto *prot, int kern);