-
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
add support for locked bridge ports and locked fdb entries #457
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
e523872
to
b35f21c
Compare
b35f21c
to
bea96b9
Compare
bea96b9
to
5f3c205
Compare
Update proto for latest ofdpa.proto: * a3d97dc40faf api: ofdpa: add functions to configure per port learning Signed-off-by: Jonas Gorski <jonas.gorski@bisdn.de>
5f3c205
to
4e008b4
Compare
9 tasks
559afbc
to
8516c1d
Compare
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 <jonas.gorski@bisdn.de>
To ensure that ports work as expected, initialize learning on connect. Signed-off-by: Jonas Gorski <jonas.gorski@bisdn.de>
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 <jonas.gorski@bisdn.de>
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 <jonas.gorski@bisdn.de>
Treat locked fdb entries like they don't exist, so let check_ll_neigh() also return false for them. Signed-off-by: Jonas Gorski <jonas.gorski@bisdn.de>
8516c1d
to
dcab584
Compare
Is it wise to use the term "sai" within our code here, while actually just miming certain behaviours of it and not using SAI in any way, shape or form? I would think that this might be pretty confusing for somebody stumbling over this function. Maybe it would be better to only use "sai" in a comment? |
nvm, we seem to have used this before, so this is not the point to discuss it |
jklare
approved these changes
Feb 12, 2025
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.
Add support for the
LOCKED
flag of switch ports and fdb entries:LOCKED
ports do not learn and do not forward packets from unknown mac addresses, so disable learning and forwarding for them.LOCKED
fdb entries are not used for forwarding, but mark a mac address as "seen" on a port. Since this is basically like they weren't learnt, ignore these entries and only add them to OF-DPA once they lose theirLOCKED
flag.To be able to do so, we need to enhance OF-DPA with the ability to do fine grained learning configuration. Since OF-DPA is old, model the internal interface after SAI [1], with a two modifications:
[1] https://github.com/opencomputeproject/SAI/blob/5ff3424512031258ed2431b06b64beea5bc36712/inc/saibridge.h#L39