-
Notifications
You must be signed in to change notification settings - Fork 477
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
protobuf file generation for SAI headers #1980
base: master
Are you sure you want to change the base?
Conversation
please fix build errors and sign your commit to pass DCO |
Signed-off-by: raghunandan403 <[email protected]>
Signed-off-by: raghunandan403 <[email protected]>
@kcudnik ,
Building SAI meta XML... Uncaught exception from user code: |
hmm, not sure why this errors shows on pipeline, maybe perl in pipeline needs some extra include directory for search in path |
How do i take it forward? |
That's the problem there is no access to pipeline everything is in yml file in SAI repo you can see. Configuration there |
use warnings; | ||
use diagnostics; | ||
|
||
use 5.020; |
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.
why explicit perl version ?
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.
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 would like to remove that, unless you need very specific feature that is present in that specific version, then please add comments why this version is necessary
@raghunandan403 |
The code is at : I had some hurdles in committing the code. The sanity tests were failing for unknown reason.. I havent spent the time to get it committed. But, we are using this internally for DPU based implementation. |
The changes does the following:
The above changes, when given "make rpc" from meta folder, will generate a sai.proto file.
have made changes related to protobuf in:
A new Template toolkit added for generating proto that consist of
The Enums are generated. But, not all enums have a value initialised. So, rt now, I commented Enums generation. I will fix this in coming weeks
A new gensaiprotorpc.pl is added in meta directory. this will have script to generate the .proto.
A new target is added in meta/Makefile "protorpc". When the make is given, it runs the above pearl file. This will build a .proto and also generate .c and .h file.
As a part of the make of the SAI, both thrift and proto will be built. To check if the .proto is generated properly, the script will try to generate the .c and .h file based on the .proto file. If the .proto file has some issue, the make will fail and bail out.