diff options
author | Jan Kiszka <jan.kiszka@siemens.com> | 2012-03-06 00:02:23 +0100 |
---|---|---|
committer | Jan Kiszka <jan.kiszka@siemens.com> | 2012-03-13 14:05:49 +0100 |
commit | 0bca327c21750001cd21562743dc4d92eb00feb6 (patch) | |
tree | b3fc56d6838e851e5e511b43fa83a944a86b0b36 /if.c | |
parent | fe0653759544c60f1776e2db99b3d6ce24a039a0 (diff) | |
download | slirp-0bca327c21750001cd21562743dc4d92eb00feb6.zip slirp-0bca327c21750001cd21562743dc4d92eb00feb6.tar.gz slirp-0bca327c21750001cd21562743dc4d92eb00feb6.tar.bz2 |
slirp: Remove unneeded if_queued
There is now a trivial check on entry of if_start for pending packets,
so we can drop the additional tracking via if_queued.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Diffstat (limited to 'if.c')
-rw-r--r-- | if.c | 11 |
1 files changed, 1 insertions, 10 deletions
@@ -107,8 +107,6 @@ void if_output(struct socket *so, struct mbuf *ifm) insque(ifm, ifq); diddit: - slirp->if_queued++; - if (so) { /* Update *_queued */ so->so_queued++; @@ -153,7 +151,6 @@ diddit: void if_start(Slirp *slirp) { uint64_t now = qemu_get_clock_ns(rt_clock); - int requeued = 0; bool from_batchq, next_from_batchq; struct mbuf *ifm, *ifm_next, *ifqt; @@ -178,8 +175,7 @@ void if_start(Slirp *slirp) while (ifm_next) { /* check if we can really output */ if (!slirp_can_output(slirp->opaque)) { - slirp->if_start_busy = false; - return; + break; } ifm = ifm_next; @@ -196,12 +192,9 @@ void if_start(Slirp *slirp) ifm_next = NULL; } - slirp->if_queued--; - /* Try to send packet unless it already expired */ if (ifm->expiration_date >= now && !if_encap(slirp, ifm)) { /* Packet is delayed due to pending ARP resolution */ - requeued++; continue; } @@ -241,7 +234,5 @@ void if_start(Slirp *slirp) m_free(ifm); } - slirp->if_queued = requeued; - slirp->if_start_busy = false; } |