-
Notifications
You must be signed in to change notification settings - Fork 10
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
1.x: backport support for locked ports and fdb entries #461
Merged
Conversation
This file contains 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
Won't fix the linter complains; this isn't just one line but almost the whole file, and would just pollute the PR. I didn't even touch any of those lines. |
8 tasks
6b55fd0
to
1fdf8b8
Compare
Update proto for latest ofdpa.proto: * a3d97dc40faf api: ofdpa: add functions to configure per port learning Signed-off-by: Jonas Gorski <[email protected]> (cherry picked from commit ad25680) Signed-off-by: Jonas Gorski <[email protected]>
Expose the newly added functions for configuring learning on a per port basis. To make it more SAI-ish, use the logical SAI states [1]. Since the default learning behavior isn't covered by any of the states, add an extra state for that. [1] https://github.com/opencomputeproject/SAI/blob/5ff3424512031258ed2431b06b64beea5bc36712/inc/saibridge.h#L39 Signed-off-by: Jonas Gorski <[email protected]> (cherry picked from commit 87b00ee) Signed-off-by: Jonas Gorski <[email protected]>
To ensure that ports work as expected, initialize learning on connect. Signed-off-by: Jonas Gorski <[email protected]> (cherry picked from commit 824632b) Signed-off-by: Jonas Gorski <[email protected]>
Update learning mode for bridge ports based on lock state, and for bond ports set the learning mode for all bonded ports. Signed-off-by: Jonas Gorski <[email protected]> (cherry picked from commit a299dd3) Signed-off-by: Jonas Gorski <[email protected]>
With ae62117 ("cnetlink: pass on layer 2 neigh updates"), we make sure to handle updates only on neighs we support, so we check both old and new to be usable. But this misses the transitions where a ll neigh becomes usable due to updates or vice versa. Fix this by treating those changes as a new or deleted ll neigh insted of ignoring it alltogether. Fixes: ae62117 ("cnetlink: pass on layer 2 neigh updates") Signed-off-by: Jonas Gorski <[email protected]> (cherry picked from commit 3b3a65e) Signed-off-by: Jonas Gorski <[email protected]>
Treat locked fdb entries like they don't exist, so let check_ll_neigh() also return false for them. Signed-off-by: Jonas Gorski <[email protected]> (cherry picked from commit dcab584) Signed-off-by: Jonas Gorski <[email protected]>
In controller::port_set_move_learn(), we convert the passed enum to flags, but then pass on the original enum instead to OF-DPA. This sets a random configuration, which may or may not be what we actually intentend. Fix this by passing the correct flags variable. Fixes: 87b00ee ("ofdpa_client: expose per port learning configuration") Signed-off-by: Jonas Gorski <[email protected]> (cherry picked from commit 00ed2ca) Signed-off-by: Jonas Gorski <[email protected]>
Port nbi_impl::port_notification() is handled in a different thread than our netlink handling thread, so any gRPC calls it may do will race against gRPC calls done by the netlink thread, and it seems our gRPC code is not thread-safe. So move the port learning setup to cnetlink::link_created(), so that we avoid parallel gRPC calls. Fixes broken bond interfaces when setup by systemd-networkd. Fixes: 824632b ("nbi_impl: initialize learning on connect") Signed-off-by: Jonas Gorski <[email protected]> (cherry picked from commit 7170e72) Signed-off-by: Jonas Gorski <[email protected]>
1fdf8b8
to
170617c
Compare
ideaship
approved these changes
Feb 20, 2025
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.
LGTM
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.
Backport of changes for support of locked ports and fdb entries.
Consists of backports of #457 and the follow up fix #460.
Depends on