summary refs log tree commit diff stats
path: root/scripts/qapi-commands.py
diff options
context:
space:
mode:
authorFam Zheng <famz@redhat.com>2015-07-15 18:19:13 +0800
committerStefan Hajnoczi <stefanha@redhat.com>2015-07-27 14:12:18 +0100
commitf9f7492ea4a9dda538fedeec31399fb940533a16 (patch)
treee9f392f667f0a3c63708ca15fce6db5b12559967 /scripts/qapi-commands.py
parent4594f93a732f1f5936c3a5225481586e24bffa9e (diff)
downloadfocaccia-qemu-f9f7492ea4a9dda538fedeec31399fb940533a16.tar.gz
focaccia-qemu-f9f7492ea4a9dda538fedeec31399fb940533a16.zip
axienet: Flush queued packets when rx is done
eth_can_rx checks s->rxsize and returns false if it is non-zero. Because
of the .can_receive semantics change, this will make the incoming queue
disabled by peer, until it is explicitly flushed. So we should flush it
when s->rxsize is becoming zero.

Squash eth_can_rx semantics into etx_rx and drop .can_receive()
callback, also add flush when rx buffer becomes available again after a
packet gets queued.

The other conditions, "!axienet_rx_resetting(s) &&
axienet_rx_enabled(s)" are OK because enet_write already calls
qemu_flush_queued_packets when the register bits are changed.

Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Jason Wang <jasowang@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 1436955553-22791-13-git-send-email-famz@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'scripts/qapi-commands.py')
0 files changed, 0 insertions, 0 deletions