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

Adding the MacReserver class #102

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Adding the MacReserver class #102

wants to merge 1 commit into from

Conversation

notthetup
Copy link
Collaborator

Adding the MacReserver Agent.

@notthetup notthetup requested a review from mchitre July 18, 2024 09:50
@notthetup notthetup self-assigned this Jul 18, 2024
Copy link
Member

@mchitre mchitre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't requests get queues in order of arrival, and a new request from this agent be granted only after all previous requests are honored? In that case, the ReserveReq won't start a reservation on time, and transmissions will conflict with the other device.

@notthetup
Copy link
Collaborator Author

I guess that depends on the MAC implementation. But that's what will happen for the default CSMA implementation in UnetStack.

The original idea here was that this agent would effectively "hog" the MAC until the user indicated that they were done using the channel, at which point this agent give up the MAC some time and the re-acquire and repeat.

But you're right if LINK has already requested a reservation while this agent was "hogging" the MAC, LINK will get the reservation before this Agent's reservation is accepted.

One way to work around that, albeit evil, is to keep sending ClearReq to the MAC service to clear it's queues. But it'll cause the higher layers to timeout.

@mchitre
Copy link
Member

mchitre commented Jul 21, 2024

The ReservationNtf mechanism that we have for other agents to tell MAC of inferred reservation may still work for this use case. Send ReservationNtf with a long duration and that will block MAC. Then send a ReservationNtf with duration 0 and that will unblock it.

P.S. We may want to change the semantics of ReservationNtf in UnetStack 5 as the current semantics are quite restrictive. But this will work for now in UnetStack 4.

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

Successfully merging this pull request may close these issues.

2 participants