From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E2078C197A0 for ; Thu, 16 Nov 2023 09:11:21 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6267F10E251; Thu, 16 Nov 2023 09:11:21 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.100]) by gabe.freedesktop.org (Postfix) with ESMTPS id AE24410E139; Thu, 16 Nov 2023 09:01:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1700125272; x=1731661272; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=/STXsbosH6Rz9sQMt/crvGrrS9Z0X1RfO/fEtM3K5Z0=; b=c2kzmUqqgVbWi66PCkg97xzHjwQPrQKrLSfj3J8/qfkajdvh9ev+0N5V Rd7C8WL+L/g1UKaLioI58MDaVetS4sC1GUj48APtoP5cKM1xAYNT1GELU 8u1J5BFwTB7DgLlFwOBx9lmEgl1ER3vxBiHhjm3C7lS2QI5+XEGR7nLTy N+lhGic8FQMUL/JGcYk30yavq2EW3JqLY+McWkvBKJemIxzZE6a2CqyLX ECYM3fGM+b1oTkERX3328ppqNJY8fS4GVTowcc9231721PlJaKE/QFY9V UcPpil7sEwDELNzPYG6OUm1/l847Eq5oXpbQ54GBFAmpG8eT9u6uJthbi A==; X-IronPort-AV: E=McAfee;i="6600,9927,10895"; a="457542989" X-IronPort-AV: E=Sophos;i="6.03,307,1694761200"; d="scan'208";a="457542989" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Nov 2023 01:00:50 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10895"; a="768851613" X-IronPort-AV: E=Sophos;i="6.03,307,1694761200"; d="scan'208";a="768851613" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga007.fm.intel.com with ESMTP; 16 Nov 2023 01:00:43 -0800 Received: by black.fi.intel.com (Postfix, from userid 1001) id 9BFF0209; Thu, 16 Nov 2023 11:00:42 +0200 (EET) Date: Thu, 16 Nov 2023 11:00:42 +0200 From: Mika Westerberg To: Mario Limonciello Subject: Re: [PATCH v3 5/7] PCI: ACPI: Detect PCIe root ports that are used for tunneling Message-ID: <20231116090042.GF17433@black.fi.intel.com> References: <20231114200755.14911-1-mario.limonciello@amd.com> <20231114200755.14911-6-mario.limonciello@amd.com> <20231115104019.GY17433@black.fi.intel.com> <70b35a0e-5ccd-4e19-a8ac-4cf095007a69@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <70b35a0e-5ccd-4e19-a8ac-4cf095007a69@amd.com> X-Mailman-Approved-At: Thu, 16 Nov 2023 09:11:19 +0000 X-BeenThere: amd-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion list for AMD gfx List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Karol Herbst , "Rafael J . Wysocki" , "open list:PCI SUBSYSTEM" , "open list:DRM DRIVER FOR NVIDIA GEFORCE/QUADRO GPUS" , David Airlie , Marek =?utf-8?B?QmVow7pu?= , "open list:RADEON and AMDGPU DRM DRIVERS" , "open list:ACPI" , Danilo Krummrich , "open list:DRM DRIVER FOR NVIDIA GEFORCE/QUADRO GPUS" , Ilpo =?utf-8?B?SsOkcnZpbmVu?= , Manivannan Sadhasivam , Bjorn Helgaas , Xinhui Pan , open list , Lukas Wunner , Daniel Vetter , Alex Deucher , Pali =?utf-8?B?Um9ow6Fy?= , Christian =?utf-8?B?S8O2bmln?= , "Maciej W . Rozycki" Errors-To: amd-gfx-bounces@lists.freedesktop.org Sender: "amd-gfx" Hi Mario, On Wed, Nov 15, 2023 at 11:08:43AM -0600, Mario Limonciello wrote: > On 11/15/2023 04:40, Mika Westerberg wrote: > > Hi Mario, > > > > On Tue, Nov 14, 2023 at 02:07:53PM -0600, Mario Limonciello wrote: > > > USB4 routers support a feature called "PCIe tunneling". This > > > allows PCIe traffic to be transmitted over USB4 fabric. > > > > > > PCIe root ports that are used in this fashion can be discovered > > > by device specific data that specifies the USB4 router they are > > > connected to. For the PCI core, the specific connection information > > > doesn't matter, but it's interesting to know that this root port is > > > used for tunneling traffic. This will allow other decisions to be > > > made based upon it. > > > > > > Detect the `usb4-host-interface` _DSD and if it's found save it > > > into a new `is_virtual_link` bit in `struct pci_device`. > > > > While this is fine for the "first" tunneled link, this does not take > > into account possible other "virtual" links that lead to the endpoint in > > question. Typically for eGPU it only makes sense to plug it directly to > > the host but say there is a USB4 hub (with PCIe tunneling capabilities) > > in the middle. Now the link from the hub to the eGPU that is also > > "virtual" is not marked as such and the bandwidth calculations may not > > get what is expected. > > Right; you mentioned the DVSEC available for hubs in this case. As I don't > have one of these to validate it works properly I was thinking that should > be a follow up. > > If you think it should be part of the same series I'll add it, but I'd ask > if you can please check I did it right on one that reports the DVSEC? I don't think it should be part of this series. I just checked and DVSEC is only required for hosts so kind of hardware equivalent for the _DSD property you are using here. For hubs there is no such luxury unfortunately. I think I do have hardware here with the DVSEC in place so if you decide to add it, I should be able to try it. From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="c4VjVSEp" Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D674A1A7; Thu, 16 Nov 2023 01:01:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1700125270; x=1731661270; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=/STXsbosH6Rz9sQMt/crvGrrS9Z0X1RfO/fEtM3K5Z0=; b=c4VjVSEp+FXbfcPUlMD4dOLzaf2czQG5e5BcvJAIqJ09QVP4TPJwHGVF yx4C5RwvB2aeZJ+HbLJCkocyorQciAxNuwadWNZmJrCVrA7lth2cUaNWb Ru4V/mu33t4t1ioMQIXCIRbdyqsw+BQR0+UK4hVB0Ao6H529p3LFEVQ7B HJNcC4R47c3v7QKrEokzjLPtDbiERAV3VaYVyg6diHWEoPNvnmsQmlI2C tcgoOygFG3uY+y1gteOUJrAvA1+6KErTEBXrtBOVB2CMTUdgQDaIVggIg ugKd96b3KrGF1+phb24hscy2SFDRwsE1ttgD2fCvWtUUq7DS9K3j4mDmE Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10895"; a="457542981" X-IronPort-AV: E=Sophos;i="6.03,307,1694761200"; d="scan'208";a="457542981" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Nov 2023 01:00:50 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10895"; a="768851613" X-IronPort-AV: E=Sophos;i="6.03,307,1694761200"; d="scan'208";a="768851613" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga007.fm.intel.com with ESMTP; 16 Nov 2023 01:00:43 -0800 Received: by black.fi.intel.com (Postfix, from userid 1001) id 9BFF0209; Thu, 16 Nov 2023 11:00:42 +0200 (EET) Date: Thu, 16 Nov 2023 11:00:42 +0200 From: Mika Westerberg To: Mario Limonciello Cc: Karol Herbst , Lyude Paul , Alex Deucher , Christian =?utf-8?B?S8O2bmln?= , Bjorn Helgaas , Lukas Wunner , Danilo Krummrich , David Airlie , Daniel Vetter , Xinhui Pan , "Rafael J . Wysocki" , Ilpo =?utf-8?B?SsOkcnZpbmVu?= , 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" Subject: Re: [PATCH v3 5/7] PCI: ACPI: Detect PCIe root ports that are used for tunneling Message-ID: <20231116090042.GF17433@black.fi.intel.com> References: <20231114200755.14911-1-mario.limonciello@amd.com> <20231114200755.14911-6-mario.limonciello@amd.com> <20231115104019.GY17433@black.fi.intel.com> <70b35a0e-5ccd-4e19-a8ac-4cf095007a69@amd.com> Precedence: bulk X-Mailing-List: linux-acpi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <70b35a0e-5ccd-4e19-a8ac-4cf095007a69@amd.com> Hi Mario, On Wed, Nov 15, 2023 at 11:08:43AM -0600, Mario Limonciello wrote: > On 11/15/2023 04:40, Mika Westerberg wrote: > > Hi Mario, > > > > On Tue, Nov 14, 2023 at 02:07:53PM -0600, Mario Limonciello wrote: > > > USB4 routers support a feature called "PCIe tunneling". This > > > allows PCIe traffic to be transmitted over USB4 fabric. > > > > > > PCIe root ports that are used in this fashion can be discovered > > > by device specific data that specifies the USB4 router they are > > > connected to. For the PCI core, the specific connection information > > > doesn't matter, but it's interesting to know that this root port is > > > used for tunneling traffic. This will allow other decisions to be > > > made based upon it. > > > > > > Detect the `usb4-host-interface` _DSD and if it's found save it > > > into a new `is_virtual_link` bit in `struct pci_device`. > > > > While this is fine for the "first" tunneled link, this does not take > > into account possible other "virtual" links that lead to the endpoint in > > question. Typically for eGPU it only makes sense to plug it directly to > > the host but say there is a USB4 hub (with PCIe tunneling capabilities) > > in the middle. Now the link from the hub to the eGPU that is also > > "virtual" is not marked as such and the bandwidth calculations may not > > get what is expected. > > Right; you mentioned the DVSEC available for hubs in this case. As I don't > have one of these to validate it works properly I was thinking that should > be a follow up. > > If you think it should be part of the same series I'll add it, but I'd ask > if you can please check I did it right on one that reports the DVSEC? I don't think it should be part of this series. I just checked and DVSEC is only required for hosts so kind of hardware equivalent for the _DSD property you are using here. For hubs there is no such luxury unfortunately. I think I do have hardware here with the DVSEC in place so if you decide to add it, I should be able to try it. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9D722C54FB9 for ; Thu, 16 Nov 2023 09:01:14 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F2B0D10E139; Thu, 16 Nov 2023 09:01:13 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.100]) by gabe.freedesktop.org (Postfix) with ESMTPS id AE24410E139; Thu, 16 Nov 2023 09:01:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1700125272; x=1731661272; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=/STXsbosH6Rz9sQMt/crvGrrS9Z0X1RfO/fEtM3K5Z0=; b=c2kzmUqqgVbWi66PCkg97xzHjwQPrQKrLSfj3J8/qfkajdvh9ev+0N5V Rd7C8WL+L/g1UKaLioI58MDaVetS4sC1GUj48APtoP5cKM1xAYNT1GELU 8u1J5BFwTB7DgLlFwOBx9lmEgl1ER3vxBiHhjm3C7lS2QI5+XEGR7nLTy N+lhGic8FQMUL/JGcYk30yavq2EW3JqLY+McWkvBKJemIxzZE6a2CqyLX ECYM3fGM+b1oTkERX3328ppqNJY8fS4GVTowcc9231721PlJaKE/QFY9V UcPpil7sEwDELNzPYG6OUm1/l847Eq5oXpbQ54GBFAmpG8eT9u6uJthbi A==; X-IronPort-AV: E=McAfee;i="6600,9927,10895"; a="457542989" X-IronPort-AV: E=Sophos;i="6.03,307,1694761200"; d="scan'208";a="457542989" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Nov 2023 01:00:50 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10895"; a="768851613" X-IronPort-AV: E=Sophos;i="6.03,307,1694761200"; d="scan'208";a="768851613" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga007.fm.intel.com with ESMTP; 16 Nov 2023 01:00:43 -0800 Received: by black.fi.intel.com (Postfix, from userid 1001) id 9BFF0209; Thu, 16 Nov 2023 11:00:42 +0200 (EET) Date: Thu, 16 Nov 2023 11:00:42 +0200 From: Mika Westerberg To: Mario Limonciello Message-ID: <20231116090042.GF17433@black.fi.intel.com> References: <20231114200755.14911-1-mario.limonciello@amd.com> <20231114200755.14911-6-mario.limonciello@amd.com> <20231115104019.GY17433@black.fi.intel.com> <70b35a0e-5ccd-4e19-a8ac-4cf095007a69@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <70b35a0e-5ccd-4e19-a8ac-4cf095007a69@amd.com> Subject: Re: [Nouveau] [PATCH v3 5/7] PCI: ACPI: Detect PCIe root ports that are used for tunneling X-BeenThere: nouveau@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Nouveau development list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Rafael J . Wysocki" , "open list:PCI SUBSYSTEM" , "open list:DRM DRIVER FOR NVIDIA GEFORCE/QUADRO GPUS" , Marek =?utf-8?B?QmVow7pu?= , "open list:RADEON and AMDGPU DRM DRIVERS" , "open list:ACPI" , "open list:DRM DRIVER FOR NVIDIA GEFORCE/QUADRO GPUS" , Ilpo =?utf-8?B?SsOkcnZpbmVu?= , Manivannan Sadhasivam , Bjorn Helgaas , Xinhui Pan , open list , Daniel Vetter , Alex Deucher , Pali =?utf-8?B?Um9ow6Fy?= , Christian =?utf-8?B?S8O2bmln?= , "Maciej W . Rozycki" Errors-To: nouveau-bounces@lists.freedesktop.org Sender: "Nouveau" Hi Mario, On Wed, Nov 15, 2023 at 11:08:43AM -0600, Mario Limonciello wrote: > On 11/15/2023 04:40, Mika Westerberg wrote: > > Hi Mario, > > > > On Tue, Nov 14, 2023 at 02:07:53PM -0600, Mario Limonciello wrote: > > > USB4 routers support a feature called "PCIe tunneling". This > > > allows PCIe traffic to be transmitted over USB4 fabric. > > > > > > PCIe root ports that are used in this fashion can be discovered > > > by device specific data that specifies the USB4 router they are > > > connected to. For the PCI core, the specific connection information > > > doesn't matter, but it's interesting to know that this root port is > > > used for tunneling traffic. This will allow other decisions to be > > > made based upon it. > > > > > > Detect the `usb4-host-interface` _DSD and if it's found save it > > > into a new `is_virtual_link` bit in `struct pci_device`. > > > > While this is fine for the "first" tunneled link, this does not take > > into account possible other "virtual" links that lead to the endpoint in > > question. Typically for eGPU it only makes sense to plug it directly to > > the host but say there is a USB4 hub (with PCIe tunneling capabilities) > > in the middle. Now the link from the hub to the eGPU that is also > > "virtual" is not marked as such and the bandwidth calculations may not > > get what is expected. > > Right; you mentioned the DVSEC available for hubs in this case. As I don't > have one of these to validate it works properly I was thinking that should > be a follow up. > > If you think it should be part of the same series I'll add it, but I'd ask > if you can please check I did it right on one that reports the DVSEC? I don't think it should be part of this series. I just checked and DVSEC is only required for hosts so kind of hardware equivalent for the _DSD property you are using here. For hubs there is no such luxury unfortunately. I think I do have hardware here with the DVSEC in place so if you decide to add it, I should be able to try it. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CA97CC197A0 for ; Thu, 16 Nov 2023 09:01:16 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CBF4A10E24F; Thu, 16 Nov 2023 09:01:14 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.100]) by gabe.freedesktop.org (Postfix) with ESMTPS id AE24410E139; Thu, 16 Nov 2023 09:01:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1700125272; x=1731661272; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=/STXsbosH6Rz9sQMt/crvGrrS9Z0X1RfO/fEtM3K5Z0=; b=c2kzmUqqgVbWi66PCkg97xzHjwQPrQKrLSfj3J8/qfkajdvh9ev+0N5V Rd7C8WL+L/g1UKaLioI58MDaVetS4sC1GUj48APtoP5cKM1xAYNT1GELU 8u1J5BFwTB7DgLlFwOBx9lmEgl1ER3vxBiHhjm3C7lS2QI5+XEGR7nLTy N+lhGic8FQMUL/JGcYk30yavq2EW3JqLY+McWkvBKJemIxzZE6a2CqyLX ECYM3fGM+b1oTkERX3328ppqNJY8fS4GVTowcc9231721PlJaKE/QFY9V UcPpil7sEwDELNzPYG6OUm1/l847Eq5oXpbQ54GBFAmpG8eT9u6uJthbi A==; X-IronPort-AV: E=McAfee;i="6600,9927,10895"; a="457542989" X-IronPort-AV: E=Sophos;i="6.03,307,1694761200"; d="scan'208";a="457542989" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Nov 2023 01:00:50 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10895"; a="768851613" X-IronPort-AV: E=Sophos;i="6.03,307,1694761200"; d="scan'208";a="768851613" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga007.fm.intel.com with ESMTP; 16 Nov 2023 01:00:43 -0800 Received: by black.fi.intel.com (Postfix, from userid 1001) id 9BFF0209; Thu, 16 Nov 2023 11:00:42 +0200 (EET) Date: Thu, 16 Nov 2023 11:00:42 +0200 From: Mika Westerberg To: Mario Limonciello Subject: Re: [PATCH v3 5/7] PCI: ACPI: Detect PCIe root ports that are used for tunneling Message-ID: <20231116090042.GF17433@black.fi.intel.com> References: <20231114200755.14911-1-mario.limonciello@amd.com> <20231114200755.14911-6-mario.limonciello@amd.com> <20231115104019.GY17433@black.fi.intel.com> <70b35a0e-5ccd-4e19-a8ac-4cf095007a69@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <70b35a0e-5ccd-4e19-a8ac-4cf095007a69@amd.com> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Karol Herbst , "Rafael J . Wysocki" , "open list:PCI SUBSYSTEM" , "open list:DRM DRIVER FOR NVIDIA GEFORCE/QUADRO GPUS" , Marek =?utf-8?B?QmVow7pu?= , "open list:RADEON and AMDGPU DRM DRIVERS" , "open list:ACPI" , Danilo Krummrich , "open list:DRM DRIVER FOR NVIDIA GEFORCE/QUADRO GPUS" , Ilpo =?utf-8?B?SsOkcnZpbmVu?= , Manivannan Sadhasivam , Bjorn Helgaas , Xinhui Pan , open list , Alex Deucher , Pali =?utf-8?B?Um9ow6Fy?= , Christian =?utf-8?B?S8O2bmln?= , "Maciej W . Rozycki" Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi Mario, On Wed, Nov 15, 2023 at 11:08:43AM -0600, Mario Limonciello wrote: > On 11/15/2023 04:40, Mika Westerberg wrote: > > Hi Mario, > > > > On Tue, Nov 14, 2023 at 02:07:53PM -0600, Mario Limonciello wrote: > > > USB4 routers support a feature called "PCIe tunneling". This > > > allows PCIe traffic to be transmitted over USB4 fabric. > > > > > > PCIe root ports that are used in this fashion can be discovered > > > by device specific data that specifies the USB4 router they are > > > connected to. For the PCI core, the specific connection information > > > doesn't matter, but it's interesting to know that this root port is > > > used for tunneling traffic. This will allow other decisions to be > > > made based upon it. > > > > > > Detect the `usb4-host-interface` _DSD and if it's found save it > > > into a new `is_virtual_link` bit in `struct pci_device`. > > > > While this is fine for the "first" tunneled link, this does not take > > into account possible other "virtual" links that lead to the endpoint in > > question. Typically for eGPU it only makes sense to plug it directly to > > the host but say there is a USB4 hub (with PCIe tunneling capabilities) > > in the middle. Now the link from the hub to the eGPU that is also > > "virtual" is not marked as such and the bandwidth calculations may not > > get what is expected. > > Right; you mentioned the DVSEC available for hubs in this case. As I don't > have one of these to validate it works properly I was thinking that should > be a follow up. > > If you think it should be part of the same series I'll add it, but I'd ask > if you can please check I did it right on one that reports the DVSEC? I don't think it should be part of this series. I just checked and DVSEC is only required for hosts so kind of hardware equivalent for the _DSD property you are using here. For hubs there is no such luxury unfortunately. I think I do have hardware here with the DVSEC in place so if you decide to add it, I should be able to try it.