[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-sctp
Subject:    [PATCH] sctp: Increase the counter value of SctpInDataChunkDiscards
From:       Shan Wei <shanwei () cn ! fujitsu ! com>
Date:       2010-07-05 9:17:51
Message-ID: 4C31A33F.4090309 () cn ! fujitsu ! com
[Download RAW message or body]


The commit ac0b04627269ff16c3c7ab854a65fe6780c6e3e5 has added
an item of SctpInDataChunkDiscards for tracing discarded DATA chunk
with high tsn, bad stream or dup tsn at ESTABLISHED state.

But at SHUTDOWN-SENT state, this kind of discarded DATA chunk
can't be traced. So increase the counter value of SctpInDataChunkDiscards
for them.

Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com>
---
 net/sctp/sm_statefuns.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c
index 24b2cd5..1937f0b 100644
--- a/net/sctp/sm_statefuns.c
+++ b/net/sctp/sm_statefuns.c
@@ -3006,10 +3006,12 @@ sctp_disposition_t sctp_sf_eat_data_fast_4_4(const struct sctp_endpoint *ep,
 	error = sctp_eat_data(asoc, chunk, commands );
 	switch (error) {
 	case SCTP_IERROR_NO_ERROR:
+		break;
 	case SCTP_IERROR_HIGH_TSN:
 	case SCTP_IERROR_DUP_TSN:
 	case SCTP_IERROR_IGNORE_TSN:
 	case SCTP_IERROR_BAD_STREAM:
+		SCTP_INC_STATS(SCTP_MIB_IN_DATA_CHUNK_DISCARDS);
 		break;
 	case SCTP_IERROR_NO_DATA:
 		goto consume;
-- 
1.6.3.3
--
To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic