aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp/input.c
diff options
context:
space:
mode:
authorSridhar Samudrala <sri@us.ibm.com>2006-08-22 03:15:33 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2006-09-22 17:55:16 -0400
commitac0b04627269ff16c3c7ab854a65fe6780c6e3e5 (patch)
tree421ea678ea12d1e193b3bbf27fb1410355ba9b47 /net/sctp/input.c
parent72d3b2c970a2d5d2ccb1d1cab4fb76663c4f2e49 (diff)
[SCTP]: Extend /proc/net/sctp/snmp to provide more statistics.
This patch adds more statistics info under /proc/net/sctp/snmp that should be useful for debugging. The additional events that are counted now include timer expirations, retransmits, packet and data chunk discards. The Data chunk discards include all the cases where a data chunk is discarded including high tsn, bad stream, dup tsn and the most useful one(out of receive buffer/rwnd). Also moved the SCTP MIB data structures from the generic include directories to include/sctp/sctp.h. Signed-off-by: Sridhar Samudrala <sri@us.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp/input.c')
-rw-r--r--net/sctp/input.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/net/sctp/input.c b/net/sctp/input.c
index 42b66e74bbb5..8a34d95602ce 100644
--- a/net/sctp/input.c
+++ b/net/sctp/input.c
@@ -255,10 +255,13 @@ int sctp_rcv(struct sk_buff *skb)
255 */ 255 */
256 sctp_bh_lock_sock(sk); 256 sctp_bh_lock_sock(sk);
257 257
258 if (sock_owned_by_user(sk)) 258 if (sock_owned_by_user(sk)) {
259 SCTP_INC_STATS_BH(SCTP_MIB_IN_PKT_BACKLOG);
259 sctp_add_backlog(sk, skb); 260 sctp_add_backlog(sk, skb);
260 else 261 } else {
262 SCTP_INC_STATS_BH(SCTP_MIB_IN_PKT_SOFTIRQ);
261 sctp_inq_push(&chunk->rcvr->inqueue, chunk); 263 sctp_inq_push(&chunk->rcvr->inqueue, chunk);
264 }
262 265
263 sctp_bh_unlock_sock(sk); 266 sctp_bh_unlock_sock(sk);
264 267
@@ -271,6 +274,7 @@ int sctp_rcv(struct sk_buff *skb)
271 return 0; 274 return 0;
272 275
273discard_it: 276discard_it:
277 SCTP_INC_STATS_BH(SCTP_MIB_IN_PKT_DISCARDS);
274 kfree_skb(skb); 278 kfree_skb(skb);
275 return 0; 279 return 0;
276 280