Received: by 2002:a05:7412:4e10:b0:e2:908c:2ebd with SMTP id gb16csp24514rdb; Mon, 6 Nov 2023 22:24:44 -0800 (PST) X-Google-Smtp-Source: AGHT+IEzLaXG6wMTF9qOVsFI3sNip6YdTSZ+P54EiDzUKUZLq/CKoLZbkxagNTG55FbLt3c8xMF5 X-Received: by 2002:a05:6e02:1c0a:b0:359:3ee6:a909 with SMTP id l10-20020a056e021c0a00b003593ee6a909mr2280864ilh.13.1699338283734; Mon, 06 Nov 2023 22:24:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699338283; cv=none; d=google.com; s=arc-20160816; b=kcgGu4Y36MJJrGyEehxrjwSozoJ9EtuHV6UFIWCXhcs2+9B1YAk8OFPtk11eTZX2O9 ZS91v47YfVJFv2TEJnDL4cyrdf07ebCuYveFRTYFWQJgQkBg4GaV+YCl3uNskAqJzKup mnzqqxry5q/S7ptBQXrCkVxNfyULoCcejPcgfRHAEAwxC3+93t2FgjqF0lsB2CHyTezz m4YL36Oolen+/49lZT/LhaIT4dFLF2bsV9hpuibyM2NaqxE3DDQ/rB1wGTjkyPvds/Rf 0Lyuif2VHnw7W+15uYdqx7rTuPPvbTj/cSekIUp6phUUPdRxADmnrYJNPN/L4oKcmrLd zi8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=zvu5FTqdkcG37dhoNXCWE6L6Wy4Y2Es4BC26oJ3cFn4=; fh=gWyCyo6ToxOHcdkRoTy5V4ltKvMyIsroyztNJEx/WtQ=; b=fKJYkhqYzNfdgr1uGj5FJgyTHoBF/VH9N2adCU9rCYxMkKM8CnuVf2EampyevY1H+o EG2pFc2ZnTmKyoDw/KT3+qtrckPes50GMKjRykrjPtGiI+ij1r2s8OzwXFkwqtLYUuZO kVFLd1+edzgrwGRtsL1zG/SI6Z5Q3XRaY+vI4V34Hbo10xhDI7gjsw3+xhC12Jjs6kQT nsRYPOlcdqem4ywwg1tB0KHMl0gqaG4QUNcPbX3hF95SGAzhH8O7BdUGBEaistkvuOyD yJkHFx52O8CC8lvuFMT6+SCzX19T4M+nWk5qkAJStLhbwttV3vnvXM15OMDFlSyoieWF hViQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=IGCMk8ZZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id i123-20020a639d81000000b005b90af19430si1421366pgd.595.2023.11.06.22.24.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Nov 2023 22:24:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=IGCMk8ZZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 70ED180CBF31; Mon, 6 Nov 2023 22:24:41 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231675AbjKGGYS (ORCPT + 99 others); Tue, 7 Nov 2023 01:24:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45450 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229559AbjKGGYS (ORCPT ); Tue, 7 Nov 2023 01:24:18 -0500 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6AD9C101; Mon, 6 Nov 2023 22:24:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1699338255; x=1730874255; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=xMd2rVgz/0nCDHGO5G5Cgmns963Fjfa40nHUcD2LIxI=; b=IGCMk8ZZpOLcTsOgycxyY4TH3dQ/eEP5ApYP7g3QYG2nqGBUAliuOluS 5q0Nz+BKL2CeVuwhRrIK8vN1mQEN37rWnUNnI1BxvrXCo+05EWGnNTi1a v0CS1yb/0h97f5ax1fmFs62RLrv9b8S/jp6ZWJnJBMIpQNvLbykJfLf2g rNGe2YlKqBXrWEN561Ln0J9ZPIlalDjgXgkN7YnreOfgI5XG4VSa6AX7F vArXh463zL2b9g2BwG+UkgLqjUbL1QWzwUxvGEE1WFQ3ROxRSdHNFEo9H S5O6TpHxQWi8cqEM+Y1t2t7jqE0j+jbZLdSqqwa251uJAq1k49tAaNClj Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10886"; a="475682216" X-IronPort-AV: E=Sophos;i="6.03,282,1694761200"; d="scan'208";a="475682216" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Nov 2023 22:24:15 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10886"; a="1094047505" X-IronPort-AV: E=Sophos;i="6.03,282,1694761200"; d="scan'208";a="1094047505" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga005.fm.intel.com with ESMTP; 06 Nov 2023 22:24:07 -0800 Received: by black.fi.intel.com (Postfix, from userid 1001) id 15A0E3CC; Tue, 7 Nov 2023 08:24:05 +0200 (EET) Date: Tue, 7 Nov 2023 08:24:05 +0200 From: Mika Westerberg To: Lukas Wunner Cc: Mario Limonciello , Karol Herbst , Lyude Paul , Alex Deucher , Christian =?utf-8?B?S8O2bmln?= , Bjorn Helgaas , Hans de Goede , Ilpo =?utf-8?B?SsOkcnZpbmVu?= , Danilo Krummrich , David Airlie , Daniel Vetter , Xinhui Pan , "Rafael J . Wysocki" , Mark Gross , Andreas Noever , Michael Jamet , Yehezkel Bernat , Pali =?utf-8?B?Um9ow6Fy?= , Marek =?utf-8?B?QmVow7pu?= , "Maciej W . Rozycki" , Manivannan Sadhasivam , "open list:DRM DRIVER FOR NVIDIA GEFORCE/QUADRO GPUS" , "open list:DRM DRIVER FOR NVIDIA GEFORCE/QUADRO GPUS" , open list , "open list:RADEON and AMDGPU DRM DRIVERS" , "open list:PCI SUBSYSTEM" , "open list:ACPI" , "open list:X86 PLATFORM DRIVERS" , "open list:THUNDERBOLT DRIVER" Subject: Re: [PATCH v2 8/9] PCI: Exclude PCIe ports used for tunneling in pcie_bandwidth_available() Message-ID: <20231107062405.GU17433@black.fi.intel.com> References: <20231103190758.82911-1-mario.limonciello@amd.com> <20231103190758.82911-9-mario.limonciello@amd.com> <20231106181022.GA18564@wunner.de> <712ebb25-3fc0-49b5-96a1-a13c3c4c4921@amd.com> <20231106185652.GA3360@wunner.de> <20231107054526.GT17433@black.fi.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20231107054526.GT17433@black.fi.intel.com> X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Mon, 06 Nov 2023 22:24:41 -0800 (PST) On Tue, Nov 07, 2023 at 07:45:26AM +0200, Mika Westerberg wrote: > Hi, > > On Mon, Nov 06, 2023 at 07:56:52PM +0100, Lukas Wunner wrote: > > On Mon, Nov 06, 2023 at 12:44:25PM -0600, Mario Limonciello wrote: > > > Tangentially related; the link speed is currently symmetric but there are > > > two sysfs files. Mika left a comment in drivers/thunderbolt/switch.c it may > > > be asymmetric in the future. So we may need to keep that in mind on any > > > design that builds on top of them. > > > > Aren't asymmetric Thunderbolt speeds just a DisplayPort thing? > > No, they affect the whole fabric. We have the initial code for > asymmetric switching in v6.7-rc1. > > > > As 'thunderbolt' can be a module or built in, we need to bring code into PCI > > > core so that it works in early boot before it loads. > > > > tb_switch_get_generation() is small enough that it could be moved to the > > PCI core. I doubt that we need to make thunderbolt built-in only > > or move a large amount of code to the PCI core. > > If at all possible I would like to avoid this and littering PCI side > with non-PCI stuff. There could be other similar "mediums" in the future > where you can transfer packets of "native" protocols such as PCIe so > instead of making it Thunderbolt/USB4 specific it should be generic > enough to support future extensions. > > In case of Thunderbolt/USB4 there is no real way to figure out how much > bandwidth each PCIe tunnel gets (it is kind of bulk traffic that gets > what is left from isochronous protocols) so I would not even try that > and instead use the real PCIe links in pcie_bandwidth_available() and > skip all the "virtual" ones. Actually can we call the new function something like pci_link_is_virtual() instead and make pcie_bandwidth_available() call it? That would be more future proof IMHO.