Explicitly lock the send socket buffer in spx_reass() to cover the drop
record loop for ACK'd data, rather than relying on lokcing in sbdroprecord() and sowwakeup(), reducing the number of lock operations as well as eliminating a possible race against the head of the send buffer mbuf chain. Use the _locked variants of sbdroprecord() and sowwakeup().
This commit is contained in:
parent
0cdc892230
commit
97270cf1b6
@ -486,13 +486,14 @@ register struct spx *si;
|
||||
/*
|
||||
* Trim Acked data from output queue.
|
||||
*/
|
||||
SOCKBUF_LOCK(&so->so_snd);
|
||||
while ((m = so->so_snd.sb_mb) != NULL) {
|
||||
if (SSEQ_LT((mtod(m, struct spx *))->si_seq, si->si_ack))
|
||||
sbdroprecord(&so->so_snd);
|
||||
sbdroprecord_locked(&so->so_snd);
|
||||
else
|
||||
break;
|
||||
}
|
||||
sowwakeup(so);
|
||||
sowwakeup_locked(so);
|
||||
cb->s_rack = si->si_ack;
|
||||
update_window:
|
||||
if (SSEQ_LT(cb->s_snxt, cb->s_rack))
|
||||
|
Loading…
Reference in New Issue
Block a user