SAI
SAI copied to clipboard
Remove use of vendor specific macros
SAI should not care about which vendor is loaded, so remove the compile time requirement to specify which vendor will be.
Proposal from discussions in #1972
pleasse add authors of code that is being removed to disscuss whether this is safe
pleasse add authors of code that is being removed to disscuss whether this is safe
Sure, looking at older PRs I guess this is @chrispsommers and @richardyu-ms.
I hope this ping is sufficient to ask for a review :-)
did you make test with your changes in different platforms, meanwhile did you run those change in build-image repo? Indeed, we expect the SAI module does not depend on vendors, but when SAI module build on different vendor platform it related to different SAI implementation/driver, then there we might need different build parameters to build SONiC image with different SAI implementations from different vendors
I have tested this successfully on Broadcom and Innovium SAI.
I have tested this successfully on Broadcom and Innovium SAI.
Cause in your changes, there are some changes to remove the build parameters across many platforms
ifeq ($(platform),MLNX)
CDEFS = -DMLNXSAI
else
ifeq ($(platform),BFT)
CDEFS = -DBFTSAI
else
ifeq ($(platform),CAVIUM)
CDEFS = -DCAVIUMSAI
else
CDEFS = -DBRCMSAI
endif
endif
endif
I think it is better to build the image with your code on those platforms at least, it can make sure the sai component will not impact the SONiC image build.
@richardyu-ms I do not have any possibility of testing all those platforms.
It seems to me that this code is dead and unmaintained, and I would be surprised if anyone with Barefoot or Cavium runs this code.
If you are certain you require testing on these platforms to remove this code, I will be forced to give up on this PR.
[..] it can make sure the sai component will not impact the SONiC image build.
Is the saithrift component really used in SONiC? I thought it was only used internally in SAI for tests.