Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Periodic Gate + PriorityScheduler ERROR #1003

Open
GOAguiar99 opened this issue Nov 21, 2024 · 3 comments
Open

Periodic Gate + PriorityScheduler ERROR #1003

GOAguiar99 opened this issue Nov 21, 2024 · 3 comments
Assignees
Labels
Milestone

Comments

@GOAguiar99
Copy link

Hello!

I'm implementing a different pending queue in the IEEE80211 module. Below is the new pending queue design:
image

The issue is that when a gate is closed, the scheduler still tries to schedule a packet, resulting in an error. Is this the expected behavior? Do you have any suggestions for what I could change to resolve this?

image

Here is the relevant part of the PriorityScheduler.cc code:
int PriorityScheduler::schedulePacket() { for (size_t i = 0; i < providers.size(); i++) { int inputIndex = getInputGateIndex(i); if (inputIndex == inProgressGateIndex || providers[inputIndex]->canPullSomePacket(inputGates[inputIndex]->getPathStartGate())) return inputIndex; } return -1; }

@levy
Copy link
Contributor

levy commented Nov 21, 2024

The scheduler should not try to pull a packet through a gate which is closed. Actually, the call to canPullSomePacket makes sure that there is a packet which can be pulled. When a gate is closed, canPullSomePacket supposed to return false independently of whether the queue contains packets or not. So your design should work the way you expect.

@levy levy self-assigned this Nov 21, 2024
@levy levy added the Bug label Nov 21, 2024
@levy levy added this to the INET 4.6 milestone Nov 21, 2024
@GOAguiar99
Copy link
Author

I appreciate your reply, @levy . Unfortunately, I need to have this working by next Monday, as it’s part of a project for my master’s class. Could you help me resolve this issue or at least point me to where the bug might be occurring?

@levy
Copy link
Contributor

levy commented Nov 22, 2024

Please attach a minimal example, preferably your NED and INI files, and the exact steps to reproduce/see the erroneous behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants