Gabe Black has uploaded this change for review. (
https://gem5-review.googlesource.com/9521
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
---
M src/dev/net/ethertap.cc
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/src/dev/net/ethertap.cc b/src/dev/net/ethertap.cc
index ca19b48..2d52948 100644
--- a/src/dev/net/ethertap.cc
+++ b/src/dev/net/ethertap.cc
@@ -79,7 +79,16 @@
public:
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 migratea(tap->eventQueue());
+
+ tap->recvReal(revent);
+ }
};
EtherTapBase::EtherTapBase(const Params *p)
--
To view, visit https://gem5-review.googlesource.com/9521
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: If8666542d7664780c0b371230e1e5fba93fbc1c0
Gerrit-Change-Number: 9521
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev