-
Notifications
You must be signed in to change notification settings - Fork 299
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
Delayed_start, stall snabb so that peer NIC drivers can fully initialize #869
Conversation
Calling
|
Blocking the whole snabb process with I'd like to leave it as is if possible, perhaps expanding the comment to make it explicit that it will stall the whole snabb process. |
I don't think blocking is an option as it breaks As of now anyways, the solution I suggested would work with Cc @lukego |
C.usleep(self.delay) | ||
self.delay = nil | ||
end | ||
if engine.now() < self.start then return end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like a neat solution to me!
@eugeneia Is there anything else you want to see before this can be merged? |
@petebristow I merged it and replaced some tabs with spaces along the way, could you make sure your editor does not emit tabs? |
An app that delays packet forwarding for a configurable period of time.
Useful when feeding pcaps into a physical nic. The delay lets the peer
NIC the link to come up before sending packets so none are dropped.
Waiting for a linkup in the NicDriver:new() delays the whole process
in every situation and is even worse when a port doesn't link as all the
timers need to expire.