From: Greg KH <gregkh@linuxfoundation.org>
To: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: linux-usb@vger.kernel.org,
Yehezkel Bernat <YehezkelShB@gmail.com>,
Michael Jamet <michael.jamet@intel.com>,
Lukas Wunner <lukas@wunner.de>,
Andreas Noever <andreas.noever@gmail.com>,
Alan Borzeszkowski <alan.borzeszkowski@linux.intel.com>,
Saranya Gopal <saranya.gopal@intel.com>
Subject: Re: [PATCH v2 4/4] Documentation/admin-guide: Document Thunderbolt/USB4 tunneling events
Date: Thu, 17 Apr 2025 12:41:57 +0200 [thread overview]
Message-ID: <2025041722-untidy-cannot-40d4@gregkh> (raw)
In-Reply-To: <20250417103327.GD88033@black.fi.intel.com>
On Thu, Apr 17, 2025 at 01:33:27PM +0300, Mika Westerberg wrote:
> On Thu, Apr 17, 2025 at 12:25:19PM +0200, Greg KH wrote:
> > On Thu, Apr 17, 2025 at 01:04:56PM +0300, Mika Westerberg wrote:
> > > On Thu, Apr 17, 2025 at 11:39:38AM +0200, Greg KH wrote:
> > > > On Thu, Apr 17, 2025 at 12:04:26PM +0300, Mika Westerberg wrote:
> > > > > From: Alan Borzeszkowski <alan.borzeszkowski@linux.intel.com>
> > > > >
> > > > > Add documentation about the Thunderbolt/USB4 tunneling events to the
> > > > > user’s and administrator’s guide.
> > > > >
> > > > > Signed-off-by: Alan Borzeszkowski <alan.borzeszkowski@linux.intel.com>
> > > > > Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
> > > > > ---
> > > > > Documentation/admin-guide/thunderbolt.rst | 33 +++++++++++++++++++++++
> > > > > 1 file changed, 33 insertions(+)
> > > > >
> > > > > diff --git a/Documentation/admin-guide/thunderbolt.rst b/Documentation/admin-guide/thunderbolt.rst
> > > > > index d0502691dfa1..f0368ab6bd1f 100644
> > > > > --- a/Documentation/admin-guide/thunderbolt.rst
> > > > > +++ b/Documentation/admin-guide/thunderbolt.rst
> > > > > @@ -296,6 +296,39 @@ information is missing.
> > > > > To recover from this mode, one needs to flash a valid NVM image to the
> > > > > host controller in the same way it is done in the previous chapter.
> > > > >
> > > > > +Tunneling events
> > > > > +----------------
> > > > > +The driver sends ``KOBJ_CHANGE`` events to userspace when there is a
> > > > > +tunneling change in the ``thunderbolt_domain``. The notification carries
> > > > > +following environment variables::
> > > > > +
> > > > > + TUNNEL_EVENT=<EVENT>
> > > > > + TUNNEL_DETAILS=0:12 <-> 1:20 (USB3)
> > > >
> > > > I'm ok with this, but wow TUNNEL_DETAILS is going to be hard to parse by
> > > > userspace, right? Is this something that it is supposed to do something
> > > > with?
> > >
> > > Yes, the reason it looks like that is because it matches the "format" we
> > > use in the logging (in dmesg). For instance:
> > >
> > > [ 35.400488] thunderbolt 0000:07:00.0: 0:13 <-> 1:19 (DP): activating
> > > [ 35.401237] thunderbolt 0000:07:00.0: 0:13 <-> 1:19 (DP): DP IN maximum supported bandwidth 8100 Mb/s x4 = 25920 Mb/s
> > > [ 35.401239] thunderbolt 0000:07:00.0: 0:13 <-> 1:19 (DP): DP OUT maximum supported bandwidth 8100 Mb/s x4 = 25920 Mb/s
> > > [ 35.401493] thunderbolt 0000:07:00.0: 0:13 <-> 1:19 (DP): bandwidth allocation mode supported
> > > [ 35.402528] thunderbolt 0000:07:00.0: 0:13 <-> 1:19 (DP): non-reduced bandwidth 8100 Mb/s x4 = 25920 Mb/s
> > > [ 35.402773] thunderbolt 0000:07:00.0: 0:13 <-> 1:19 (DP): maximum bandwidth through allocation mode 20000 Mb/s x4 = 77575 Mb/s
> > > [ 35.402775] thunderbolt 0000:07:00.0: 0:13 <-> 1:19 (DP): granularity 500 Mb/s
> > > [ 35.403029] thunderbolt 0000:07:00.0: 0:13 <-> 1:19 (DP): estimated bandwidth 103500 Mb/s
> > > [ 35.404693] thunderbolt 0000:07:00.0: 0:13 <-> 1:19 (DP): bandwidth allocation mode enabled
> >
> > Kernel logs are not supposed to always be parsable, so this is fine :)
> >
> > > This allows matching the event with dmesg tunnel logs. If you think this is
> > > not good we can change it.
> >
> > It depends on what you are expecting userspace to do with this
> > information. If it's a simple "here's some debugging information you
> > might like to look at" then it's fine. If it is "here is some
> > information that you need to take a programatic action based on", then
> > that's different.
>
> It's purely informative. Userspace cannot take any programmatic action
> based on this but it can use this to display user "more details" for
> example if there is an error allocating bandwidth for DisplayPort.
Ok, that's fine then, hopefully no one tried to parse it in the future.
You might say "the format of this string may change over time" or
something like that?
thanks,
greg k-h
next prev parent reply other threads:[~2025-04-17 10:42 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-17 9:04 [PATCH v2 0/4] thunderbolt: Notify userspace about tunneling events in the domain Mika Westerberg
2025-04-17 9:04 ` [PATCH v2 1/4] thunderbolt: Introduce domain event message handler Mika Westerberg
2025-04-17 9:04 ` [PATCH v2 2/4] thunderbolt: Notify userspace about software CM tunneling events Mika Westerberg
2025-04-17 9:04 ` [PATCH v2 3/4] thunderbolt: Notify userspace about firmware " Mika Westerberg
2025-04-17 9:04 ` [PATCH v2 4/4] Documentation/admin-guide: Document Thunderbolt/USB4 " Mika Westerberg
2025-04-17 9:39 ` Greg KH
2025-04-17 10:04 ` Mika Westerberg
2025-04-17 10:25 ` Greg KH
2025-04-17 10:33 ` Mika Westerberg
2025-04-17 10:41 ` Greg KH [this message]
2025-04-17 10:46 ` Mika Westerberg
2025-04-24 5:36 ` [PATCH v2 0/4] thunderbolt: Notify userspace about tunneling events in the domain Mika Westerberg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2025041722-untidy-cannot-40d4@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=YehezkelShB@gmail.com \
--cc=alan.borzeszkowski@linux.intel.com \
--cc=andreas.noever@gmail.com \
--cc=linux-usb@vger.kernel.org \
--cc=lukas@wunner.de \
--cc=michael.jamet@intel.com \
--cc=mika.westerberg@linux.intel.com \
--cc=saranya.gopal@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox