e1000e: Flush all receive queues on receive enable

Before this patch first netdev queue only was flushed.

Signed-off-by: Dmitry Fleytman <dmitry@daynix.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
This commit is contained in:
Dmitry Fleytman 2016-09-15 09:14:24 +03:00 committed by Jason Wang
parent 47f9f15831
commit 6ee0e20b65
3 changed files with 5 additions and 2 deletions

View File

@ -400,7 +400,7 @@ static void e1000e_write_config(PCIDevice *pci_dev, uint32_t address,
if (range_covers_byte(address, len, PCI_COMMAND) &&
(pci_dev->config[PCI_COMMAND] & PCI_COMMAND_MASTER)) {
qemu_flush_queued_packets(qemu_get_queue(s->nic));
e1000e_start_recv(&s->core);
}
}

View File

@ -953,7 +953,7 @@ e1000e_has_rxbufs(E1000ECore *core, const E1000E_RingInfo *r,
core->rx_desc_buf_size;
}
static inline void
void
e1000e_start_recv(E1000ECore *core)
{
int i;

View File

@ -144,3 +144,6 @@ e1000e_receive(E1000ECore *core, const uint8_t *buf, size_t size);
ssize_t
e1000e_receive_iov(E1000ECore *core, const struct iovec *iov, int iovcnt);
void
e1000e_start_recv(E1000ECore *core);