Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F160352699
D27922.id82548.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D27922.id82548.diff
View Options
diff --git a/sys/dev/virtio/network/if_vtnet.c b/sys/dev/virtio/network/if_vtnet.c
--- a/sys/dev/virtio/network/if_vtnet.c
+++ b/sys/dev/virtio/network/if_vtnet.c
@@ -3120,11 +3120,13 @@
struct vtnet_txq *txq;
int i;
+ VTNET_CORE_LOCK_ASSERT(sc);
+
/*
* Lock and unlock the per-queue mutex so we known the stop
* state is visible. Doing only the active queues should be
* sufficient, but it does not cost much extra to do all the
- * queues. Note we hold the core mutex here too.
+ * queues.
*/
for (i = 0; i < sc->vtnet_max_vq_pairs; i++) {
rxq = &sc->vtnet_rxqs[i];
@@ -3168,8 +3170,8 @@
virtio_stop(dev);
vtnet_stop_rendezvous(sc);
- /* Free any mbufs left in the virtqueues. */
vtnet_drain_rxtx_queues(sc);
+ sc->vtnet_act_vq_pairs = 1;
}
static int
@@ -4278,10 +4280,14 @@
static void
vtnet_enable_rx_interrupts(struct vtnet_softc *sc)
{
+ struct vtnet_rxq *rxq;
int i;
- for (i = 0; i < sc->vtnet_act_vq_pairs; i++)
- vtnet_rxq_enable_intr(&sc->vtnet_rxqs[i]);
+ for (i = 0; i < sc->vtnet_act_vq_pairs; i++) {
+ rxq = &sc->vtnet_rxqs[i];
+ if (vtnet_rxq_enable_intr(rxq) != 0)
+ taskqueue_enqueue(rxq->vtnrx_tq, &rxq->vtnrx_intrtask);
+ }
}
static void
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Jun 24, 2:39 PM (9 h, 19 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34286171
Default Alt Text
D27922.id82548.diff (1 KB)
Attached To
Mode
D27922: if_vtnet: Schedule Rx task if pending items when enabling interrupt
Attached
Detach File
Event Timeline
Log In to Comment