Remove redundant field pr_sctp_on.
MFC after: 1 week
This commit is contained in:
parent
ff6c7bf5ca
commit
0ddb429900
@ -4718,7 +4718,7 @@ sctp_handle_sack(struct mbuf *m, int offset_seg, int offset_dup,
|
||||
}
|
||||
}
|
||||
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--;
|
||||
}
|
||||
|
@ -6067,7 +6067,6 @@ sctp_get_frag_point(struct sctp_tcb *stcb,
|
||||
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_stream_queue_pending *sp)
|
||||
*/
|
||||
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 @@ sctp_move_to_outqueue(struct sctp_tcb *stcb,
|
||||
}
|
||||
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 */
|
||||
|
@ -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;
|
||||
|
@ -446,7 +446,7 @@ sctp_recover_sent_list(struct sctp_tcb *stcb)
|
||||
}
|
||||
}
|
||||
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--;
|
||||
}
|
||||
|
@ -4833,7 +4833,6 @@ sctp_release_pr_sctp_chunk(struct sctp_tcb *stcb, struct sctp_tmit_chunk *tp1,
|
||||
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++;
|
||||
|
Loading…
Reference in New Issue
Block a user