Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2667076yba; Mon, 8 Apr 2019 01:56:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqwbZ1xooPupRjvKmZZlT6C4MMUpWfXCzVpjP8sUUc2URWMpA4Ky/IfNHS/on4aNA7/d81u1 X-Received: by 2002:a63:7885:: with SMTP id t127mr26366724pgc.338.1554713769048; Mon, 08 Apr 2019 01:56:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554713769; cv=none; d=google.com; s=arc-20160816; b=jOasY8sHe764JVnod6WJHFj7tSVUJWI7b2rzKuvwuBKkEHgVgZnLLozMfmHJTq97Ki 1U3mrKmGwZhQP4FOwlHZkWsP1QhhdVIq36qLNof2FPRcOgQFAcezJR4h9HstnYTtCgo9 cvmZZr3Zgbvo96K74ccWsxn96IaGbeDjqRMnSe7Iqfb5PIN5gqtL35zqkDVpGez0s5lZ 8TmMq8UW0TSWW6LScaEEsxtK92n7Wg0K9xNrYfBgaq2UtiNdcegg64uxnx4TOaECxN9B MWHOMxHpJhi+3iP5VRLEITNFh9tISRrDjsSbI1u+UbSEDfmxXVOLYn/VRuSHriECGbAO /vSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=YjvP6sfo18KPdMs0595WcBlTsr2yHC9RdSjefauUjQg=; b=Fu3XeJHNB8rqD9cNpR8Mtu71btZ/mW8+dk2au+4+zZSJ9/nAlCHU+dhZmeH/Yx7WEI kEFJQrOlmWxWAA1oU7q97o7miYH648k5m93LQTaONFWRoQVFWrJvaB4IEzPtQJDkr6/H sIPVm7aghi0doWcDp8/YFuGFILy4NUidgv99uGB3WBs99jG1+yQd5kKLxAqSZmvbHIQ1 CJUpbD0F0spTFsX6dAqqxK/VVeECiDOnUuzHdJujmJreEPwRIMKRzWptaHFu+nHwAvcW /D1B503aXit8RGSjoHtgIK3qVO25v8nKFuw9naxq88jaf6/3CYIg021816ZSMeNtrcwA 15hA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a17si4436501pfn.95.2019.04.08.01.55.53; Mon, 08 Apr 2019 01:56:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726562AbfDHIxl (ORCPT + 99 others); Mon, 8 Apr 2019 04:53:41 -0400 Received: from bmailout1.hostsharing.net ([83.223.95.100]:59405 "EHLO bmailout1.hostsharing.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726189AbfDHIxk (ORCPT ); Mon, 8 Apr 2019 04:53:40 -0400 Received: from h08.hostsharing.net (h08.hostsharing.net [83.223.95.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.hostsharing.net", Issuer "COMODO RSA Domain Validation Secure Server CA" (not verified)) by bmailout1.hostsharing.net (Postfix) with ESMTPS id 3849F30000D31; Mon, 8 Apr 2019 10:53:38 +0200 (CEST) Received: by h08.hostsharing.net (Postfix, from userid 100393) id EB9263F2B3; Mon, 8 Apr 2019 10:53:37 +0200 (CEST) Date: Mon, 8 Apr 2019 10:53:37 +0200 From: Lukas Wunner To: Mika Westerberg Cc: linux-kernel@vger.kernel.org, Michael Jamet , Yehezkel Bernat , Andreas Noever , Andy Shevchenko , Christian Kellner , Mario.Limonciello@dell.com Subject: Re: [PATCH v3 19/36] thunderbolt: Extend tunnel creation to more than 2 adjacent switches Message-ID: <20190408085337.slcnajkgxjq4twkh@wunner.de> References: <20190328123633.42882-1-mika.westerberg@linux.intel.com> <20190328123633.42882-20-mika.westerberg@linux.intel.com> <20190407165425.2z5kqm3wcfrxvqzb@wunner.de> <20190408073517.GA3622@lahna.fi.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190408073517.GA3622@lahna.fi.intel.com> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 08, 2019 at 10:35:17AM +0300, Mika Westerberg wrote: > On Sun, Apr 07, 2019 at 06:54:25PM +0200, Lukas Wunner wrote: > > According to the code comment in struct tb_regs_hop (in tb_regs.h), > > the out_hopid ("next_hop" in struct tb_regs_hop) denotes the > > "hop to take after sending the packet through out_port (on the > > incoming port of the next switch)". > > > > So intuitively, the hop config space is like a routing table and > > the entry in in_port's hop config space specifies through which > > out_port the packets shall be routed, and which entry to look up > > on the remote port reachable through out_port. > > > > This means that the out_hopid must always be identical to the in_hopid > > of out_port->remote. Otherwise the routing wouldn't work. > > > > And yet, you've introduced *two* struct ida for each port in > > patch 16. This doesn't seem to make sense: The out_hopids ida > > of a port always has to be identical to the in_hopids ida of that > > port's remote. But if it's identical, why does it have to exist > > twice? > > The reason for two HopID allocators (struct idas) is to make it possible > to track HopIDs to each direction. The same port can be output for one > path and input for another. I'm not sure how that can be done without > having two struct idas per port. > > You are right, in case of out port HopID connecter to remote in port, > they should use the same HopID. Hm, what other cases are there, i.e. what is the meaning of a tb_regs_hop's "next_hop" field if "out_port" doesn't have a remote? (And why does it need to be tracked on the out_port? In case a remote is added later?) Thanks, Lukas