svn commit: r265963 - stable/9/sys/netinet

Michael Tuexen tuexen at FreeBSD.org
Tue May 13 17:23:41 UTC 2014


Author: tuexen
Date: Tue May 13 17:23:39 2014
New Revision: 265963
URL: http://svnweb.freebsd.org/changeset/base/265963

Log:
  MFC r255190:
  
  Remove redundant field pr_sctp_on.

Modified:
  stable/9/sys/netinet/sctp_indata.c
  stable/9/sys/netinet/sctp_output.c
  stable/9/sys/netinet/sctp_structs.h
  stable/9/sys/netinet/sctp_timer.c
  stable/9/sys/netinet/sctputil.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/netinet/sctp_indata.c
==============================================================================
--- stable/9/sys/netinet/sctp_indata.c	Tue May 13 17:21:45 2014	(r265962)
+++ stable/9/sys/netinet/sctp_indata.c	Tue May 13 17:23:39 2014	(r265963)
@@ -4718,7 +4718,7 @@ sctp_handle_sack(struct mbuf *m, int off
 			}
 		}
 		TAILQ_REMOVE(&asoc->sent_queue, tp1, sctp_next);
-		if (tp1->pr_sctp_on) {
+		if (PR_SCTP_ENABLED(tp1->flags)) {
 			if (asoc->pr_sctp_cnt != 0)
 				asoc->pr_sctp_cnt--;
 		}

Modified: stable/9/sys/netinet/sctp_output.c
==============================================================================
--- stable/9/sys/netinet/sctp_output.c	Tue May 13 17:21:45 2014	(r265962)
+++ stable/9/sys/netinet/sctp_output.c	Tue May 13 17:23:39 2014	(r265963)
@@ -6067,7 +6067,6 @@ sctp_get_frag_point(struct sctp_tcb *stc
 static void
 sctp_set_prsctp_policy(struct sctp_stream_queue_pending *sp)
 {
-	sp->pr_sctp_on = 0;
 	/*
 	 * We assume that the user wants PR_SCTP_TTL if the user provides a
 	 * positive lifetime but does not specify any PR_SCTP policy. This
@@ -6077,7 +6076,6 @@ sctp_set_prsctp_policy(struct sctp_strea
 	 */
 	if (PR_SCTP_ENABLED(sp->sinfo_flags)) {
 		sp->act_flags |= PR_SCTP_POLICY(sp->sinfo_flags);
-		sp->pr_sctp_on = 1;
 	} else {
 		return;
 	}
@@ -7425,13 +7423,8 @@ dont_do_it:
 		}
 		chk->send_size += pads;
 	}
-	/* We only re-set the policy if it is on */
-	if (sp->pr_sctp_on) {
-		sctp_set_prsctp_policy(sp);
+	if (PR_SCTP_ENABLED(chk->flags)) {
 		asoc->pr_sctp_cnt++;
-		chk->pr_sctp_on = 1;
-	} else {
-		chk->pr_sctp_on = 0;
 	}
 	if (sp->msg_is_complete && (sp->length == 0) && (sp->sender_all_done)) {
 		/* All done pull and kill the message */

Modified: stable/9/sys/netinet/sctp_structs.h
==============================================================================
--- stable/9/sys/netinet/sctp_structs.h	Tue May 13 17:21:45 2014	(r265962)
+++ stable/9/sys/netinet/sctp_structs.h	Tue May 13 17:23:39 2014	(r265963)
@@ -446,7 +446,6 @@ struct sctp_tmit_chunk {
 	uint8_t do_rtt;
 	uint8_t book_size_scale;
 	uint8_t no_fr_allowed;
-	uint8_t pr_sctp_on;
 	uint8_t copy_by_ref;
 	uint8_t window_probe;
 };
@@ -522,7 +521,6 @@ struct sctp_stream_queue_pending {
 	uint8_t holds_key_ref;
 	uint8_t msg_is_complete;
 	uint8_t some_taken;
-	uint8_t pr_sctp_on;
 	uint8_t sender_all_done;
 	uint8_t put_last_out;
 	uint8_t discard_rest;

Modified: stable/9/sys/netinet/sctp_timer.c
==============================================================================
--- stable/9/sys/netinet/sctp_timer.c	Tue May 13 17:21:45 2014	(r265962)
+++ stable/9/sys/netinet/sctp_timer.c	Tue May 13 17:23:39 2014	(r265963)
@@ -446,7 +446,7 @@ sctp_recover_sent_list(struct sctp_tcb *
 				}
 			}
 			TAILQ_REMOVE(&asoc->sent_queue, chk, sctp_next);
-			if (chk->pr_sctp_on) {
+			if (PR_SCTP_ENABLED(chk->flags)) {
 				if (asoc->pr_sctp_cnt != 0)
 					asoc->pr_sctp_cnt--;
 			}

Modified: stable/9/sys/netinet/sctputil.c
==============================================================================
--- stable/9/sys/netinet/sctputil.c	Tue May 13 17:21:45 2014	(r265962)
+++ stable/9/sys/netinet/sctputil.c	Tue May 13 17:23:39 2014	(r265963)
@@ -4833,7 +4833,6 @@ sctp_release_pr_sctp_chunk(struct sctp_t
 				atomic_add_int(&chk->whoTo->ref_count, 1);
 				chk->rec.data.TSN_seq = atomic_fetchadd_int(&stcb->asoc.sending_seq, 1);
 				stcb->asoc.pr_sctp_cnt++;
-				chk->pr_sctp_on = 1;
 				TAILQ_INSERT_TAIL(&stcb->asoc.sent_queue, chk, sctp_next);
 				stcb->asoc.sent_queue_cnt++;
 				stcb->asoc.pr_sctp_cnt++;


More information about the svn-src-stable-9 mailing list