Skip to content

process netlink events synchronously#489

Open
KanjiMonster wants to merge 2 commits into
mainfrom
jogo_sync_nl_events
Open

process netlink events synchronously#489
KanjiMonster wants to merge 2 commits into
mainfrom
jogo_sync_nl_events

Conversation

@KanjiMonster

@KanjiMonster KanjiMonster commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

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.

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]>
@KanjiMonster KanjiMonster requested a review from rubensfig June 2, 2026 09:07
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.

1 participant