diff options
Diffstat (limited to 'net/sctp/sm_statefuns.c')
-rw-r--r-- | net/sctp/sm_statefuns.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c index 5b5ae7958322..32f57f42af9e 100644 --- a/net/sctp/sm_statefuns.c +++ b/net/sctp/sm_statefuns.c | |||
@@ -2663,9 +2663,11 @@ sctp_disposition_t sctp_sf_eat_data_6_2(const struct sctp_endpoint *ep, | |||
2663 | break; | 2663 | break; |
2664 | case SCTP_IERROR_HIGH_TSN: | 2664 | case SCTP_IERROR_HIGH_TSN: |
2665 | case SCTP_IERROR_BAD_STREAM: | 2665 | case SCTP_IERROR_BAD_STREAM: |
2666 | SCTP_INC_STATS(SCTP_MIB_IN_DATA_CHUNK_DISCARDS); | ||
2666 | goto discard_noforce; | 2667 | goto discard_noforce; |
2667 | case SCTP_IERROR_DUP_TSN: | 2668 | case SCTP_IERROR_DUP_TSN: |
2668 | case SCTP_IERROR_IGNORE_TSN: | 2669 | case SCTP_IERROR_IGNORE_TSN: |
2670 | SCTP_INC_STATS(SCTP_MIB_IN_DATA_CHUNK_DISCARDS); | ||
2669 | goto discard_force; | 2671 | goto discard_force; |
2670 | case SCTP_IERROR_NO_DATA: | 2672 | case SCTP_IERROR_NO_DATA: |
2671 | goto consume; | 2673 | goto consume; |
@@ -3652,6 +3654,7 @@ sctp_disposition_t sctp_sf_pdiscard(const struct sctp_endpoint *ep, | |||
3652 | void *arg, | 3654 | void *arg, |
3653 | sctp_cmd_seq_t *commands) | 3655 | sctp_cmd_seq_t *commands) |
3654 | { | 3656 | { |
3657 | SCTP_INC_STATS(SCTP_MIB_IN_PKT_DISCARDS); | ||
3655 | sctp_add_cmd_sf(commands, SCTP_CMD_DISCARD_PACKET, SCTP_NULL()); | 3658 | sctp_add_cmd_sf(commands, SCTP_CMD_DISCARD_PACKET, SCTP_NULL()); |
3656 | 3659 | ||
3657 | return SCTP_DISPOSITION_CONSUME; | 3660 | return SCTP_DISPOSITION_CONSUME; |
@@ -4548,6 +4551,8 @@ sctp_disposition_t sctp_sf_do_6_3_3_rtx(const struct sctp_endpoint *ep, | |||
4548 | { | 4551 | { |
4549 | struct sctp_transport *transport = arg; | 4552 | struct sctp_transport *transport = arg; |
4550 | 4553 | ||
4554 | SCTP_INC_STATS(SCTP_MIB_T3_RTX_EXPIREDS); | ||
4555 | |||
4551 | if (asoc->overall_error_count >= asoc->max_retrans) { | 4556 | if (asoc->overall_error_count >= asoc->max_retrans) { |
4552 | sctp_add_cmd_sf(commands, SCTP_CMD_SET_SK_ERR, | 4557 | sctp_add_cmd_sf(commands, SCTP_CMD_SET_SK_ERR, |
4553 | SCTP_ERROR(ETIMEDOUT)); | 4558 | SCTP_ERROR(ETIMEDOUT)); |
@@ -4616,6 +4621,7 @@ sctp_disposition_t sctp_sf_do_6_2_sack(const struct sctp_endpoint *ep, | |||
4616 | void *arg, | 4621 | void *arg, |
4617 | sctp_cmd_seq_t *commands) | 4622 | sctp_cmd_seq_t *commands) |
4618 | { | 4623 | { |
4624 | SCTP_INC_STATS(SCTP_MIB_DELAY_SACK_EXPIREDS); | ||
4619 | sctp_add_cmd_sf(commands, SCTP_CMD_GEN_SACK, SCTP_FORCE()); | 4625 | sctp_add_cmd_sf(commands, SCTP_CMD_GEN_SACK, SCTP_FORCE()); |
4620 | return SCTP_DISPOSITION_CONSUME; | 4626 | return SCTP_DISPOSITION_CONSUME; |
4621 | } | 4627 | } |
@@ -4650,6 +4656,7 @@ sctp_disposition_t sctp_sf_t1_init_timer_expire(const struct sctp_endpoint *ep, | |||
4650 | int attempts = asoc->init_err_counter + 1; | 4656 | int attempts = asoc->init_err_counter + 1; |
4651 | 4657 | ||
4652 | SCTP_DEBUG_PRINTK("Timer T1 expired (INIT).\n"); | 4658 | SCTP_DEBUG_PRINTK("Timer T1 expired (INIT).\n"); |
4659 | SCTP_INC_STATS(SCTP_MIB_T1_INIT_EXPIREDS); | ||
4653 | 4660 | ||
4654 | if (attempts <= asoc->max_init_attempts) { | 4661 | if (attempts <= asoc->max_init_attempts) { |
4655 | bp = (struct sctp_bind_addr *) &asoc->base.bind_addr; | 4662 | bp = (struct sctp_bind_addr *) &asoc->base.bind_addr; |
@@ -4709,6 +4716,7 @@ sctp_disposition_t sctp_sf_t1_cookie_timer_expire(const struct sctp_endpoint *ep | |||
4709 | int attempts = asoc->init_err_counter + 1; | 4716 | int attempts = asoc->init_err_counter + 1; |
4710 | 4717 | ||
4711 | SCTP_DEBUG_PRINTK("Timer T1 expired (COOKIE-ECHO).\n"); | 4718 | SCTP_DEBUG_PRINTK("Timer T1 expired (COOKIE-ECHO).\n"); |
4719 | SCTP_INC_STATS(SCTP_MIB_T1_COOKIE_EXPIREDS); | ||
4712 | 4720 | ||
4713 | if (attempts <= asoc->max_init_attempts) { | 4721 | if (attempts <= asoc->max_init_attempts) { |
4714 | repl = sctp_make_cookie_echo(asoc, NULL); | 4722 | repl = sctp_make_cookie_echo(asoc, NULL); |
@@ -4753,6 +4761,8 @@ sctp_disposition_t sctp_sf_t2_timer_expire(const struct sctp_endpoint *ep, | |||
4753 | struct sctp_chunk *reply = NULL; | 4761 | struct sctp_chunk *reply = NULL; |
4754 | 4762 | ||
4755 | SCTP_DEBUG_PRINTK("Timer T2 expired.\n"); | 4763 | SCTP_DEBUG_PRINTK("Timer T2 expired.\n"); |
4764 | SCTP_INC_STATS(SCTP_MIB_T2_SHUTDOWN_EXPIREDS); | ||
4765 | |||
4756 | if (asoc->overall_error_count >= asoc->max_retrans) { | 4766 | if (asoc->overall_error_count >= asoc->max_retrans) { |
4757 | sctp_add_cmd_sf(commands, SCTP_CMD_SET_SK_ERR, | 4767 | sctp_add_cmd_sf(commands, SCTP_CMD_SET_SK_ERR, |
4758 | SCTP_ERROR(ETIMEDOUT)); | 4768 | SCTP_ERROR(ETIMEDOUT)); |
@@ -4814,6 +4824,8 @@ sctp_disposition_t sctp_sf_t4_timer_expire( | |||
4814 | struct sctp_chunk *chunk = asoc->addip_last_asconf; | 4824 | struct sctp_chunk *chunk = asoc->addip_last_asconf; |
4815 | struct sctp_transport *transport = chunk->transport; | 4825 | struct sctp_transport *transport = chunk->transport; |
4816 | 4826 | ||
4827 | SCTP_INC_STATS(SCTP_MIB_T4_RTO_EXPIREDS); | ||
4828 | |||
4817 | /* ADDIP 4.1 B1) Increment the error counters and perform path failure | 4829 | /* ADDIP 4.1 B1) Increment the error counters and perform path failure |
4818 | * detection on the appropriate destination address as defined in | 4830 | * detection on the appropriate destination address as defined in |
4819 | * RFC2960 [5] section 8.1 and 8.2. | 4831 | * RFC2960 [5] section 8.1 and 8.2. |
@@ -4880,6 +4892,7 @@ sctp_disposition_t sctp_sf_t5_timer_expire(const struct sctp_endpoint *ep, | |||
4880 | struct sctp_chunk *reply = NULL; | 4892 | struct sctp_chunk *reply = NULL; |
4881 | 4893 | ||
4882 | SCTP_DEBUG_PRINTK("Timer T5 expired.\n"); | 4894 | SCTP_DEBUG_PRINTK("Timer T5 expired.\n"); |
4895 | SCTP_INC_STATS(SCTP_MIB_T5_SHUTDOWN_GUARD_EXPIREDS); | ||
4883 | 4896 | ||
4884 | reply = sctp_make_abort(asoc, NULL, 0); | 4897 | reply = sctp_make_abort(asoc, NULL, 0); |
4885 | if (!reply) | 4898 | if (!reply) |
@@ -4910,6 +4923,8 @@ sctp_disposition_t sctp_sf_autoclose_timer_expire( | |||
4910 | { | 4923 | { |
4911 | int disposition; | 4924 | int disposition; |
4912 | 4925 | ||
4926 | SCTP_INC_STATS(SCTP_MIB_AUTOCLOSE_EXPIREDS); | ||
4927 | |||
4913 | /* From 9.2 Shutdown of an Association | 4928 | /* From 9.2 Shutdown of an Association |
4914 | * Upon receipt of the SHUTDOWN primitive from its upper | 4929 | * Upon receipt of the SHUTDOWN primitive from its upper |
4915 | * layer, the endpoint enters SHUTDOWN-PENDING state and | 4930 | * layer, the endpoint enters SHUTDOWN-PENDING state and |