projectcalico / calico

Cloud native networking and network security
https://docs.tigera.io/calico/latest/about/
Apache License 2.0
5.93k stars 1.32k forks source link

Calico eBPF PPC64 support #8744

Open astenmco opened 5 months ago

astenmco commented 5 months ago

My cluster uses PPC64 nodes (alongside x86-64 nodes). I wanted to enable eBPF in calico but saw in the docs that only x86-64 and arm64 are supported.

Would you consider adding PPC64 support ?

Thanks for the hard and excellent work !

tomastigera commented 5 months ago

@astenmco I do not see that happening any time soon, even though essentially the only real problem is that our ebpf platform expects little endian arch. Afaict PPC64 is unfortunately big. And since it is not quite the most common platform out there, our limited resources do not let us prioritize it. Obviously, we would be happy to review and help to push though any community contributed patches from someone who has access to the hardware :man_shrugging:

clnperez commented 5 months ago

@astenmco just making sure -- but you're asking for BE (ppc64) support for Power?

astenmco commented 4 months ago

@astenmco just making sure -- but you're asking for BE (ppc64) support for Power?

Yes, exactly.

@astenmco I do not see that happening any time soon, even though essentially the only real problem is that our ebpf platform expects little endian arch. Afaict PPC64 is unfortunately big. And since it is not quite the most common platform out there, our limited resources do not let us prioritize it. Obviously, we would be happy to review and help to push though any community contributed patches from someone who has access to the hardware 🤷‍♂️

Actually I am talking about IBM Power 9 and 10 CPUs that runs little-endian Linux (in my case Ubuntu Server 22.04 PPC64le). We do not have the skills to contribute to the code, but I can help with integration and debugging on our platform.

tomastigera commented 4 months ago

As far as I can tell, the ebpf code should work OK on any LE architecture. We now support ebpf on arm64 LE without any major eng effort, but @hjiawei or @frozenprocess might know more about that an how difficult it would be to support ppc64. I think it is just a matter of inluding the ebpf objects with the ppc4 build and buillding ppc64 version of libbpf, so mosty packaging.

hjiawei commented 4 months ago

Nothing concrete yet but we should be able to update our toolchain (calico/go-build) and tune a few CFLAGS in felix Makefiles for ppc64le to start with.

astenmco commented 4 months ago

Please let me know if there is anything I can do to help.

hjiawei commented 4 months ago

Hi @astenmco, I managed to get a custom calico/node build which I believe ebpf files are built and included for ppc64le (not be). It is unofficial and for testing purpose only. If you have a chance to use it, you can replace the calico/node DaemonSet image with this one in your dev k8s cluster.