SAI icon indicating copy to clipboard operation
SAI copied to clipboard

Remove use of vendor specific macros

Open bluecmd opened this issue 1 year ago • 6 comments

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

bluecmd avatar Mar 01 '24 12:03 bluecmd

pleasse add authors of code that is being removed to disscuss whether this is safe

kcudnik avatar Mar 01 '24 12:03 kcudnik

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 :-)

bluecmd avatar Mar 01 '24 13:03 bluecmd

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

richardyu-ms avatar May 19 '24 09:05 richardyu-ms

I have tested this successfully on Broadcom and Innovium SAI.

bluecmd avatar May 19 '24 10:05 bluecmd

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 avatar May 25 '24 13:05 richardyu-ms

@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.

bluecmd avatar May 30 '24 20:05 bluecmd