process netlink events synchronously#489
Open
KanjiMonster wants to merge 2 commits into
Open
Conversation
Currently we switch between collecting netlink events and processing them. This makes the processing bursty, and since libnl will have finished applying them to the cache it means the cache will be at a state after applying the last event of the current batch. Change this to process each netlink event as it comes in instead. This ensures that the current libnl caches are in the state of when that event happened. This means that we do not need to look into the future for anymore for objects that get deleted in the same batch. Since we do not queue messages anymore, we need to make sure to be able to handle netlink notifications before we start creating port interfaces, so notify about switch being up earlier and change the state to running. Signed-off-by: Jonas Gorski <[email protected]>
Now that we process netlink events as they come in, nl_objs is now unused, and we can drop it and all code referencing it. Signed-off-by: Jonas Gorski <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
process netlink events synchronously
Currently we switch between collecting netlink events and processing them. This makes the processing bursty, and since libnl will have finished applying them to the cache it means the cache will be at a state after applying the last event of the current batch.
Change this to process each netlink event as it comes in instead. This ensures that the current libnl caches are in the state of when that vent happened. This means that we do not need to look into the future for anymore for objects that get deleted in the same batch.
Since we do not queue messages anymore, we need to make sure to be able to handle netlink notifications before we start creating port interfaces, so notify about switch being up earlier and change the state to running.