linux/net/sctp
Dilip Daya f406c8b969 sctp: Add buffer utilization fields to /proc/net/sctp/assocs
sctp: Add buffer utilization fields to /proc/net/sctp/assocs

This patch adds the following fields to /proc/net/sctp/assocs output:

	- sk->sk_wmem_alloc as "wmema"	(transmit queue bytes committed)
	- sk->sk_wmem_queued as "wmemq"	(persistent queue size)
	- sk->sk_sndbuf as "sndbuf"	(size of send buffer in bytes)
	- sk->sk_rcvbuf as "rcvbuf"	(size of receive buffer in bytes)

When small DATA chunks containing 136 bytes data are sent the TX_QUEUE
(assoc->sndbuf_used) reaches a maximum of 40.9% of sk_sndbuf value when
peer.rwnd = 0. This was diagnosed from sk_wmem_alloc value reaching maximum
value of sk_sndbuf.

TX_QUEUE (assoc->sndbuf_used), sk_wmem_alloc and sk_wmem_queued values are
incremented in sctp_set_owner_w() for outgoing data chunks. Having access to
the above values in /proc/net/sctp/assocs will provide a better understanding
of SCTP buffer management.

With patch applied, example output when peer.rwnd = 0

where:
    ASSOC ffff880132298000 is sender
          ffff880125343000 is receiver

 ASSOC           SOCK            STY SST ST  HBKT ASSOC-ID TX_QUEUE RX_QUEUE \
ffff880132298000 ffff880124a0a0c0 2   1   3  29325    1      214656        0 \
ffff880125343000 ffff8801237d7700 2   1   3  36210    2           0   524520 \

UID   INODE LPORT  RPORT LADDRS <-> RADDRS       HBINT   INS  OUTS \
  0   25108 3455   3456  *10.4.8.3 <-> *10.5.8.3  7500     2     2 \
  0   27819 3456   3455  *10.5.8.3 <-> *10.4.8.3  7500     2     2 \

MAXRT T1X T2X RTXC   wmema   wmemq  sndbuf  rcvbuf
    4   0   0   72  525633  440320  524288  524288
    4   0   0    0       1       0  524288  524288

Signed-off-by: Dilip Daya <dilip.daya@hp.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-04-16 16:43:34 -04:00
..
associola.c net: sctp: minor: make sctp_ep_common's member 'dead' a bool 2013-04-15 14:11:37 -04:00
auth.c
bind_addr.c
chunk.c
command.c
debug.c
endpointola.c net: sctp: minor: make sctp_ep_common's member 'dead' a bool 2013-04-15 14:11:37 -04:00
input.c hlist: drop the node parameter from iterators 2013-02-27 19:10:24 -08:00
inqueue.c
ipv6.c
Kconfig net, sctp: remove CONFIG_EXPERIMENTAL 2013-02-13 13:57:27 -05:00
Makefile
objcnt.c
output.c
outqueue.c
primitive.c
probe.c net: proc: change proc_net_remove to remove_proc_entry 2013-02-18 14:53:08 -05:00
proc.c sctp: Add buffer utilization fields to /proc/net/sctp/assocs 2013-04-16 16:43:34 -04:00
protocol.c
sm_make_chunk.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2013-02-21 17:40:58 -08:00
sm_sideeffect.c
sm_statefuns.c sctp: Use correct sideffect command in duplicate cookie handling 2013-03-13 09:59:21 -04:00
sm_statetable.c
socket.c sctp: fix error return code in __sctp_connect() 2013-04-07 17:04:17 -04:00
ssnmap.c sctp: use KMALLOC_MAX_SIZE instead of its own MAX_KMALLOC_SIZE 2013-03-04 14:12:06 -05:00
sysctl.c
transport.c
tsnmap.c sctp: fix association hangs due to off-by-one errors in sctp_tsnmap_grow() 2013-02-28 15:34:26 -05:00
ulpevent.c
ulpqueue.c sctp: fix association hangs due to partial delivery errors 2013-02-28 15:34:27 -05:00