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.
This pull requests adds support for the following use-cases related to Linux interfaces and VRFs:
These use-cases are very specific but needed for one of our internal projects.
This PR also fixes the issue with '"flapping" link notifications from netlink - i.e. receiving link DOWN for a very short time (<1ms) because something is being configured on the interface. This causes unnecessary re-creation of everything that depends on it.
The solution is to simply delay DOWN notification (unless the interface was fully removed) for a few milliseconds. UP notifications and reactions to removed interfaces (i.e. something that can be triggered by NB txn) is not delayed so that txns execute as fast as possible.
During the making of this PR I have also realized that contexts are ever more needed in descriptor methods (#1569). With them (and some additional work) we will be able to get rid of or at least simplify the derived keys, which are getting really long and their parsing functions are complicated and error prone. For interface addresses and VRFs I had decided to carry all necessary information in the derived values instead of putting them into already complicated keys (e.g. https://github.com/milanlenco/vpp-agent/blob/master/plugins/linux/ifplugin/descriptor/interface.go#L664-L671). But this is only temporary and I plan to start on working on descriptor contexts and getting rid of all the complexity currently associated with derived values.
Btw. it was verified that PR doesn't break any e2e or integration tests for any of the supported VPP versions.
Signed-off-by: Milan Lenco [email protected]