mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
slirp: replace qemu_notify_event() with a callback
Introduce a SlirpCb callback to kick the main io-thread. Add an intermediary sodrop() function that will call SlirpCb.notify callback when sbdrop() returns true. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
This commit is contained in:
parent
f6e5aa366f
commit
c21d959440
7 changed files with 19 additions and 6 deletions
|
@ -506,7 +506,7 @@ findso:
|
|||
SEQ_GT(ti->ti_ack, tp->t_rtseq))
|
||||
tcp_xmit_timer(tp, tp->t_rtt);
|
||||
acked = ti->ti_ack - tp->snd_una;
|
||||
sbdrop(&so->so_snd, acked);
|
||||
sodrop(so, acked);
|
||||
tp->snd_una = ti->ti_ack;
|
||||
m_free(m);
|
||||
|
||||
|
@ -1118,10 +1118,10 @@ trimthenstep6:
|
|||
}
|
||||
if (acked > so->so_snd.sb_cc) {
|
||||
tp->snd_wnd -= so->so_snd.sb_cc;
|
||||
sbdrop(&so->so_snd, (int )so->so_snd.sb_cc);
|
||||
sodrop(so, (int)so->so_snd.sb_cc);
|
||||
ourfinisacked = 1;
|
||||
} else {
|
||||
sbdrop(&so->so_snd, acked);
|
||||
sodrop(so, acked);
|
||||
tp->snd_wnd -= acked;
|
||||
ourfinisacked = 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue