Lines Matching refs:val
659 int val; in sock_setsockopt() local
674 if (get_user(val, (int __user *)optval)) in sock_setsockopt()
677 valbool = val ? 1 : 0; in sock_setsockopt()
683 if (val && !capable(CAP_NET_ADMIN)) in sock_setsockopt()
712 val = min_t(u32, val, sysctl_wmem_max); in sock_setsockopt()
715 sk->sk_sndbuf = max_t(int, val * 2, SOCK_MIN_SNDBUF); in sock_setsockopt()
733 val = min_t(u32, val, sysctl_rmem_max); in sock_setsockopt()
751 sk->sk_rcvbuf = max_t(int, val * 2, SOCK_MIN_RCVBUF); in sock_setsockopt()
779 if ((val >= 0 && val <= 6) || in sock_setsockopt()
781 sk->sk_priority = val; in sock_setsockopt()
835 if (val & ~SOF_TIMESTAMPING_MASK) { in sock_setsockopt()
840 if (val & SOF_TIMESTAMPING_OPT_ID && in sock_setsockopt()
854 sk->sk_tsflags = val; in sock_setsockopt()
855 if (val & SOF_TIMESTAMPING_RX_SOFTWARE) in sock_setsockopt()
864 if (val < 0) in sock_setsockopt()
865 val = INT_MAX; in sock_setsockopt()
866 sk->sk_rcvlowat = val ? : 1; in sock_setsockopt()
950 sk->sk_mark = val; in sock_setsockopt()
963 ret = sock->ops->set_peek_off(sk, val); in sock_setsockopt()
979 if ((val > sk->sk_ll_usec) && !capable(CAP_NET_ADMIN)) in sock_setsockopt()
982 if (val < 0) in sock_setsockopt()
985 sk->sk_ll_usec = val; in sock_setsockopt()
991 sk->sk_max_pacing_rate = val; in sock_setsockopt()
997 sk->sk_incoming_cpu = val; in sock_setsockopt()
1001 if (val == 1) in sock_setsockopt()
1033 int val; in sock_getsockopt() member
1051 v.val = sock_flag(sk, SOCK_DBG); in sock_getsockopt()
1055 v.val = sock_flag(sk, SOCK_LOCALROUTE); in sock_getsockopt()
1059 v.val = sock_flag(sk, SOCK_BROADCAST); in sock_getsockopt()
1063 v.val = sk->sk_sndbuf; in sock_getsockopt()
1067 v.val = sk->sk_rcvbuf; in sock_getsockopt()
1071 v.val = sk->sk_reuse; in sock_getsockopt()
1075 v.val = sk->sk_reuseport; in sock_getsockopt()
1079 v.val = sock_flag(sk, SOCK_KEEPOPEN); in sock_getsockopt()
1083 v.val = sk->sk_type; in sock_getsockopt()
1087 v.val = sk->sk_protocol; in sock_getsockopt()
1091 v.val = sk->sk_family; in sock_getsockopt()
1095 v.val = -sock_error(sk); in sock_getsockopt()
1096 if (v.val == 0) in sock_getsockopt()
1097 v.val = xchg(&sk->sk_err_soft, 0); in sock_getsockopt()
1101 v.val = sock_flag(sk, SOCK_URGINLINE); in sock_getsockopt()
1105 v.val = sk->sk_no_check_tx; in sock_getsockopt()
1109 v.val = sk->sk_priority; in sock_getsockopt()
1123 v.val = sock_flag(sk, SOCK_RCVTSTAMP) && in sock_getsockopt()
1128 v.val = sock_flag(sk, SOCK_RCVTSTAMPNS); in sock_getsockopt()
1132 v.val = sk->sk_tsflags; in sock_getsockopt()
1158 v.val = sk->sk_rcvlowat; in sock_getsockopt()
1162 v.val = 1; in sock_getsockopt()
1166 v.val = !!test_bit(SOCK_PASSCRED, &sock->flags); in sock_getsockopt()
1197 v.val = sk->sk_state == TCP_LISTEN; in sock_getsockopt()
1201 v.val = !!test_bit(SOCK_PASSSEC, &sock->flags); in sock_getsockopt()
1208 v.val = sk->sk_mark; in sock_getsockopt()
1212 v.val = sock_flag(sk, SOCK_RXQ_OVFL); in sock_getsockopt()
1216 v.val = sock_flag(sk, SOCK_WIFI_STATUS); in sock_getsockopt()
1223 v.val = sk->sk_peek_off; in sock_getsockopt()
1226 v.val = sock_flag(sk, SOCK_NOFCS); in sock_getsockopt()
1240 v.val = sock_flag(sk, SOCK_FILTER_LOCKED); in sock_getsockopt()
1244 v.val = bpf_tell_extensions(); in sock_getsockopt()
1248 v.val = sock_flag(sk, SOCK_SELECT_ERR_QUEUE); in sock_getsockopt()
1253 v.val = sk->sk_ll_usec; in sock_getsockopt()
1258 v.val = sk->sk_max_pacing_rate; in sock_getsockopt()
1262 v.val = sk->sk_incoming_cpu; in sock_getsockopt()
2219 int sk_set_peek_off(struct sock *sk, int val) in sk_set_peek_off() argument
2221 if (val < 0) in sk_set_peek_off()
2224 sk->sk_peek_off = val; in sk_set_peek_off()
2764 int val[PROTO_INUSE_NR]; member
2770 void sock_prot_inuse_add(struct net *net, struct proto *prot, int val) in sock_prot_inuse_add() argument
2772 __this_cpu_add(net->core.inuse->val[prot->inuse_idx], val); in sock_prot_inuse_add()
2782 res += per_cpu_ptr(net->core.inuse, cpu)->val[idx]; in sock_prot_inuse_get()
2816 void sock_prot_inuse_add(struct net *net, struct proto *prot, int val) in sock_prot_inuse_add() argument
2818 __this_cpu_add(prot_inuse.val[prot->inuse_idx], val); in sock_prot_inuse_add()
2828 res += per_cpu(prot_inuse, cpu).val[idx]; in sock_prot_inuse_get()