Xilinx-CNS / tcpdirect

AMD TCPDirect ultra low latency kernel bypass TCP and UDP implementation for AMD Solarflare network adapters, to be used with corresponding versions of Onload®️ at https://github.com/Xilinx-CNS/onload. The stable branch is currently `v8_1`.
22 stars 17 forks source link

ON-15949: Allow user to choose debugness of build #38

Closed tcrawley-xilinx closed 2 months ago

tcrawley-xilinx commented 2 months ago

Also includes various improvements and changes to build system and packaging scripts.

The main commit is probably ON-15949: Configure build output of zf_mkdist so that it no longer builds both release and debug versions of the library.


[1/6] ON-15695: Stop stripping tcpdirect binaries

I believe this was only done because tcpdirect was proprietary, now that we are open source this should no longer be necessary.

[2/6] ON-15695: Remove separate socket shim build in CI pipeline

The stashed .so file isn't used anymore, so don't build it in the first place.

Maybe we want to keep this to verify the builds work?

[3/6] ON-15695: Shellcheck improvements to zf_make_tarball

[4/6] ON-15949: Configure build output of zf_mkdist

Previously zf_mkdist would build: release binaries, debug binaries, and the socket shim. Now that tcpdirect is open-source we don't have to do these "all in one" builds anymore.

This commit adds a new --debug option to zf_mkdist as well as slightly changing the behaviour of --shim. Now, by default, calling zf_mkdist will result in building tcpdirect in release mode. Adding --debug will change this to become a debug build. --shim now only builds the socket shim, it will inherit the debugness of the overall library.

[5/6] ON-15949: Allow optional build of debug binaries in rpm spec

[6/6] Cleanup: Archive tcpdirect srpm in CI pipeline

I think this is a regression from 229584521420588508ed23c499cd383f4c37f1d8 where our jenkins pipeline was no longer picking the tarball.

Testing done

Various manual tests including build and install from tarball and rpm (deb packages are TODO when I've set up a dut properly) Jenkins pipeline passes and actually has the srpm now I've had to make some changes to runbench build process for tcpdirect. I've got a version working and it can build tcpdirect as well as find and use the socket shim. runbench PR coming soon.

I haven't included links to private things, but feel free to ask for them if curious

sianj-xilinx commented 2 months ago

I agree that debug vs release shouldn't be a package build option. I think that installing both debug and release binaries by default is my preferred option. I fear that having a separate -debug package will leave us in the situation where the support team want to ask a customer to run in debug mode and find they're unable to because they're at a point where they can't install new packages.

abower-amd commented 2 months ago

I agree that debug vs release shouldn't be a package build option. I think that installing both debug and release binaries by default is my preferred option. I fear that having a separate -debug package will leave us in the situation where the support team want to ask a customer to run in debug mode and find they're unable to because they're at a point where they can't install new packages.

A good case.

One thing one could to is Provides: ....-debug or similar.

tcrawley-xilinx commented 2 months ago

Dropped the separate debug build bits, packages will have the same stuff as they had before (and this PR should affect runbench's ability to build tcpdirect) I'll come back to the debug bits, but I am conscious of time constraints so this should be more mergeable now.