Gabe Black has submitted this change and it was merged. ( )

Change subject: dev: Make sure the EtherTap device uses the right event queue.

dev: Make sure the EtherTap device uses the right event queue.

The EtherTap device may be called into from an event on the PollQueue when
some event queue other than its own is active. This change ensures that it
switches event queues if necessary before doing anything that may cause more
events to be scheduled.

Change-Id: If8666542d7664780c0b371230e1e5fba93fbc1c0
Reviewed-by: Gabe Black <>
Maintainer: Gabe Black <>
M src/dev/net/
1 file changed, 10 insertions(+), 1 deletion(-)

  Gabe Black: Looks good to me, approved; Looks good to me, approved

diff --git a/src/dev/net/ b/src/dev/net/
index ca19b48..8d08cc2 100644
--- a/src/dev/net/
+++ b/src/dev/net/
@@ -79,7 +79,16 @@
     TapEvent(EtherTapBase *_tap, int fd, int e)
         : PollEvent(fd, e), tap(_tap) {}
-    virtual void process(int revent) { tap->recvReal(revent); }
+    void
+    process(int revent) override
+    {
+ // Ensure that our event queue is active. It may not be since we get + // here from the PollQueue whenever a real packet happens to arrive.
+        EventQueue::ScopedMigration migrate(tap->eventQueue());
+        tap->recvReal(revent);
+    }

 EtherTapBase::EtherTapBase(const Params *p)

To view, visit
To unsubscribe, or for help writing mail filters, visit

Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: If8666542d7664780c0b371230e1e5fba93fbc1c0
Gerrit-Change-Number: 9521
Gerrit-PatchSet: 3
Gerrit-Owner: Gabe Black <>
Gerrit-Reviewer: Andreas Sandberg <>
Gerrit-Reviewer: Gabe Black <>
Gerrit-Reviewer: Jason Lowe-Power <>
Gerrit-MessageType: merged
gem5-dev mailing list

Reply via email to