[lkml]   [2019]   [Feb]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v2 12/28] thunderbolt: Add functions for allocating and releasing hop IDs
On Mon, Feb 11, 2019 at 10:30:43AM +0200, Mika Westerberg wrote:
> On Sun, Feb 10, 2019 at 01:13:53PM +0100, Lukas Wunner wrote:
> > If there are two Macs at the ends of the daisy-chain with Thunderbolt
> > devices in-between, the other Mac may already have established tunnels
> > to some of the devices and therefore has occupied hop entries in the
> > devices' path config space. How do you ensure that you don't allocate
> > the same entries and overwrite the other Mac's hop entries, thereby
> > breaking its tunnels?
> If the other Mac has enumerated the device (set the upstream port,
> route, depth) then the other Mac cannot access the device. You get an
> error (we deal with that in the later patch in the series when we
> identify XDomain connections). The Hop ID allocation is only relevant in
> a single domain. Crossing one needs to have protocol such as we have in
> case of ThunderboltIP to negotiate Hop IDs used in the link between two
> domains.

Understood now, thanks. (Well, in part at least.)

It looks like there's a race condition currently in tb_switch_configure()
wherein two machines on the daisy chain may write the config simultaneously
and overwrite each other's changes. Isn't there some kind of synchonization
mechanism available to prevent such an outcome?



 \ /
  Last update: 2019-02-12 13:44    [W:0.196 / U:18.384 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site