Net patches
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAABAgAGBQJTIGWkAAoJEJykq7OBq3PIsvYH/jLFORFyUHflSsEmPjjRKGfR Jd41UP67CXqgOyeJfDDN/fks2o6n3woRsoz/EfPXTiOvXB50jBKqmBarOwh/Zejq /5hpUC8IyYOFpeKbiCSneXvANP+0CfH/FD8yP64a3FTBXQFQD9GzJpKf3zlcmNvI XotlIr/WxTXXNSQf2dTleobGJWg8otDFREBCvalTndSBjYZ0GdvvNOCiAkqYviX2 wLjrrRvJYW/lxOTIfTmGQFHs89tjq9ZvotKr9QPOQ5MOGaBExYnOTaSHmmPHjYpf HsWkk+u85vLSRp5FU5CTW2VfhIujBghwaFFnVh2BdMjIlzkjbDnDMcRr2YgebOw= =zhuM -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/stefanha/tags/net-pull-request' into staging Net patches # gpg: Signature made Wed 12 Mar 2014 13:48:20 GMT using RSA key ID 81AB73C8 # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" # gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>" # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35 775A 9CA4 ABB3 81AB 73C8 * remotes/stefanha/tags/net-pull-request: tap: avoid deadlocking rx Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
2f23e9ae2c
@ -190,7 +190,7 @@ static void tap_send(void *opaque)
|
|||||||
TAPState *s = opaque;
|
TAPState *s = opaque;
|
||||||
int size;
|
int size;
|
||||||
|
|
||||||
do {
|
while (qemu_can_send_packet(&s->nc)) {
|
||||||
uint8_t *buf = s->buf;
|
uint8_t *buf = s->buf;
|
||||||
|
|
||||||
size = tap_read_packet(s->fd, s->buf, sizeof(s->buf));
|
size = tap_read_packet(s->fd, s->buf, sizeof(s->buf));
|
||||||
@ -206,8 +206,11 @@ static void tap_send(void *opaque)
|
|||||||
size = qemu_send_packet_async(&s->nc, buf, size, tap_send_completed);
|
size = qemu_send_packet_async(&s->nc, buf, size, tap_send_completed);
|
||||||
if (size == 0) {
|
if (size == 0) {
|
||||||
tap_read_poll(s, false);
|
tap_read_poll(s, false);
|
||||||
|
break;
|
||||||
|
} else if (size < 0) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} while (size > 0 && qemu_can_send_packet(&s->nc));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool tap_has_ufo(NetClientState *nc)
|
static bool tap_has_ufo(NetClientState *nc)
|
||||||
|
Loading…
Reference in New Issue
Block a user