xcp
xcp copied to clipboard
kernel: enable thunderbolt driver
currently thunderbolt driver is not compiled with the kernel, please enable it as a module
Hi,
Can you please provide a bit more context? Use case, why etc?
For using TB3 10gb NIC connected over thunderbolt. See https://xcp-ng.org/forum/topic/3239/10gbe-over-thunderbolt3
That's a bit better with the forum post linked :)
Your contribution is welcome, how should we proceed @stormi so @hoerup can contribute by bringing TB support in XCP-ng? Should we have an extra kernel for it?
No extra kernel, but can be built as a module. Whether to include it by default in main kernel (for 8.2) or make it an additional package is to be decided.
I suppose @rushikeshjadhav can also add it to kernel-alt.
So you can "distribute" a kernel module via a RPM? Is that mutually exclusive by make it into kernel-alt? I'm thinking from user perspective, what's the easiest path.
Will have to check if that module can independently go in a RPM. Sometimes apart from module, some kernel enablement is needed.
If works, It will be independent rpm for main kernel and the module will be baked inside kernel-alt. We don't maintain separate module RPMs for kernel-alt.
We already distribute kernel modules via RPMs for the main kernel: alternate drivers, modified coretemp module, zfs modules, etc. For kernel-alt currently all modules must be included in the kernel-alt package.
See https://xcp-ng.org/docs/develprocess.html#kernel-module-policy
@hoerup can you share # lspci -k and # lsmod from your setup of thunderbolt? I could package thunderbolt.ko but I see there is also another module as thunderbolt-net.ko and want to confirm whether that's being used.
afaik thunderbolt-net is used for direct host-2-host communication over a thunderbolt cable (which is a whole other scenario)
requested output is here https://gist.github.com/hoerup/37b5315c192cce4c04fa59ed789f74a9
there is also the matter of packaging the bolt utilities (http://vault.centos.org/7.6.1810/os/Source/SPackages/bolt-0.4-3.el7.src.rpm ). @stormi if you could create a new repo in xcp-ng-rpms i'd gladly create a pr for it
Those bolt utilities pull dependencies that I'm not sure we want on dom0:
===================================================================================================
Package Arch Version Repository Size
===================================================================================================
Installing:
bolt x86_64 0.7-1.el7 base 149 k
Installing for dependencies:
mozjs17 x86_64 17.0.0-20.el7 base 1.4 M
polkit x86_64 0.112-26.el7 base 170 k
polkit-pkla-compat x86_64 0.1-4.el7 base 39 k
Can it be made to work without those (at least, without polkit)?
@hoerup can you check question above Can it be made to work without those (at least, without polkit)?
Maybe it is possible to create a fork and rewrite it without polkit but its not a trivial task
We will need to get some community testing dome with those polkit on its effect on dom0.
AFAIR polkit api was used all over the bolt source code but, bolt is more or less a helper tool wrapping /sys/bus/thunderbolt/ making it more convenient - so even thought would be nice it's not a hard requirement in order to get tb3/tb4 devices running
ref: https://www.kernel.org/doc/html/latest/admin-guide/thunderbolt.html
It would be nice to gain access to this, using ip over thunderbolt as a backplane would be pretty ideal in certain situations.
personally, i want to plug a thunderbolt to thunderbolt cable between some server motherboard pairs.
@dezren39 thunderbolt.ko is already built with recent versions of xcpng. But it sounds like you are regering to thunderbolt-net, which afair isnt built by default. But i think that is an entirely different issue, so please open a separate issue