Skip to content

Commit

Permalink
Sync with FreeBSD
Browse files Browse the repository at this point in the history
  • Loading branch information
tuexen committed Aug 3, 2022
1 parent fd21694 commit e19d122
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 12 deletions.
8 changes: 3 additions & 5 deletions usrsctplib/netinet/sctp_indata.c
Original file line number Diff line number Diff line change
Expand Up @@ -3320,7 +3320,6 @@ sctp_strike_gap_ack_chunks(struct sctp_tcb *stcb, struct sctp_association *asoc,
struct sctp_tmit_chunk *tp1;
int strike_flag = 0;
struct timeval now;
int tot_retrans = 0;
uint32_t sending_seq;
struct sctp_nets *net;
int num_dests_sacked = 0;
Expand Down Expand Up @@ -3691,7 +3690,6 @@ sctp_strike_gap_ack_chunks(struct sctp_tcb *stcb, struct sctp_association *asoc,
}

tp1->rec.data.doing_fast_retransmit = 1;
tot_retrans++;
/* mark the sending seq for possible subsequent FR's */
/*
* SCTP_PRINTF("Marking TSN for FR new value %x\n",
Expand Down Expand Up @@ -3874,13 +3872,13 @@ sctp_fs_audit(struct sctp_association *asoc)

if ((inflight > 0) || (inbetween > 0)) {
#ifdef INVARIANTS
panic("Flight size-express incorrect? \n");
panic("Flight size-express incorrect F: %d I: %d R: %d Ab: %d ACK: %d",
inflight, inbetween, resend, above, acked);
#else
SCTP_PRINTF("asoc->total_flight: %d cnt: %d\n",
entry_flight, entry_cnt);

SCTP_PRINTF("Flight size-express incorrect F: %d I: %d R: %d Ab: %d ACK: %d\n",
inflight, inbetween, resend, above, acked);
inflight, inbetween, resend, above, acked);
ret = 1;
#endif
}
Expand Down
4 changes: 1 addition & 3 deletions usrsctplib/netinet/sctp_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -9958,7 +9958,7 @@ sctp_chunk_retransmission(struct sctp_inpcb *inp,
struct mbuf *m, *endofchain;
struct sctp_nets *net = NULL;
uint32_t tsns_sent = 0;
int no_fragmentflg, bundle_at, cnt_thru;
int no_fragmentflg, bundle_at;
unsigned int mtu;
int error, i, one_chunk, fwd_tsn, ctl_cnt, tmr_started;
struct sctp_auth_chunk *auth = NULL;
Expand Down Expand Up @@ -10034,7 +10034,6 @@ sctp_chunk_retransmission(struct sctp_inpcb *inp,
}
}
one_chunk = 0;
cnt_thru = 0;
/* do we have control chunks to retransmit? */
if (m != NULL) {
/* Start a timer no matter if we succeed or fail */
Expand Down Expand Up @@ -10356,7 +10355,6 @@ sctp_chunk_retransmission(struct sctp_inpcb *inp,
/* (void)SCTP_GETTIME_TIMEVAL(&net->last_sent_time); */

/* For auto-close */
cnt_thru++;
if (*now_filled == 0) {
(void)SCTP_GETTIME_TIMEVAL(&asoc->time_last_sent);
*now = asoc->time_last_sent;
Expand Down
4 changes: 2 additions & 2 deletions usrsctplib/netinet/sctp_pcb.c
Original file line number Diff line number Diff line change
Expand Up @@ -4241,7 +4241,7 @@ sctp_inpcb_free(struct sctp_inpcb *inp, int immediate, int from)
inp->ip_inp.inp.inp_state = INPCB_STATE_DEAD;
if (in_pcb_checkstate(&inp->ip_inp.inp, WNT_STOPUSING, 1) != WNT_STOPUSING) {
#ifdef INVARIANTS
panic("sctp_inpcb_free inp = %p couldn't set to STOPUSING\n", (void *)inp);
panic("sctp_inpcb_free inp = %p couldn't set to STOPUSING", (void *)inp);
#else
SCTP_PRINTF("sctp_inpcb_free inp = %p couldn't set to STOPUSING\n", (void *)inp);
#endif
Expand Down Expand Up @@ -7950,7 +7950,7 @@ sctp_drain_mbufs(struct sctp_tcb *stcb)
}

void
sctp_drain()
sctp_drain(void)
{
/*
* We must walk the PCB lists for ALL associations here. The system
Expand Down
2 changes: 1 addition & 1 deletion usrsctplib/netinet/sctp_sysctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ FEATURE(sctp, "Stream Control Transmission Protocol");
*/

void
sctp_init_sysctls()
sctp_init_sysctls(void)
{
SCTP_BASE_SYSCTL(sctp_sendspace) = SCTPCTL_MAXDGRAM_DEFAULT;
SCTP_BASE_SYSCTL(sctp_recvspace) = SCTPCTL_RECVSPACE_DEFAULT;
Expand Down
4 changes: 3 additions & 1 deletion usrsctplib/netinet/sctp_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,9 @@ sctp_mark_all_for_resend(struct sctp_tcb *stcb,
unsigned int cnt_mk;
uint32_t orig_flight, orig_tf;
uint32_t tsnlast, tsnfirst;
#ifndef INVARIANTS
int recovery_cnt = 0;
#endif

/* none in flight now */
audit_tf = 0;
Expand Down Expand Up @@ -569,10 +571,10 @@ sctp_mark_all_for_resend(struct sctp_tcb *stcb,
/* Strange case our list got out of order? */
SCTP_PRINTF("Our list is out of order? last_acked:%x chk:%x\n",
(unsigned int)stcb->asoc.last_acked_seq, (unsigned int)chk->rec.data.tsn);
recovery_cnt++;
#ifdef INVARIANTS
panic("last acked >= chk on sent-Q");
#else
recovery_cnt++;
SCTP_PRINTF("Recover attempts a restart cnt:%d\n", recovery_cnt);
sctp_recover_sent_list(stcb);
if (recovery_cnt < 10) {
Expand Down

0 comments on commit e19d122

Please sign in to comment.