svn commit: r250009 - head/usr.sbin/bhyve
Neel Natu
neel at FreeBSD.org
Sun Apr 28 01:03:03 UTC 2013
Author: neel
Date: Sun Apr 28 01:02:59 2013
New Revision: 250009
URL: http://svnweb.freebsd.org/changeset/base/250009
Log:
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
Modified:
head/usr.sbin/bhyve/pci_virtio_net.c
Modified: head/usr.sbin/bhyve/pci_virtio_net.c
==============================================================================
--- head/usr.sbin/bhyve/pci_virtio_net.c Sun Apr 28 00:57:47 2013 (r250008)
+++ head/usr.sbin/bhyve/pci_virtio_net.c Sun Apr 28 01:02:59 2013 (r250009)
@@ -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
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_soft
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
More information about the svn-src-head
mailing list