Skip to content

Enable Lucius libsai.so builds using bazel - #716

Merged
sonikajindal merged 3 commits into
openconfig:mainfrom
royyi8:bazel_libsai_build
Sep 2, 2026
Merged

Enable Lucius libsai.so builds using bazel#716
sonikajindal merged 3 commits into
openconfig:mainfrom
royyi8:bazel_libsai_build

Conversation

@royyi8

@royyi8 royyi8 commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@royyi8
royyi8 requested a review from a team as a code owner August 24, 2026 23:25
@royyi8
royyi8 force-pushed the bazel_libsai_build branch from 7722631 to 06bc065 Compare August 24, 2026 23:45
@sonikajindal

Copy link
Copy Markdown
Contributor

/gcbrun

1 similar comment
@sonikajindal

Copy link
Copy Markdown
Contributor

/gcbrun

@royyi8
royyi8 force-pushed the bazel_libsai_build branch from fac33a5 to 63791ab Compare August 25, 2026 20:45
@sonikajindal

Copy link
Copy Markdown
Contributor

/gcbrun

@royyi8
royyi8 force-pushed the bazel_libsai_build branch from 63791ab to 191fcb6 Compare August 25, 2026 21:34
@sonikajindal

Copy link
Copy Markdown
Contributor

/gcbrun

royyi8 added 2 commits August 26, 2026 01:16
Change-Id: Ic3e6d6eb2ea6d1d894b77f26326835b5581c9a5e
Change-Id: I33f07788ad0f91dfb7fa6e2da86641028a39f3cb
@royyi8
royyi8 force-pushed the bazel_libsai_build branch from 191fcb6 to 4022dd5 Compare August 26, 2026 01:16
@sonikajindal

Copy link
Copy Markdown
Contributor

/gcbrun

1 similar comment
@sonikajindal

Copy link
Copy Markdown
Contributor

/gcbrun

Change-Id: I3e98b46e01d7f2e51802ab99c3fe5af5b9f13597
@royyi8
royyi8 force-pushed the bazel_libsai_build branch from 6f4daa9 to 3fdfa99 Compare August 27, 2026 23:28
@sonikajindal

Copy link
Copy Markdown
Contributor

/gcbrun

@sonikajindal

Copy link
Copy Markdown
Contributor

Thanks for this update of Lucius SAI, I have a few questions:

  1. What is the difference between *.grpc.pb.h an .h files? I thought they are kept in separate directories for a reason, first is the proto and second is the c++ client stub, so why are we changing the paths?
  2. In all the _grpc.go and grpc_pb.go in proto/sai, I see that we are adding many new attributes, are they from internal SAI or from the open source SAI?
  3. Don't we need a sai.patch now?

@royyi8

royyi8 commented Aug 28, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for this update of Lucius SAI, I have a few questions:

  1. What is the difference between *.grpc.pb.h an .h files? I thought they are kept in separate directories for a reason, first is the proto and second is the c++ client stub, so why are we changing the paths?
  2. In all the _grpc.go and grpc_pb.go in proto/sai, I see that we are adding many new attributes, are they from internal SAI or from the open source SAI?
  3. Don't we need a sai.patch now?
  1. In this PR, we are generating libsai client files (.cc and .h) and the grpc protobuf files(.grpc.pb.h and .grpc.pb.cc) in a single directory: dataplane/proto/sai. Both Lucius libsai.so and the go saiserver code is compiled using the generated files in this directory rather than using the static paths in the repo. We consolidated the generated code into a single directory so that we can declare all generated outputs in a single genrule, which makes it easier to resolve header include paths."

2 & 3.

This block is from the top level MODULE.bazel:

    patch_args = ["-p1"],
    patches = ["//patches:sai.patch"],
    sha256 = "94b7a7dd9dbcc46bf14ba9f12b8597e9e9c2069fcb8e383a61cdf6ca172f3511",
    strip_prefix = "SAI-1.15.0",
    urls = ["https://github.com/opencomputeproject/SAI/archive/refs/tags/v1.15.0.tar.gz"],

We use open source SAI 1.15 and apply sai.patch. This is the same approach as we do currently except we compile Lucius libsai.so using bazel rather than using makefile.

@sonikajindal
sonikajindal merged commit afcb8ba into openconfig:main Sep 2, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants