"%02X %d\n",
s->sk_type, ntohs(at->src_net), at->src_node, at->src_port,
ntohs(at->dest_net), at->dest_node, at->dest_port,
- atomic_read(&s->sk_wmem_alloc),
- atomic_read(&s->sk_rmem_alloc),
+ sk_wmem_alloc_get(s),
+ sk_rmem_alloc_get(s),
s->sk_state, SOCK_INODE(s->sk_socket)->i_uid);
out:
return 0;
switch (cmd) {
/* Protocol layer */
case TIOCOUTQ: {
- long amount = sk->sk_sndbuf -
- atomic_read(&sk->sk_wmem_alloc);
+ long amount = sk->sk_sndbuf - sk_wmem_alloc_get(sk);
if (amount < 0)
amount = 0;
switch (cmd) {
case TIOCOUTQ: {
long amount;
- amount = sk->sk_sndbuf - atomic_read(&sk->sk_wmem_alloc);
+
+ amount = sk->sk_sndbuf - sk_wmem_alloc_get(sk);
if (amount < 0)
amount = 0;
res = put_user(amount, (int __user *)argp);
ax25_info.idletimer = ax25_display_timer(&ax25->idletimer) / (60 * HZ);
ax25_info.n2count = ax25->n2count;
ax25_info.state = ax25->state;
- ax25_info.rcv_q = atomic_read(&sk->sk_rmem_alloc);
- ax25_info.snd_q = atomic_read(&sk->sk_wmem_alloc);
+ ax25_info.rcv_q = sk_wmem_alloc_get(sk);
+ ax25_info.snd_q = sk_rmem_alloc_get(sk);
ax25_info.vs = ax25->vs;
ax25_info.vr = ax25->vr;
ax25_info.va = ax25->va;
if (ax25->sk != NULL) {
seq_printf(seq, " %d %d %lu\n",
- atomic_read(&ax25->sk->sk_wmem_alloc),
- atomic_read(&ax25->sk->sk_rmem_alloc),
+ sk_wmem_alloc_get(ax25->sk),
+ sk_rmem_alloc_get(ax25->sk),
sock_i_ino(ax25->sk));
} else {
seq_puts(seq, " * * *\n");
if (sk->sk_state == BT_LISTEN)
return -EINVAL;
- amount = sk->sk_sndbuf - atomic_read(&sk->sk_wmem_alloc);
+ amount = sk->sk_sndbuf - sk_wmem_alloc_get(sk);
if (amount < 0)
amount = 0;
err = put_user(amount, (int __user *) arg);
return val;
case TIOCOUTQ:
- amount = sk->sk_sndbuf - atomic_read(&sk->sk_wmem_alloc);
+ amount = sk->sk_sndbuf - sk_wmem_alloc_get(sk);
if (amount < 0)
amount = 0;
err = put_user(amount, (int __user *)arg);
switch (cmd) {
case SIOCOUTQ:
{
- int amount = atomic_read(&sk->sk_wmem_alloc);
+ int amount = sk_wmem_alloc_get(sk);
+
return put_user(amount, (int __user *)arg);
}
r->idiag_inode = sock_i_ino(sk);
if (minfo) {
- minfo->idiag_rmem = atomic_read(&sk->sk_rmem_alloc);
+ minfo->idiag_rmem = sk_rmem_alloc_get(sk);
minfo->idiag_wmem = sk->sk_wmem_queued;
minfo->idiag_fmem = sk->sk_forward_alloc;
- minfo->idiag_tmem = atomic_read(&sk->sk_wmem_alloc);
+ minfo->idiag_tmem = sk_wmem_alloc_get(sk);
}
handler->idiag_get_info(sk, r, info);
{
switch (cmd) {
case SIOCOUTQ: {
- int amount = atomic_read(&sk->sk_wmem_alloc);
+ int amount = sk_wmem_alloc_get(sk);
+
return put_user(amount, (int __user *)arg);
}
case SIOCINQ: {
seq_printf(seq, "%4d: %08X:%04X %08X:%04X"
" %02X %08X:%08X %02X:%08lX %08X %5d %8d %lu %d %p %d\n",
i, src, srcp, dest, destp, sp->sk_state,
- atomic_read(&sp->sk_wmem_alloc),
- atomic_read(&sp->sk_rmem_alloc),
+ sk_wmem_alloc_get(sp),
+ sk_rmem_alloc_get(sp),
0, 0L, 0, sock_i_uid(sp), 0, sock_i_ino(sp),
atomic_read(&sp->sk_refcnt), sp, atomic_read(&sp->sk_drops));
}
switch (cmd) {
case SIOCOUTQ:
{
- int amount = atomic_read(&sk->sk_wmem_alloc);
+ int amount = sk_wmem_alloc_get(sk);
+
return put_user(amount, (int __user *)arg);
}
seq_printf(f, "%4d: %08X:%04X %08X:%04X"
" %02X %08X:%08X %02X:%08lX %08X %5d %8d %lu %d %p %d%n",
bucket, src, srcp, dest, destp, sp->sk_state,
- atomic_read(&sp->sk_wmem_alloc),
- atomic_read(&sp->sk_rmem_alloc),
+ sk_wmem_alloc_get(sp),
+ sk_rmem_alloc_get(sp),
0, 0L, 0, sock_i_uid(sp), 0, sock_i_ino(sp),
atomic_read(&sp->sk_refcnt), sp,
atomic_read(&sp->sk_drops), len);
switch(cmd) {
case SIOCOUTQ:
{
- int amount = atomic_read(&sk->sk_wmem_alloc);
+ int amount = sk_wmem_alloc_get(sk);
+
return put_user(amount, (int __user *)arg);
}
case SIOCINQ:
dest->s6_addr32[0], dest->s6_addr32[1],
dest->s6_addr32[2], dest->s6_addr32[3], destp,
sp->sk_state,
- atomic_read(&sp->sk_wmem_alloc),
- atomic_read(&sp->sk_rmem_alloc),
+ sk_wmem_alloc_get(sp),
+ sk_rmem_alloc_get(sp),
0, 0L, 0,
sock_i_uid(sp), 0,
sock_i_ino(sp),
dest->s6_addr32[0], dest->s6_addr32[1],
dest->s6_addr32[2], dest->s6_addr32[3], destp,
sp->sk_state,
- atomic_read(&sp->sk_wmem_alloc),
- atomic_read(&sp->sk_rmem_alloc),
+ sk_wmem_alloc_get(sp),
+ sk_rmem_alloc_get(sp),
0, 0L, 0,
sock_i_uid(sp), 0,
sock_i_ino(sp),
switch (cmd) {
case TIOCOUTQ:
- amount = sk->sk_sndbuf - atomic_read(&sk->sk_wmem_alloc);
+ amount = sk->sk_sndbuf - sk_wmem_alloc_get(sk);
if (amount < 0)
amount = 0;
rc = put_user(amount, (int __user *)argp);
}
seq_printf(seq, "%08X %08X %02X %03d\n",
- atomic_read(&s->sk_wmem_alloc),
- atomic_read(&s->sk_rmem_alloc),
+ sk_wmem_alloc_get(s),
+ sk_rmem_alloc_get(s),
s->sk_state, SOCK_INODE(s->sk_socket)->i_uid);
out:
return 0;
switch (cmd) {
case TIOCOUTQ: {
long amount;
- amount = sk->sk_sndbuf - atomic_read(&sk->sk_wmem_alloc);
+
+ amount = sk->sk_sndbuf - sk_wmem_alloc_get(sk);
if (amount < 0)
amount = 0;
if (put_user(amount, (unsigned int __user *)arg))
seq_printf(f ,"%p %-6d %-6u %-6u %-6u %-6lu\n",
s,
atomic_read(&s->sk_refcnt),
- atomic_read(&s->sk_rmem_alloc),
- atomic_read(&s->sk_wmem_alloc),
+ sk_rmem_alloc_get(s),
+ sk_wmem_alloc_get(s),
sock_i_uid(s),
sock_i_ino(s)
);
seq_printf(seq, "@%02X ", llc->sap->laddr.lsap);
llc_ui_format_mac(seq, llc->daddr.mac);
seq_printf(seq, "@%02X %8d %8d %2d %3d %4d\n", llc->daddr.lsap,
- atomic_read(&sk->sk_wmem_alloc),
- atomic_read(&sk->sk_rmem_alloc) - llc->copied_seq,
+ sk_wmem_alloc_get(sk),
+ sk_rmem_alloc_get(sk) - llc->copied_seq,
sk->sk_state,
sk->sk_socket ? SOCK_INODE(sk->sk_socket)->i_uid : -1,
llc->link);
s->sk_protocol,
nlk->pid,
nlk->groups ? (u32)nlk->groups[0] : 0,
- atomic_read(&s->sk_rmem_alloc),
- atomic_read(&s->sk_wmem_alloc),
+ sk_rmem_alloc_get(s),
+ sk_wmem_alloc_get(s),
nlk->cb,
atomic_read(&s->sk_refcnt),
atomic_read(&s->sk_drops)
long amount;
lock_sock(sk);
- amount = sk->sk_sndbuf - atomic_read(&sk->sk_wmem_alloc);
+ amount = sk->sk_sndbuf - sk_wmem_alloc_get(sk);
if (amount < 0)
amount = 0;
release_sock(sk);
nr->n2count,
nr->n2,
nr->window,
- atomic_read(&s->sk_wmem_alloc),
- atomic_read(&s->sk_rmem_alloc),
+ sk_wmem_alloc_get(s),
+ sk_rmem_alloc_get(s),
s->sk_socket ? SOCK_INODE(s->sk_socket)->i_ino : 0L);
bh_unlock_sock(s);
switch (cmd) {
case SIOCOUTQ:
{
- int amount = atomic_read(&sk->sk_wmem_alloc);
+ int amount = sk_wmem_alloc_get(sk);
+
return put_user(amount, (int __user *)arg);
}
case SIOCINQ:
switch (cmd) {
case TIOCOUTQ: {
long amount;
- amount = sk->sk_sndbuf - atomic_read(&sk->sk_wmem_alloc);
+
+ amount = sk->sk_sndbuf - sk_wmem_alloc_get(sk);
if (amount < 0)
amount = 0;
return put_user(amount, (unsigned int __user *) argp);
rose->hb / HZ,
ax25_display_timer(&rose->idletimer) / (60 * HZ),
rose->idle / (60 * HZ),
- atomic_read(&s->sk_wmem_alloc),
- atomic_read(&s->sk_rmem_alloc),
+ sk_wmem_alloc_get(s),
+ sk_rmem_alloc_get(s),
s->sk_socket ? SOCK_INODE(s->sk_socket)->i_ino : 0L);
}
META_COLLECTOR(int_sk_rmem_alloc)
{
SKIP_NONLOCAL(skb);
- dst->value = atomic_read(&skb->sk->sk_rmem_alloc);
+ dst->value = sk_rmem_alloc_get(skb->sk);
}
META_COLLECTOR(int_sk_wmem_alloc)
{
SKIP_NONLOCAL(skb);
- dst->value = atomic_read(&skb->sk->sk_wmem_alloc);
+ dst->value = sk_wmem_alloc_get(skb->sk);
}
META_COLLECTOR(int_sk_omem_alloc)
if (asoc->ep->sndbuf_policy)
amt = asoc->sndbuf_used;
else
- amt = atomic_read(&asoc->base.sk->sk_wmem_alloc);
+ amt = sk_wmem_alloc_get(asoc->base.sk);
if (amt >= asoc->base.sk->sk_sndbuf) {
if (asoc->base.sk->sk_userlocks & SOCK_SNDBUF_LOCK)
{
int amt = 0;
- amt = sk->sk_sndbuf - atomic_read(&sk->sk_wmem_alloc);
+ amt = sk->sk_sndbuf - sk_wmem_alloc_get(sk);
if (amt < 0)
amt = 0;
return amt;
switch (cmd) {
case SIOCOUTQ:
- amount = atomic_read(&sk->sk_wmem_alloc);
+ amount = sk_wmem_alloc_get(sk);
err = put_user(amount, (int __user *)arg);
break;
case SIOCINQ:
switch (cmd) {
case TIOCOUTQ: {
- int amount = sk->sk_sndbuf -
- atomic_read(&sk->sk_wmem_alloc);
+ int amount = sk->sk_sndbuf - sk_wmem_alloc_get(sk);
+
if (amount < 0)
amount = 0;
rc = put_user(amount, (unsigned int __user *)argp);
devname, x25->lci & 0x0FFF, x25->state, x25->vs, x25->vr,
x25->va, x25_display_timer(s) / HZ, x25->t2 / HZ,
x25->t21 / HZ, x25->t22 / HZ, x25->t23 / HZ,
- atomic_read(&s->sk_wmem_alloc),
- atomic_read(&s->sk_rmem_alloc),
+ sk_wmem_alloc_get(s),
+ sk_rmem_alloc_get(s),
s->sk_socket ? SOCK_INODE(s->sk_socket)->i_ino : 0L);
out:
return 0;