Hi,
This is an official announcement that 'thunderbolt-utils', a collection of
user-space utilities for the TBT/USB4 subsystem is now made public for its first
release candidate.
# What is it?
The utilities comprise 'lstbt', similar in lines with 'lspci' and 'lsusb',
which polls the TBT/USB4 subsystem's information including enumerated
retimers.
The secondary component of the utilities is the goal towards providing
a collection of available wrappers to provide the abstraction of configuring
the subsystem in user-space. This is made possible via porting the DMA layer
from kernel-space to user-space for the subsystem in an IOMMU-protected
environment.
# Why?
Thunderbolt/USB4, a relatively newer industry standard with its v2 released
past year is now increasingly being adopted.
'lstbt' serves as the first incorporation of a user-space helper library for the
subsystem that fulfills the following requirements and provides advantages
throughout the Linux community.
1. Better subsystem exposure to the user: The library provides the subsystem's
information in a compact and legible format to the user with detailed
functionalities available using the verbose option. Apart from serving as a handy
library, it exports the information using TBT/USB4 keywords like domains, routers,
ports, etc., most of which are unperceived to the users as of now.
2. Better debugging: Since the library extracts valuable information like the routers'
functionalities (PM, protocol-tunneling, e.g., PCIe, USB, and DP, various states,
negotiated parameters, bandwidth used, NVM, etc.), it will serve as a very vital
tool for Linux debuggers throughout the industry.
3. Automation exposure: Automation being increasingly adopted in various industries
as a way to aid in debugs, detect faults autonomously, or even create dedicated scripts
around the subsystems, the library will be utilized as the primary go-to option for the
TBT/USB4 subsystem.
The secondary component of the utilities is providing wrappers for the user to configure
the subsystem. This is probably the first prefatory incorporation of such utilities
which would help the users who wish to handle the subsystem outside the kernel-space.
This subsequently provides the user better controllability over the subsystem which
obviously would pave the way for the development of independent software around it, which
can provide the users to derive dedicated functionalities over the subsystem.
This is in its rudimentary phase as of now.
Repository: https://github.com/intel/thunderbolt-utils
Thanks
Rajat
On Tue, Jul 18, 2023 at 10:02:57PM +0530, Rajat Khandelwal wrote:
> Hi,
>
> This is an official announcement that 'thunderbolt-utils', a collection of
> user-space utilities for the TBT/USB4 subsystem is now made public for its first
> release candidate.
>
> # What is it?
>
> The utilities comprise 'lstbt', similar in lines with 'lspci' and 'lsusb',
> which polls the TBT/USB4 subsystem's information including enumerated
> retimers.
>
> The secondary component of the utilities is the goal towards providing
> a collection of available wrappers to provide the abstraction of configuring
> the subsystem in user-space. This is made possible via porting the DMA layer
> from kernel-space to user-space for the subsystem in an IOMMU-protected
> environment.
Cool, but it doesn't build as a normal user:
/usr/bin/ld: cannot open output file /usr/bin/lstbt: Permission denied
Why aren't you using autotools to properly be able to integrate into
everyone's build systems?
Also, you are shelling out to bash a lot, and as root, in this program,
are you sure that's ok?
And finally, why not add some of the USB4 stuff to usbutils? Wouldn't
that be a bit more relevant for people who use those tools already?
thanks,
greg k-h