[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190212125417.4an7efllnf7pqw2v@wunner.de>
Date: Tue, 12 Feb 2019 13:54:17 +0100
From: Lukas Wunner <lukas@...ner.de>
To: Mika Westerberg <mika.westerberg@...ux.intel.com>
Cc: linux-kernel@...r.kernel.org,
Michael Jamet <michael.jamet@...el.com>,
Yehezkel Bernat <YehezkelShB@...il.com>,
Andreas Noever <andreas.noever@...il.com>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Subject: Re: [PATCH v2 14/28] thunderbolt: Extend tunnel creation to more
than 2 adjacent switches
On Mon, Feb 11, 2019 at 10:45:58AM +0200, Mika Westerberg wrote:
> On Sun, Feb 10, 2019 at 04:33:28PM +0100, Lukas Wunner wrote:
> > at the bottom of this page there's
> > a figure showing a PCI tunnel between non-adjacent switches (blue line):
> >
> > https://developer.apple.com/library/archive/documentation/HardwareDrivers/Conceptual/ThunderboltDevGuide/Basics/Basics.html
> >
> Are you sure Apple actually uses setup like that? I think I have never
> seen such configuration happening on any of the devices I have.
Sorry, I don't know if they actually use that.
> I can update the changelog to mention that if you think it is useful.
> Something like below maybe?
>
> PCIe actually does not need this as it is typically a daisy chain
> between two adjacent switches but this way we do not need to hard-code
> creation of the tunnel.
LGTM, thanks.
> > > + i = 0;
> > > + tb_for_each_port(in_port, src, dst)
> > > + i++;
> >
> > This looks more complicated than necessary. Isn't the path length
> > always the length of the route string from in_port switch to out_port
> > switch, plus 2 for the adapter on each end? Or do paths without
> > adapters exist?
>
> Yes, I think you are right.
Simply subtracting the depths of the start and end port's switch also yields
the path length. Of course this assumes that tunnels aren't established
between non-adjacent switches, but your algorithm doesn't do that.
Thanks,
Lukas
Powered by blists - more mailing lists