Fam Zheng f9f7492ea4 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>
2015-07-27 14:12:18 +01:00
..
2015-07-20 17:47:24 +01:00
2015-04-27 18:24:18 +02:00
2015-07-13 13:35:51 +01:00
2015-07-24 13:07:10 +01:00
2015-05-29 11:28:59 +01:00
2015-07-13 13:35:51 +01:00
2015-07-20 12:21:18 -04:00
2015-07-08 10:09:55 +03:00
2015-06-23 19:57:28 +03:00
2014-10-24 12:19:11 +01:00
2015-07-14 19:10:03 +02:00
2015-03-19 11:11:55 +03:00
2015-06-22 18:20:40 +02:00
2015-07-27 14:12:18 +01:00
2015-07-22 14:56:01 -06:00
2015-07-20 13:25:28 +01:00
2015-06-23 18:25:55 +01:00