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

linux-kernel: T6485: build modules for thunderbolt and thunderbolt-net #657

Merged
merged 1 commit into from
Aug 26, 2024

Conversation

rafaelgaspar
Copy link
Contributor

@rafaelgaspar rafaelgaspar commented Jun 14, 2024

Change Summary

This is the first step in order to have Thunderbolt Networking support in VyOS.

I have been successfully using a custom built kernel for this for a few months now, and with this change it will still require manual setup of the PCIe address within systemd and udev rules that I plan on implementing as a proper interface in the CLI next.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes)
  • Migration from an old Vyatta component to vyos-1x, please link to related PR inside obsoleted component
  • Other (please describe):

Related Task(s)

https://vyos.dev/T6485

Component(s) name

linux-kernel

Proposed changes

Add modules for thunderbolt and thunderbolt-net

How to test

If anyone would like to actually enable this to test, at the moment you would create the interface file /etc/systemd/network/00-=thhunderbolt0.link as follows:

[Match]
Path=pci-0000:04:00.1
Driver=thunderbolt-net
[Link]
MACAddressPolicy=none
Name=thunderbolt0

Replacing the Path with the PCIe address of the Thunderbolt controller port.

If you wan to have the interface come up when a cable is connected, you would also need to add this udev rule /etc/udev/rules.d/60-thunderbolt-network-interfaces.rules as follows:

ACTION=="add", SUBSYSTEM=="net", KERNEL=="thunderbolt0", RUN+="/usr/sbin/ifconfig thunderbolt0 up"

Checklist:

  • I have read the CONTRIBUTING document
  • I have linked this PR to one or more Phabricator Task(s)
  • My commit headlines contain a valid Task id
  • My change requires a change to the documentation
  • I have updated the documentation accordingly

@rafaelgaspar rafaelgaspar changed the title linux-kernel: build modules for thunderbolt and thunderbolt-net linux-kernel: T6485: build modules for thunderbolt and thunderbolt-net Jun 14, 2024
@rafaelgaspar rafaelgaspar marked this pull request as ready for review June 14, 2024 09:26
@rafaelgaspar rafaelgaspar requested a review from a team as a code owner June 14, 2024 09:26
@rafaelgaspar rafaelgaspar requested review from dmbaturin, sarthurdev, zdc, jestabro, sever-sever and c-po and removed request for a team June 14, 2024 09:26
@c-po
Copy link
Member

c-po commented Jun 14, 2024

We should pause this PR until the CLI change or design is ready.

Interface should be called ethXXX as thunderboldYYY is not supported by VyOS

@rafaelgaspar
Copy link
Contributor Author

rafaelgaspar commented Jun 14, 2024

We should pause this PR until the CLI change or design is ready.

Since I’m doing this in my free time I can’t give an estimate of when this will be done, but I’m fine with pausing until I get that part done.

Although I think just adding the kernel module wouldn’t have any major downside apart from a few KB bigger images.

Interface should be called ethXXX as thunderboldYYY is not supported by VyOS

I tried that manually and the whole eth renamer part got in the way, I still need to understand better how VyOS is doing that.

Since the configuration will already have to be different than ethernet because of requiring a PCIe address, I was actually thinking of implementing as a new type of interface and follow the linux standard of calling it thunderboltX.

Currently it doesn’t show up in the interfaces list(only on ifconfig), but I can configure it normally using the thunderboltX as interface name, and that works fine everywhere else, including adding it to bridges, etc, via configure commands.

@rafaelgaspar
Copy link
Contributor Author

linux standard of calling it thunderboltX

Could also call it tbX if we want shorter names though.

@c-po
Copy link
Member

c-po commented Jun 15, 2024

linux standard of calling it thunderboltX

Could also call it tbX if we want shorter names though.

It's not about shortening the interface name. It's about how we allow ethernet interface on the CLI, see https://github.com/vyos/vyos-1x/blob/current/interface-definitions/interfaces_ethernet.xml.in#L8-L17

Can you also list some hardware reference adapters you're testing with so it's known which ones got tested by you in case someone want's to also use it.

Copy link

github-actions bot commented Jul 4, 2024

👍
No issues in PR Title / Commit Title

@rafaelgaspar rafaelgaspar force-pushed the add-thunderbolt-net branch 2 times, most recently from 3f84d4d to afcb77c Compare July 4, 2024 16:20
@c-po c-po enabled auto-merge August 26, 2024 14:55
@c-po c-po merged commit 70bb3c5 into vyos:current Aug 26, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

3 participants