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).
This commit is contained in:
Randall Stewart 2016-04-07 09:34:41 +00:00
parent 44249214d3
commit 9d18771f69
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=297663
6 changed files with 9 additions and 8 deletions

View File

@ -53,7 +53,7 @@ sctp_build_readq_entry(struct sctp_tcb *stcb,
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); \

View File

@ -480,9 +480,9 @@ sctp_get_mbuf_for_msg(unsigned int space_needed,
#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

View File

@ -10499,6 +10499,7 @@ send_forward_tsn(struct sctp_tcb *stcb,
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++;
}

View File

@ -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"

View File

@ -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))); \

View File

@ -6100,7 +6100,7 @@ sctp_sorecvmsg(struct socket *so,
* 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;