-
Notifications
You must be signed in to change notification settings - Fork 444
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
[P4Testgen] Clean up the implementation of the BMv2 clone externs. #3976
Conversation
c09f4d5
to
c59311f
Compare
@@ -372,7 +372,7 @@ control routing(in headers_t headers, inout local_metadata_t local_metadata, ino | |||
local_metadata.route_metadata = route_metadata; | |||
} | |||
@id(0x0100000F) action trap() { | |||
clone(CloneType.I2E, 1024); |
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.
@smolkaj Just a quick clarification question. Is the session ID value here intentional? I had to change it to 511 because the open-source P4Runtime server only allows session IDs numbering lower than 512.
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.
Good catch!
This is a pretty old version of our programs. In the latest version, we use
#define COPY_TO_CPU_SESSION_ID 255
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.
Ah great, that makes things easier. Do you know whether or when there is a refresh coming to the files at
https://github.com/sonic-net/sonic-pins/tree/main/sai_p4/instantiations/google
?
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.
@rhalstea do you know the answer?
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.
Generally we would be happy to have our up-to-date programs upstreamed to p4c, we should just keep a copyright notice.
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 usually only update the programs in https://github.com/sonic-net/sonic-pins/tree/main/sai_p4/instantiations/google when we're upstreaming new features into a SONiC release which have around a 6 month cadence. However, we don't always upstream new P4 features each release.
If we want to have up-to-date programs I like @smolkaj's suggestion of p4c. The copies in sonic-pins need to be kept in sync with the P4RT App so as to not break the component tests, and that dependency would be the bottleneck.
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.
I guess I didn't explicitly answer @fruffy's question about the next refresh ... It won't be anytime soon. The feature's we're targeting for the May SONiC release don't require a P4 program updates, and we haven't decided on the features to upstream for the next November release.
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.
Thanks, that makes sense. In the meantime we can fix issues manually until the next refresh. Or we could update out-of-band (directly from the private repo to p4c's versions) , if necessary. Currently, there is no pressing need.
c59311f
to
5953941
Compare
642d842
to
366132a
Compare
This will make the implementation of recirculation functions easier. |
7742e13
to
d6c6d7d
Compare
d6c6d7d
to
d56c569
Compare
Fixes #3863.
With this pull request,
pins_middleblock.p4
should be testable without any errors.