Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kernel: enable thunderbolt driver #404

Open
hoerup opened this issue Jun 29, 2020 · 17 comments
Open

kernel: enable thunderbolt driver #404

hoerup opened this issue Jun 29, 2020 · 17 comments

Comments

@hoerup
Copy link

hoerup commented Jun 29, 2020

currently thunderbolt driver is not compiled with the kernel, please enable it as a module

@olivierlambert
Copy link
Member

Hi,

Can you please provide a bit more context? Use case, why etc?

@hoerup
Copy link
Author

hoerup commented Jul 1, 2020

For using TB3 10gb NIC connected over thunderbolt. See https://xcp-ng.org/forum/topic/3239/10gbe-over-thunderbolt3

@olivierlambert
Copy link
Member

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?

@stormi
Copy link
Member

stormi commented Jul 1, 2020

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.

@olivierlambert
Copy link
Member

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.

@rushikeshjadhav
Copy link

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.

@stormi
Copy link
Member

stormi commented Jul 1, 2020

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

@rushikeshjadhav
Copy link

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

@hoerup
Copy link
Author

hoerup commented Jul 1, 2020

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

@hoerup
Copy link
Author

hoerup commented Jul 2, 2020

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

@stormi
Copy link
Member

stormi commented Jul 2, 2020

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

@rushikeshjadhav
Copy link

@hoerup can you check question above Can it be made to work without those (at least, without polkit)?

@hoerup
Copy link
Author

hoerup commented Jul 23, 2020

Maybe it is possible to create a fork and rewrite it without polkit but its not a trivial task

@rushikeshjadhav
Copy link

We will need to get some community testing dome with those polkit on its effect on dom0.

@hoerup
Copy link
Author

hoerup commented Jul 14, 2021

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

@dezren39
Copy link

dezren39 commented Jul 19, 2022

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.

@hoerup
Copy link
Author

hoerup commented Jul 19, 2022

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants