mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 09:13:55 -06:00
net: add return value to packet receive handler
This allows us to handle queue full conditions rather than dropping the packet on the floor. Signed-off-by: Mark McLoughlin <markmc@redhat.com>
This commit is contained in:
parent
e3f5ec2b5e
commit
4f1c942b7f
18 changed files with 126 additions and 95 deletions
|
@ -353,7 +353,7 @@ static int mcf_fec_can_receive(VLANClientState *vc)
|
|||
return s->rx_enabled;
|
||||
}
|
||||
|
||||
static void mcf_fec_receive(VLANClientState *vc, const uint8_t *buf, size_t size)
|
||||
static ssize_t mcf_fec_receive(VLANClientState *vc, const uint8_t *buf, size_t size)
|
||||
{
|
||||
mcf_fec_state *s = vc->opaque;
|
||||
mcf_fec_bd bd;
|
||||
|
@ -426,6 +426,7 @@ static void mcf_fec_receive(VLANClientState *vc, const uint8_t *buf, size_t size
|
|||
s->rx_descriptor = addr;
|
||||
mcf_fec_enable_rx(s);
|
||||
mcf_fec_update(s);
|
||||
return size;
|
||||
}
|
||||
|
||||
static CPUReadMemoryFunc *mcf_fec_readfn[] = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue