Gabe Black has submitted this change and it was merged. (
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
Reviewed-on: https://gem5-review.googlesource.com/9521
Reviewed-by: Gabe Black <[email protected]>
Maintainer: Gabe Black <[email protected]>
---
M src/dev/net/ethertap.cc
1 file changed, 10 insertions(+), 1 deletion(-)
Approvals:
Gabe Black: Looks good to me, approved; Looks good to me, approved
diff --git a/src/dev/net/ethertap.cc b/src/dev/net/ethertap.cc
index ca19b48..8d08cc2 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 migrate(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: 3
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-Reviewer: Andreas Sandberg <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev