Lines Matching refs:proto

112 struct proto;
195 struct proto *skc_prot;
489 struct proto *sk_prot_creator;
1252 struct proto { struct
1374 int proto_register(struct proto *prot, int alloc_slab); argument
1375 void proto_unregister(struct proto *prot);
1450 proto_memory_allocated(const struct proto *prot) in proto_memory_allocated()
1465 static inline void proto_memory_pcpu_drain(struct proto *proto) in proto_memory_pcpu_drain() argument
1467 int val = this_cpu_xchg(*proto->per_cpu_fw_alloc, 0); in proto_memory_pcpu_drain()
1470 atomic_long_add(val, proto->memory_allocated); in proto_memory_pcpu_drain()
1476 struct proto *proto = sk->sk_prot; in sk_memory_allocated_add() local
1478 val = this_cpu_add_return(*proto->per_cpu_fw_alloc, val); in sk_memory_allocated_add()
1481 proto_memory_pcpu_drain(proto); in sk_memory_allocated_add()
1487 struct proto *proto = sk->sk_prot; in sk_memory_allocated_sub() local
1489 val = this_cpu_sub_return(*proto->per_cpu_fw_alloc, val); in sk_memory_allocated_sub()
1492 proto_memory_pcpu_drain(proto); in sk_memory_allocated_sub()
1516 proto_sockets_allocated_sum_positive(struct proto *prot) in proto_sockets_allocated_sum_positive()
1522 proto_memory_pressure(struct proto *prot) in proto_memory_pressure()
1538 const struct proto *prot, int val) in sock_prot_inuse_add()
1548 int sock_prot_inuse_get(struct net *net, struct proto *proto);
1552 const struct proto *prot, int val) in sock_prot_inuse_add()
1854 struct proto *prot, int kern);
1905 static inline void sock_replace_proto(struct sock *sk, struct proto *proto) in sock_replace_proto() argument
1909 WRITE_ONCE(sk->sk_prot, proto); in sock_replace_proto()
2958 static inline int sk_get_wmem0(const struct sock *sk, const struct proto *proto) in sk_get_wmem0() argument
2961 if (proto->sysctl_wmem_offset) in sk_get_wmem0()
2962 return READ_ONCE(*(int *)((void *)sock_net(sk) + proto->sysctl_wmem_offset)); in sk_get_wmem0()
2964 return READ_ONCE(*proto->sysctl_wmem); in sk_get_wmem0()
2967 static inline int sk_get_rmem0(const struct sock *sk, const struct proto *proto) in sk_get_rmem0() argument
2970 if (proto->sysctl_rmem_offset) in sk_get_rmem0()
2971 return READ_ONCE(*(int *)((void *)sock_net(sk) + proto->sysctl_rmem_offset)); in sk_get_rmem0()
2973 return READ_ONCE(*proto->sysctl_rmem); in sk_get_rmem0()