saithriftv2: link VPP libraries for platform=vpp + bookworm/py3 build fixes#2299
Open
nicholasching wants to merge 5 commits into
Open
saithriftv2: link VPP libraries for platform=vpp + bookworm/py3 build fixes#2299nicholasching wants to merge 5 commits into
nicholasching wants to merge 5 commits into
Conversation
Signed-off-by: Nicholas Ching <nicholaslching@gmail.com>
Signed-off-by: Nicholas Ching <nicholaslching@gmail.com>
Signed-off-by: Nicholas Ching <nicholaslching@gmail.com>
Signed-off-by: Nicholas Ching <nicholaslching@gmail.com>
Author
|
@tjchadaga please run azure pipeline when possible; this PR is needed for an upstream feature at Cisco ASAP, thanks! |
| #include <netinet/in.h> | ||
| #include <arpa/inet.h> | ||
| #include "sai_rpc.h" | ||
| #include <swss/logger.h> |
There was a problem hiding this comment.
This adds extra dependency on SONiC swss. This is not right for the projects running independently from SONiC.
Author
There was a problem hiding this comment.
I agree! I was using that before to route saiserver logs to stdout for debugging. We do not need it anymore; I have pushed another commit to remove it. Thanks Fred!
Signed-off-by: Nicholas Ching <nicholaslching@gmail.com>
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
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.
Context / motivation
This PR is part of the SAIVPP unit-test framework: a Docker harness (
docker-sai-test-vpp) that runs the upstream OCPsai_testPTF suite against the real VPP SAI backend (libsaivs) in one container — VPP +saiserver+ PTF + veth/AF_PACKET topology. That work is documented in our devdocs undersonic-sairedis/.azure-pipelines/docker-sai-test-vpp/devdocs/(seeprogress.md).To run the suite,
saiserver(saithriftv2) must build and link against the VPP SAI backend on a bookworm/python3 toolchain. Upstreamsaithriftv2only has avslink line and a python2.7 install path, so it does not build for thevppplatform on bookworm. This is Phase 1, Task 2 of the SAIVPP UT HLD (the saithriftv2 Makefile work).What this change does
Build/packaging only, no test logic:
test/saithriftv2/Makefile— add aplatform=vpplink line that pulls in the 5 VPP librariesSaiVppXlate.crequires (-lvlib -lvlibapi -lvppapiclient -lvlibmemoryclient -lvppinfra) plus-lswsscommon; also add-lswsscommonto thevsline.test/saithriftv2/src/saiserver.cpp— enable SWSS debug logging at startup (swss::Loggerto STDOUT), so the harness captures a high-level SAI RPC trace insaiserver.log(used throughout our debugging).debian/python-saithrift.install— install the Python bindings from the python3dist-packagespath so the package builds on bookworm (was hardcoded topython2.7/site-packages).test/saithriftv2/convert_header.py— fix an enum__str__that didsplit(".")[1]and threw an IndexError on some enum names; useself.nameinstead.Scope / risk
vpplink line is new (additive); thevsline only gains-lswsscommon.