Author: rrs
Date: Thu Apr  7 09:34:41 2016
New Revision: 297663
URL: https://svnweb.freebsd.org/changeset/base/297663

Log:
  A couple of minor changes that I missed that Michael had done, most noted
  in these is the change to non-strict ordering for incoming data (this will
  make pkt-drill test 14 fail but its expected).

Modified:
  head/sys/netinet/sctp_indata.h
  head/sys/netinet/sctp_os_bsd.h
  head/sys/netinet/sctp_output.c
  head/sys/netinet/sctp_sysctl.h
  head/sys/netinet/sctp_var.h
  head/sys/netinet/sctputil.c

Modified: head/sys/netinet/sctp_indata.h
==============================================================================
--- head/sys/netinet/sctp_indata.h      Thu Apr  7 09:10:34 2016        
(r297662)
+++ head/sys/netinet/sctp_indata.h      Thu Apr  7 09:34:41 2016        
(r297663)
@@ -53,7 +53,7 @@ sctp_build_readq_entry(struct sctp_tcb *
                memset(_ctl, 0, sizeof(struct sctp_queued_to_read)); \
                (_ctl)->sinfo_stream = stream_no; \
                (_ctl)->sinfo_ssn = stream_seq; \
-               TAILQ_INIT(&_ctl->reasm);       \
+               TAILQ_INIT(&_ctl->reasm); \
                (_ctl)->top_fsn = tfsn; \
                (_ctl)->msg_id = msgid; \
                (_ctl)->sinfo_flags = (flags << 8); \

Modified: head/sys/netinet/sctp_os_bsd.h
==============================================================================
--- head/sys/netinet/sctp_os_bsd.h      Thu Apr  7 09:10:34 2016        
(r297662)
+++ head/sys/netinet/sctp_os_bsd.h      Thu Apr  7 09:34:41 2016        
(r297663)
@@ -480,9 +480,9 @@ sctp_get_mbuf_for_msg(unsigned int space
 #define SCTP_SAVE_ATOMIC_DECREMENT(addr, val) \
 { \
        int32_t oldval; \
-       oldval = atomic_fetchadd_int(addr, -val);      \
+       oldval = atomic_fetchadd_int(addr, -val); \
        if (oldval < val) { \
-               panic("Counter goes negative addr:%p val:%d oldval:%d", addr, 
val, oldval); \
+               panic("Counter goes negative"); \
        } \
 }
 #else

Modified: head/sys/netinet/sctp_output.c
==============================================================================
--- head/sys/netinet/sctp_output.c      Thu Apr  7 09:10:34 2016        
(r297662)
+++ head/sys/netinet/sctp_output.c      Thu Apr  7 09:34:41 2016        
(r297663)
@@ -10499,6 +10499,7 @@ sctp_fill_in_rest:
                                strseq++;
                        } else {
                                strseq_m->stream = 
ntohs(at->rec.data.stream_number);
+                               strseq_m->reserved = ntohs(0);
                                strseq_m->msg_id = 
ntohl(at->rec.data.stream_seq);
                                strseq_m++;
                        }

Modified: head/sys/netinet/sctp_sysctl.h
==============================================================================
--- head/sys/netinet/sctp_sysctl.h      Thu Apr  7 09:10:34 2016        
(r297662)
+++ head/sys/netinet/sctp_sysctl.h      Thu Apr  7 09:34:41 2016        
(r297663)
@@ -432,7 +432,7 @@ struct sctp_sysctl {
 #define SCTPCTL_STRICT_DATA_ORDER_DESC "Enforce strict data ordering, abort if 
control inside data"
 #define SCTPCTL_STRICT_DATA_ORDER_MIN  0
 #define SCTPCTL_STRICT_DATA_ORDER_MAX  1
-#define SCTPCTL_STRICT_DATA_ORDER_DEFAULT      1
+#define SCTPCTL_STRICT_DATA_ORDER_DEFAULT      0
 
 /* min_residual: min residual in a data fragment leftover */
 #define SCTPCTL_MIN_RESIDUAL_DESC      "Minimum residual data chunk in second 
part of split"

Modified: head/sys/netinet/sctp_var.h
==============================================================================
--- head/sys/netinet/sctp_var.h Thu Apr  7 09:10:34 2016        (r297662)
+++ head/sys/netinet/sctp_var.h Thu Apr  7 09:34:41 2016        (r297663)
@@ -99,8 +99,8 @@ extern struct pr_usrreqs sctp_usrreqs;
  */
 #ifdef INVARIANTS
 #define sctp_free_a_readq(_stcb, _readq) { \
-               if ((_readq)->on_strm_q)                \
-                       panic("On strm q stcb:%p readq:%p", (_stcb), (_readq)); 
\
+       if ((_readq)->on_strm_q) \
+               panic("On strm q stcb:%p readq:%p", (_stcb), (_readq)); \
        SCTP_ZONE_FREE(SCTP_BASE_INFO(ipi_zone_readq), (_readq)); \
        SCTP_DECR_READQ_COUNT(); \
 }
@@ -204,7 +204,7 @@ extern struct pr_usrreqs sctp_usrreqs;
 }
 
 #define sctp_sbfree(ctl, stcb, sb, m) { \
-       SCTP_SAVE_ATOMIC_DECREMENT(&(sb)->sb_cc, SCTP_BUF_LEN((m)));    \
+       SCTP_SAVE_ATOMIC_DECREMENT(&(sb)->sb_cc, SCTP_BUF_LEN((m))); \
        SCTP_SAVE_ATOMIC_DECREMENT(&(sb)->sb_mbcnt, MSIZE); \
        if (((ctl)->do_not_ref_stcb == 0) && stcb) {\
                SCTP_SAVE_ATOMIC_DECREMENT(&(stcb)->asoc.sb_cc, 
SCTP_BUF_LEN((m))); \

Modified: head/sys/netinet/sctputil.c
==============================================================================
--- head/sys/netinet/sctputil.c Thu Apr  7 09:10:34 2016        (r297662)
+++ head/sys/netinet/sctputil.c Thu Apr  7 09:34:41 2016        (r297663)
@@ -6100,7 +6100,7 @@ wait_some_more:
                                 * corrupt?
                                 */
 #ifdef INVARIANTS
-                               panic("Impossible data==NULL length !=0 
control:%p stcb:%p length:%d", control, stcb, control->length);
+                               panic("Impossible data==NULL length !=0");
 #endif
                                out_flags |= MSG_EOR;
                                out_flags |= MSG_TRUNC;
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to