svn commit: r207099 - head/sys/netinet
Michael Tuexen
tuexen at FreeBSD.org
Fri Apr 23 08:19:48 UTC 2010
Author: tuexen
Date: Fri Apr 23 08:19:47 2010
New Revision: 207099
URL: http://svn.freebsd.org/changeset/base/207099
Log:
* Fix compilation when using SCTP_AUDITING_ENABLED.
* Fix delaying of SACK by taking out old optimization code
which does not optimize anymore.
* Fix fast retransmission of chunks abandoned by the
"number of retransmissions" policy.
MFC after: 3 days.
Modified:
head/sys/netinet/sctp_asconf.c
head/sys/netinet/sctp_indata.c
head/sys/netinet/sctputil.c
Modified: head/sys/netinet/sctp_asconf.c
==============================================================================
--- head/sys/netinet/sctp_asconf.c Fri Apr 23 07:32:42 2010 (r207098)
+++ head/sys/netinet/sctp_asconf.c Fri Apr 23 08:19:47 2010 (r207099)
@@ -1113,7 +1113,7 @@ sctp_assoc_immediate_retrans(struct sctp
}
SCTP_TCB_LOCK_ASSERT(stcb);
#ifdef SCTP_AUDITING_ENABLED
- sctp_auditing(4, stcb->sctp_ep, stcb->asoc.deleted_primary);
+ sctp_auditing(4, stcb->sctp_ep, stcb, stcb->asoc.deleted_primary);
#endif
sctp_chunk_output(stcb->sctp_ep, stcb, SCTP_OUTPUT_FROM_T3, SCTP_SO_NOT_LOCKED);
if ((stcb->asoc.num_send_timers_up == 0) &&
Modified: head/sys/netinet/sctp_indata.c
==============================================================================
--- head/sys/netinet/sctp_indata.c Fri Apr 23 07:32:42 2010 (r207098)
+++ head/sys/netinet/sctp_indata.c Fri Apr 23 08:19:47 2010 (r207099)
@@ -2823,25 +2823,7 @@ sctp_process_data(struct mbuf **mm, int
stcb->asoc.send_sack = 1;
}
/* Start a sack timer or QUEUE a SACK for sending */
- if ((stcb->asoc.cumulative_tsn == stcb->asoc.highest_tsn_inside_nr_map) &&
- (stcb->asoc.nr_mapping_array[0] != 0xff)) {
- if ((stcb->asoc.data_pkts_seen >= stcb->asoc.sack_freq) ||
- (stcb->asoc.delayed_ack == 0) ||
- (stcb->asoc.numduptsns) ||
- (stcb->asoc.send_sack == 1)) {
- if (SCTP_OS_TIMER_PENDING(&stcb->asoc.dack_timer.timer)) {
- (void)SCTP_OS_TIMER_STOP(&stcb->asoc.dack_timer.timer);
- }
- sctp_send_sack(stcb);
- } else {
- if (!SCTP_OS_TIMER_PENDING(&stcb->asoc.dack_timer.timer)) {
- sctp_timer_start(SCTP_TIMER_TYPE_RECV,
- stcb->sctp_ep, stcb, NULL);
- }
- }
- } else {
- sctp_sack_check(stcb, was_a_gap, &abort_flag);
- }
+ sctp_sack_check(stcb, was_a_gap, &abort_flag);
if (abort_flag)
return (2);
@@ -3532,6 +3514,25 @@ sctp_strike_gap_ack_chunks(struct sctp_t
if (tp1->sent == SCTP_DATAGRAM_RESEND) {
struct sctp_nets *alt;
+ if ((stcb->asoc.peer_supports_prsctp) &&
+ (PR_SCTP_RTX_ENABLED(tp1->flags))) {
+ /*
+ * Has it been retransmitted tv_sec times? -
+ * we store the retran count there.
+ */
+ if (tp1->snd_count > tp1->rec.data.timetodrop.tv_sec) {
+ /* Yes, so drop it */
+ if (tp1->data != NULL) {
+ (void)sctp_release_pr_sctp_chunk(stcb, tp1,
+ (SCTP_RESPONSE_TO_USER_REQ | SCTP_NOTIFY_DATAGRAM_SENT),
+ SCTP_SO_NOT_LOCKED);
+ }
+ /* Make sure to flag we had a FR */
+ tp1->whoTo->net_ack++;
+ tp1 = TAILQ_NEXT(tp1, sctp_next);
+ continue;
+ }
+ }
/* fix counts and things */
if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_FLIGHT_LOGGING_ENABLE) {
sctp_misc_ints(SCTP_FLIGHT_LOG_DOWN_RSND,
@@ -3554,25 +3555,6 @@ sctp_strike_gap_ack_chunks(struct sctp_t
/* remove from the total flight */
sctp_total_flight_decrease(stcb, tp1);
- if ((stcb->asoc.peer_supports_prsctp) &&
- (PR_SCTP_RTX_ENABLED(tp1->flags))) {
- /*
- * Has it been retransmitted tv_sec times? -
- * we store the retran count there.
- */
- if (tp1->snd_count > tp1->rec.data.timetodrop.tv_sec) {
- /* Yes, so drop it */
- if (tp1->data != NULL) {
- (void)sctp_release_pr_sctp_chunk(stcb, tp1,
- (SCTP_RESPONSE_TO_USER_REQ | SCTP_NOTIFY_DATAGRAM_SENT),
- SCTP_SO_NOT_LOCKED);
- }
- /* Make sure to flag we had a FR */
- tp1->whoTo->net_ack++;
- tp1 = TAILQ_NEXT(tp1, sctp_next);
- continue;
- }
- }
/* printf("OK, we are now ready to FR this guy\n"); */
if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_FR_LOGGING_ENABLE) {
sctp_log_fr(tp1->rec.data.TSN_seq, tp1->snd_count,
Modified: head/sys/netinet/sctputil.c
==============================================================================
--- head/sys/netinet/sctputil.c Fri Apr 23 07:32:42 2010 (r207098)
+++ head/sys/netinet/sctputil.c Fri Apr 23 08:19:47 2010 (r207099)
@@ -674,7 +674,7 @@ sctp_auditing(int from, struct sctp_inpc
sctp_audit_indx = 0;
}
rep = 1;
- SCTP_PRINTF("tot_flt_book:%d\n", tot_book);
+ SCTP_PRINTF("tot_flt_book:%d\n", tot_book_cnt);
stcb->asoc.total_flight_count = tot_book_cnt;
}
@@ -703,8 +703,8 @@ sctp_auditing(int from, struct sctp_inpc
}
}
if (lnet->flight_size != tot_out) {
- SCTP_PRINTF("net:%x flight was %d corrected to %d\n",
- (uint32_t) lnet, lnet->flight_size,
+ SCTP_PRINTF("net:%p flight was %d corrected to %d\n",
+ lnet, lnet->flight_size,
tot_out);
lnet->flight_size = tot_out;
}
More information about the svn-src-head
mailing list