net: disable receiving if client returns zero

If a receiver returns zero, that means its queue is full and it will
notify us when room is available using qemu_flush_queued_packets().

Take note of that and disable that receiver until it flushes its queue.

This is a first step towards allowing can_receive() handlers to return
true even if no buffer space is available.

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
Mark McLoughlin 2009-10-27 18:16:36 +00:00 committed by Anthony Liguori
parent be1636b3ab
commit 893379efd0
2 changed files with 39 additions and 11 deletions

1
net.h
View file

@ -61,6 +61,7 @@ struct VLANClientState {
char *model;
char *name;
char info_str[256];
unsigned receive_disabled : 1;
};
struct VLANState {