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

T6485: Thunderbolt Networking support #4014

Draft
wants to merge 12 commits into
base: current
Choose a base branch
from

Conversation

rafaelgaspar
Copy link

@rafaelgaspar rafaelgaspar commented Aug 24, 2024

Change Summary

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)

Related PR(s)

Component(s) name

Proposed changes

How to test

Smoketest result

Checklist:

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

Copy link

github-actions bot commented Aug 24, 2024


PR title does not match the required format

@rafaelgaspar rafaelgaspar changed the title T6485 - Thunderbolt Networking support T6485: Thunderbolt Networking support Aug 24, 2024
@rafaelgaspar
Copy link
Author


Commit title 'Add initial interface for thunderbolt' does not match the required format!. Valid title example: T99999: make IPsec secure

I know @github-actions, it's a Draft PR for a reason, this is still a very early Work in Progress.

Copy link

github-actions bot commented Aug 24, 2024

✅ No issues found in unused-imports check.. Please refer the workflow run

<properties>
<help>PCI device address of the Thunderbolt controller port</help>
<completionHelp>
<list>00:0d.2 00:0d.3</list>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think those addresses are dynamic from host to host. It should be a completion helper script (best BASH to avoid process startup penalty)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any progress on this?

@c-po
Copy link
Member

c-po commented Sep 16, 2024

Is there a Kernel simulation of thunderbold devices available? There is e.g. a hw simulator for WIFI available - that would make life easier when we have thunderbold smoketests

@rafaelgaspar rafaelgaspar force-pushed the thunderbolt-support branch 2 times, most recently from c33beab to adf03be Compare November 10, 2024 18:29
@andamasov andamasov requested a review from c-po November 14, 2024 23:27
@rafaelgaspar
Copy link
Author

Newer versions of systemd, like the one in the current nightly builds don't require anymore to edit systemd files or know the PCI-E address of the port anymore, that will make things easier, I should have some time to work on this this weekend and with this changes I might even be able to finish it since it simplifies a lot.

@rafaelgaspar rafaelgaspar force-pushed the thunderbolt-support branch 4 times, most recently from d016e2a to a5d94b0 Compare December 14, 2024 22:23
@rafaelgaspar
Copy link
Author

rafaelgaspar commented Dec 15, 2024

@c-po I spent some time trying to get it work now with the new systemd, and it works fine out of the box, except re-attaching it to a bridge, should be similar to wlan but haven't implemented yet, and hotplug.

Looking at src/helpers/vyos_net_name function hotplug_event it seams like hot plug is not supported at all yet in vyos, is that right?

What would be necessary to enable hotplug?

I was able to restore connection after a disconnect and hotplug by manually running ip link set thunderbolt0 up setting it's master to the respective bridge and settings pvid on the bridge, but how to trigger this from udev?

Copy link

CI integration ❌ failed!

Details

CI logs

  • CLI Smoketests (no interfaces) ❌ failed
  • CLI Smoketests (interfaces only) 👍 passed
  • Config tests 👍 passed
  • RAID1 tests 👍 passed
  • TPM tests 👍 passed

@dmbaturin
Copy link
Member

We need to evaluate if there's really a use case for it. I'm not aware of any hardware that is likely to be used as a router that has Thunderbolt ports (servers and network boxes usually don't), and hotplug support is a complicated issue that we decided not to support for now — until (and unless) we have a general framework for it.

Could you tell us more about your use case for it? And is hotplug support required for your use case?

@rafaelgaspar
Copy link
Author

rafaelgaspar commented Dec 29, 2024

I agree that on the enterprise side it's much easier to just use 40Gbps or even 100Gbps+ ethernet cards, but for custom made home routers(for now more on the enthusiast niche) it's a very simple and cheap solution to get 25Gbps(50Gbps with Thunderbolt 5) between the router and any computer with Thunderbolt including any Apple Silicon Macs, you don't need 300$+ for a 10Gbit Ethernet to USB-C adapter, just ~70$ for a good certified Thunderbolt cable.

I have been using this for an almost a year, and apart from having to restart the router when I reconnect my notebook, it works pretty well already on the current state.

The two issues I have with current version that I'm trying to solve is:

  • On boot, if the other computer is not connected via TB, the init fail to bring the bridge up, because the device belongs to the bridge but doesn't exist.
  • When connecting the TB computer, I need to go into the router and in configuration mode set the disable property commit and then delete it and commit, basically restarting the interface, this is the behavior I'm currently attempting via udev, so far without much success. Or most commonly just restarting it.

Another minor issue is the stability of the interface number, this can be achieved with the pci-address field that is partially implemented.

Hope this gives a little bit more context.

I believe it's just a matter of time until some brand name router home router start supporting it now with new generation Intel chips for embedded devices and NUCs supporting it.

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