diff options
Diffstat (limited to 'include/net/sctp/sctp.h')
-rw-r--r-- | include/net/sctp/sctp.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h index 9c6414f553f9..7fdf298a47ef 100644 --- a/include/net/sctp/sctp.h +++ b/include/net/sctp/sctp.h @@ -272,6 +272,18 @@ struct sctp_mib { unsigned long mibs[SCTP_MIB_MAX]; }; +/* helper function to track stats about max rto and related transport */ +static inline void sctp_max_rto(struct sctp_association *asoc, + struct sctp_transport *trans) +{ + if (asoc->stats.max_obs_rto < (__u64)trans->rto) { + asoc->stats.max_obs_rto = trans->rto; + memset(&asoc->stats.obs_rto_ipaddr, 0, + sizeof(struct sockaddr_storage)); + memcpy(&asoc->stats.obs_rto_ipaddr, &trans->ipaddr, + trans->af_specific->sockaddr_len); + } +} /* Print debugging messages. */ #if SCTP_DEBUG |