summaryrefslogtreecommitdiffstats
path: root/usr.sbin/bhyve
diff options
context:
space:
mode:
authorneel <neel@FreeBSD.org>2013-04-28 01:02:59 +0000
committerneel <neel@FreeBSD.org>2013-04-28 01:02:59 +0000
commit7b0846b1c85cbb06556e687c4b6b488553868627 (patch)
tree52e33589ebfded8cacf2e42eae6d9b656cbf4c70 /usr.sbin/bhyve
parentc965ec8018d6b43ebb81b8263ea96379738160df (diff)
downloadFreeBSD-src-7b0846b1c85cbb06556e687c4b6b488553868627.zip
FreeBSD-src-7b0846b1c85cbb06556e687c4b6b488553868627.tar.gz
Get rid of the 'vsc_rxpend' state - it doesn't serve any purpose because we
drop any frames that arrive while the device is starved for receive buffers. This makes the receive path to only execute in context of the receive thread and allows for further simplification. Reviewed by: grehan
Diffstat (limited to 'usr.sbin/bhyve')
-rw-r--r--usr.sbin/bhyve/pci_virtio_net.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/usr.sbin/bhyve/pci_virtio_net.c b/usr.sbin/bhyve/pci_virtio_net.c
index 89e1d46..4430149 100644
--- a/usr.sbin/bhyve/pci_virtio_net.c
+++ b/usr.sbin/bhyve/pci_virtio_net.c
@@ -140,7 +140,6 @@ struct pci_vtnet_softc {
int vsc_isr;
int vsc_tapfd;
int vsc_rx_ready;
- int vsc_rxpend;
int tx_in_progress;
int resetting;
@@ -323,14 +322,6 @@ pci_vtnet_tap_rx(struct pci_vtnet_softc *sc)
if (ndescs == 0) {
/*
- * Need to wait for host notification to read
- */
- if (sc->vsc_rxpend == 0) {
- WPRINTF(("vtnet: no rx descriptors !\n"));
- sc->vsc_rxpend = 1;
- }
-
- /*
* Drop the packet and try later
*/
(void) read(sc->vsc_tapfd, dummybuf, sizeof(dummybuf));
@@ -417,17 +408,6 @@ pci_vtnet_ping_rxq(struct pci_vtnet_softc *sc)
if (sc->vsc_rx_ready == 0) {
sc->vsc_rx_ready = 1;
}
-
- /*
- * If the rx queue was empty, attempt to receive a
- * packet that was previously blocked due to no rx bufs
- * available
- */
- if (sc->vsc_rxpend) {
- WPRINTF(("vtnet: rx resumed\n\r"));
- sc->vsc_rxpend = 0;
- pci_vtnet_tap_rx(sc);
- }
}
static void
OpenPOWER on IntegriCloud