]> www.infradead.org Git - users/dwmw2/qemu.git/commit
hw/net: handle flow control in mcf_fec driver receiver
authorGreg Ungerer <gerg@uclinux.org>
Tue, 28 Jul 2015 01:02:54 +0000 (11:02 +1000)
committerStefan Hajnoczi <stefanha@redhat.com>
Tue, 28 Jul 2015 10:27:53 +0000 (11:27 +0100)
commitff1d2ac949dc94d8a0e71fd46939fb69c2ef075b
tree4adfaaab78b2d10798171a6727c952e458fe69f2
parentf8787f8723eaca1be99e3b1873e54de163fffa93
hw/net: handle flow control in mcf_fec driver receiver

The network mcf_fec driver emulated receive side method is not dealing
with network queue flow control properly.

Modify the receive side to check if we have enough space in the
descriptors to store the current packet. If not we process none of it
and return 0. When the guest frees up some buffers through its descriptors
we signal the qemu net layer to send more packets.

[Fixed coding style: 4-space indent and curly braces on if statement.
--Stefan]

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Message-id: 1438045374-10358-1-git-send-email-gerg@uclinux.org
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
hw/net/mcf_fec.c