-
Notifications
You must be signed in to change notification settings - Fork 22
Custom speed mode #469
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
Open
dipendughosh-k
wants to merge
2
commits into
master
Choose a base branch
from
custom_speed_mode
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Custom speed mode #469
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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.
Uh oh!
There was an error while loading. Please reload this page.
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.
We seem to have 3 requirements / open PR/branches for mode in addition to speed as of now :
Please check if the macsec mode approach in 3) can be extended to handle these requirements.
i.e. speed remains as is. ( it is a problematic field since it neither has a default nor is it required , which means snappi does not know what to do with it if user does not explicitly set it but sets something else ) .
Idea is not to bring in this problem for design of other l1 params into mode control. ( Not sure why it was done the way it was done ; dont have context on that ) .
Note that snappi tends to fill in missing attribs in a object with a default value or 0 ( e.g. must do for grpc mode of configuration )
So mode semantics as discussed for macsec looks like ( need to decide as a team whether it handles all of these requirements ) :
a) mode_no_change as default -> i.e. clear specification that if some other attribute is modified at l1 , keep the mode of the card as the current mode it is operating in and dont try to change. ( default op today )
b) possible mode_default -> Allows a test to revert test port to its default mode i.e. what you get if you just connect to the card first time after booting it up [ might be tricky to impl. not sure ] -> Might not be exposed initially but can have such an enum if it makes sense for some usecases. e.g. mixed set of cases in a regression where after macsec test we want to switch back to default mode for rest of tests maybe.
c) actual modes e.g. roce , macsec128 . macsec256 or high_stream_mode . ( custom last choice if must needed)
-> Expectation if this is explicitly set :
Impl. checks if this is a valid mode for speed of card and for the underlying h/w -> return error if not.
Impl. checks if current mode is same as this , then nothing more to be done.
If current mode not same expected mode and is valid, must specify that impl, must reset port to that mode and then apply the set_config on the reset port after verifying that port mode has been switched else should return appropriate error. set_config should block until port switches correctly to expected mode alongwith other specified l1 properties if any.
Please discuss if this approach handles the requirements for additional mode setting needed for some advanced scenarios in addition to speed.
Important considerations: