From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3DA27A0C43; Mon, 15 Nov 2021 11:15:34 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BE95941142; Mon, 15 Nov 2021 11:15:33 +0100 (CET) Received: from esa3.mentor.iphmx.com (esa3.mentor.iphmx.com [68.232.137.180]) by mails.dpdk.org (Postfix) with ESMTP id BB9DD4113D for ; Mon, 15 Nov 2021 11:15:31 +0100 (CET) IronPort-SDR: eRl3XoyQsJeZJZpLW4597EjfqBpUSPJG4TZIdMB/Bv2jrtiELQ/1Oqgej/aF+gjw9/stIT5nyr 4nf5UYcW7zoLo98bRast0xmB86f14bMZzWY3VyQIuvQkL17EICroDCwA/T6SiInG0pZLxSaqLj ku2zgLqzav2lsnxi0YAXyx1hyWHitfdBGO31awJVnzpB3IXJmvRxl8lGWr9s1Gc6jYWr6fw/H1 bK+QfXd/tfgtsEc9XehStJku2HH07HQ6cWix3dNK5a5l2Y1PoA4nspwaKAr9OR3diEx80GRWfb 1OCGmI5+OYegululRBkrveEI X-IronPort-AV: E=Sophos;i="5.87,236,1631606400"; d="scan'208";a="68326678" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa3.mentor.iphmx.com with ESMTP; 15 Nov 2021 02:15:31 -0800 IronPort-SDR: SjXwbqPVE1g3FwPo/P3sS/83AsEIRVJyha9M/jXLH1A/+SV/1jb0c1zxZZZcvc+vpAzwLo7KDG lHgoplML+8tQz1L+uInnHAgqhgkzty10CPYR53pN2RBY+l1LPRFGklHCc6+QzEbQtEOuLniSyc c1hWOx4N72ejc7wTKMNo/VrQX8ycrax6vNcV/3NLHvPtTBq059Llalv3xCZS0mslUK3ZkRXUl2 4OlcjewNv34pPVwhOUQhQEgKV79Cyf15/p+FSRUM4s6+XL8YkPB/JKgrQhfxdy2QbCSDN1i+HW 92w= From: "Awan, Arsalan" To: "Namburu, Chandu-babu" , "dev@dpdk.org" CC: "Somalapuram, Amaranath" , "Sebastian, Selwin" , "Giriyapura, Maheshwaramurthy" Subject: Re: [PATCH] net/axgbe: fix PCI ID to distinguish v1000 vs e3000 Thread-Topic: [PATCH] net/axgbe: fix PCI ID to distinguish v1000 vs e3000 Thread-Index: AQHX1iiECaNqQqg8g0i/N/Z2zni9Z6v//FMAgARpSio= Date: Mon, 15 Nov 2021 10:15:24 +0000 Message-ID: <1636971324930.27524@mentor.com> References: <20211110114519.8216-1-Arsalan_Awan@mentor.com>, In-Reply-To: Accept-Language: en-US, en-IE Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [192.94.31.225] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Thanks, Chandu!=0A= =0A= Appreciate you guys looking into this!=0A= =0A= Looking forward to hear from you soon.=0A= =0A= Thanks and regards,=0A= Arsalan=0A= ________________________________________=0A= From: Namburu, Chandu-babu =0A= Sent: Friday, November 12, 2021 7:48 PM=0A= To: Awan, Arsalan; dev@dpdk.org=0A= Cc: Somalapuram, Amaranath; Sebastian, Selwin; Giriyapura, Maheshwaramurthy= =0A= Subject: RE: [PATCH] net/axgbe: fix PCI ID to distinguish v1000 vs e3000=0A= =0A= [AMD Official Use Only]=0A= =0A= Hi Arsalan Awan,=0A= =0A= Thank you for sharing the patch. DPDK not working on V1000 is regression du= e to "bus/pci: optimize bus scan" patch. As RV Root Complex device does not= have any Linux kernel driver assigned, this device is removed from PCI sca= n list and not found using pcie_search_device() routine.=0A= =0A= Patch submitted is potential fix for the issue, but we are checking if this= is the best way to fix regression. Will update you soon on the fix shared.= =0A= =0A= Regards,=0A= Chandu=0A= =0A= -----Original Message-----=0A= From: Arsalan H. Awan =0A= Sent: Wednesday, November 10, 2021 5:15 PM=0A= To: dev@dpdk.org=0A= Cc: Namburu, Chandu-babu ; Somalapuram, Amaranath ; Sebastian, Selwin ; Giriy= apura, Maheshwaramurthy ; Arsalan H. A= wan =0A= Subject: [PATCH] net/axgbe: fix PCI ID to distinguish v1000 vs e3000=0A= =0A= The RV PCI Root Complex Device is not visible to DPDK on the PCI bus via pc= i_search_device on some OSs including Ubuntu and Yocto. This makes it impos= sible to determine which machine DPDK/axgbe is running on. As a result, DPD= K/axgbe does not work on v1000.=0A= =0A= Let's use the Raven Internal PCIe GPP Bridge ID that DPDK can see on the PC= I bus that exists on the v1000 to differentiate between RV AXGBE and SNOWY = AXGBE, and set the registers accordingly. This fixes DPDK not working on v1= 000 platform.=0A= =0A= Signed-off-by: Arsalan H. Awan =0A= ---=0A= drivers/net/axgbe/axgbe_ethdev.c | 6 +++---=0A= 1 file changed, 3 insertions(+), 3 deletions(-)=0A= =0A= diff --git a/drivers/net/axgbe/axgbe_ethdev.c b/drivers/net/axgbe/axgbe_eth= dev.c=0A= index 7d40c18a86..7b1b46990f 100644=0A= --- a/drivers/net/axgbe/axgbe_ethdev.c=0A= +++ b/drivers/net/axgbe/axgbe_ethdev.c=0A= @@ -170,7 +170,7 @@ static const struct axgbe_xstats axgbe_xstats_strings[]= =3D {=0A= =0A= /* The set of PCI devices this driver supports */=0A= #define AMD_PCI_VENDOR_ID 0x1022=0A= -#define AMD_PCI_RV_ROOT_COMPLEX_ID 0x15d0=0A= +#define AMD_PCI_RV_INTERNAL_PCIE_GPP_BRIDGE_ID 0x15db=0A= #define AMD_PCI_AXGBE_DEVICE_V2A 0x1458 #define AMD_PCI_AXGBE_DEVICE_V2B = 0x1459=0A= =0A= @@ -2178,9 +2178,9 @@ eth_axgbe_dev_init(struct rte_eth_dev *eth_dev)=0A= pdata->pci_dev =3D pci_dev;=0A= =0A= /*=0A= - * Use root complex device ID to differentiate RV AXGBE vs SNOWY AX= GBE=0A= + * Use Raven Internal PCIe GPP Bridge device ID to differentiate RV= =0A= +AXGBE vs SNOWY AXGBE=0A= */=0A= - if (pci_search_device(AMD_PCI_RV_ROOT_COMPLEX_ID)) {=0A= + if (pci_search_device(AMD_PCI_RV_INTERNAL_PCIE_GPP_BRIDGE_ID)) {=0A= pdata->xpcs_window_def_reg =3D PCS_V2_RV_WINDOW_DEF;=0A= pdata->xpcs_window_sel_reg =3D PCS_V2_RV_WINDOW_SELECT;=0A= } else {=0A= --=0A= 2.17.1=0A= =0A=