mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-26 20:03:54 -06:00
hw/net: Make NetCanReceive() return a boolean
The NetCanReceive handler return whether the device can or can not receive new packets. Make it obvious by returning a boolean type. Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Acked-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Cédric Le Goater <clg@kaod.org> Signed-off-by: Jason Wang <jasowang@redhat.com>
This commit is contained in:
parent
3317db7439
commit
b8c4b67e3e
20 changed files with 45 additions and 48 deletions
|
@ -74,7 +74,7 @@ static ssize_t filter_buffer_receive_iov(NetFilterState *nf,
|
|||
* the filter can still accept packets until its internal queue is full.
|
||||
* For example:
|
||||
* For some reason, receiver could not receive more packets
|
||||
* (.can_receive() returns zero). Without a filter, at most one packet
|
||||
* (.can_receive() returns false). Without a filter, at most one packet
|
||||
* will be queued in incoming queue and sender's poll will be disabled
|
||||
* unit its sent_cb() was called. With a filter, it will keep receiving
|
||||
* the packets without caring about the receiver. This is suboptimal.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue