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 586E0A034C; Mon, 17 Jan 2022 11:22:36 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DE7A74118F; Mon, 17 Jan 2022 11:22:35 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id DFB424067B; Mon, 17 Jan 2022 11:22:33 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1642414954; x=1673950954; h=message-id:date:to:cc:references:from:subject: in-reply-to:content-transfer-encoding:mime-version; bh=8iTwofNxwB7GSFhnI1RxoyzAFQDGVW0Ui6lAS7qWsfM=; b=QT+RwOPj15/cPL9LyP719RVee3ZwCwp32TQHnVCG5B03z7oPwiMMPzXX iIj2qCuhAhf6S+uZZlCC4vAOaiev8bslK3CGghtw/BwL0fTFDLFCw3WNg ecIZW2GnZdEdMr9NhcrkFXbYdrIn6/LRZHWRd3dbz5ugzEx39QDJQ16E5 sJSur1WPIKJKTLgHQGKIrs+mv77W39UdelOAqna2sn4eOt247aDrQVtn5 EQAX+GWCdDfTB/FDO74OcGcrr7oaXeVfHdT/u+Z0c4RUfQwv7rFWW4GC2 t8BqhLqzGB73BfsNqnArtM36ymTHEyyVxKmRq9IttrFpvLhqYy8IIHdb8 g==; X-IronPort-AV: E=McAfee;i="6200,9189,10229"; a="243421236" X-IronPort-AV: E=Sophos;i="5.88,295,1635231600"; d="scan'208";a="243421236" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jan 2022 02:22:32 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,295,1635231600"; d="scan'208";a="693026343" Received: from fmsmsx606.amr.corp.intel.com ([10.18.126.86]) by orsmga005.jf.intel.com with ESMTP; 17 Jan 2022 02:22:32 -0800 Received: from fmsmsx602.amr.corp.intel.com (10.18.126.82) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Mon, 17 Jan 2022 02:22:31 -0800 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20 via Frontend Transport; Mon, 17 Jan 2022 02:22:31 -0800 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.108) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.20; Mon, 17 Jan 2022 02:22:30 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bOq+sLEK2z7SwNy9CglTAMBkrCMl22iS01i5/wTudmkGXQTQUSAop0+1BNBnVpQfd99WlJwSjpECfSA1djWBb7OcjaemiT2J1211/NeL3lfIPaglIh5QKNArU2r46k715IdM0UWT5ag4G9+ClMG26rmr6WKkBJ/FaCYV8eRRI3qZvmGiI8Ua3RT2r8CeNd5GawiUbRlN6lM8oT4XYLPtprNXE4ksSGxzfJetYhMQT621zdt03pqGHfP2BwW8wmAq4Y/QxURWrimno5JNHUyMJSfWI30miTaw/VN/w8/kxQ0+6jXGk+Lj6Rw+xxfAFkjJG0jHHbRqaQs58BLf3z220w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=kZtVPQCJx89vr7GU7CVrsnRPsO4Enfs8o2XpoDkJOjU=; b=Y5urCVHclgnDO/fGp7uh3p4JoOCi4KR0YiW9/APjfdWfAqq1YPwhw11ijze7vpfV/G6BSTDYgWYaHJkJpPhfcahxy5ngXCk8yS2kJDAky20sd4rAHLbzyVt54BiWnjSZ1nypd5hW3TS80OI0w0pY2rGRDDnl3CpMENGsqa/bdozzUC56qSswL+i7QwUbW5anyMO/X4L4TzEWIB4Irje71FxnIddDAlc5XpzZYxa/783Gf9EhTIM5ElkZRWB6zWa5Gk/9AC/MG7OhAeEaYiuffAJqvdGPlKTrtdQvRRRSyp+IyiweUDPrhwkNMtL4lZjSfd06a28xFwZ1NTpY/QH8yg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) by BN7PR11MB2867.namprd11.prod.outlook.com (2603:10b6:406:b9::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4888.9; Mon, 17 Jan 2022 10:22:28 +0000 Received: from PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::5046:8550:928d:850e]) by PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::5046:8550:928d:850e%7]) with mapi id 15.20.4888.014; Mon, 17 Jan 2022 10:22:28 +0000 Message-ID: <47b71ae3-0729-d7aa-0394-908700ec0b34@intel.com> Date: Mon, 17 Jan 2022 10:22:23 +0000 Content-Language: en-US To: "Sebastian, Selwin" , "Namburu, Chandu-babu" , "dev@dpdk.org" , "david.marchand@redhat.com" CC: "Arsalan_Awan@mentor.com" , "stable@dpdk.org" References: <20211126102403.13223-1-chandu@amd.com> <20211202161034.519226-1-chandu@amd.com> From: Ferruh Yigit Subject: Re: [PATCH v2] net/axgbe: use PCI root complex device to distinguish AMD hardware X-User: ferruhy In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P123CA0313.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:197::12) To PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 30fb554b-8061-4abc-c8d9-08d9d9a3438c X-MS-TrafficTypeDiagnostic: BN7PR11MB2867:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1775; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ZIt9/Zbyba+za8eujHJITOwjClPsAlm72dTqQfIavQLbz1HGtRPX370CakASKKhhALIbc/thqpTZsqcbe6kXN6jfEK8ojZbPiLf/t8VTZrRb4iZJg5/csK1WzBVODxuYyB08BlLMmzqzGVEFnSeKGkLS0ID3Gskbx2dNPdECJiUR650X6hUNYART0bQ5V9fwqxVJmjHolXHPGHy1Qjl9ak1CApBdWxNHQaf4DfzCHnj61Fj8X6ze5pH/kYSKAAbWrKF0Ac6ETIECXfofnsFsL+QV+Aqx1FzdD8fjMZQVdojnB/o+nKSLIEM6Vm3gFil7EhF/ggTWwOObjPoe0CL1Y0G2Sk6bJn+Mh7l1O844nUBzbAOa2rka/ifHysSuoIwrB3ngyTYyjXTnHnoF2P/axNTVSkdkAMsgxhaOaNTzfXIsBuPpL6/gFIi2pGoOjSOVxqRqI7fGtNjwDApo2Z4ye29gKuP4g0h1D23o53D9hbK0pwxvDfwGZu4iCHnlIn/poAUloiXTzyeYZVyMtliI8YDkSzq/axjJ7fV59+XJhoTYdpH/n2eVJacmp615qCATS1kwQHDckoO5fIryE/vpW7ShzV4RZniXxXUPsBF34ipZmmTblVGxx6cKC0c+o3nzF+HN9XfoaEY4xqZbxUez2BD5mtmI88mIZTFjEaF/0dKjyBsKyDx4vs5e/e+MPZwTN+Ajl0GRcogRFn9VN9Ix8A== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5000.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(38100700002)(6512007)(36756003)(53546011)(6506007)(86362001)(316002)(8676002)(8936002)(31686004)(110136005)(82960400001)(83380400001)(31696002)(54906003)(6486002)(508600001)(4326008)(66946007)(6666004)(66556008)(66476007)(2906002)(2616005)(44832011)(5660300002)(26005)(186003)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?QkI4VXkzRnJQQXYrNjFVS2NSUGR2eUNPaW5SNEFvSTRxcy9kSkJjNHdUYUxX?= =?utf-8?B?VkhFbFNGY080UWl4cUx2SHpnRUxnWjZqU1VFQWpuRHZScjVYaWhBOVZieVV1?= =?utf-8?B?Qy9ob0NnZVRqazJDN2gzSE5EL3JaVUc4YTRlMitqWTk1RjNNRE00d2VMRmkz?= =?utf-8?B?M3FvUTNlVVEySUlaV3FqZXBOdDdSRGc5eUs1dmVoNWU2WWc2S2pwU3pKbStZ?= =?utf-8?B?VCsrQVBKNnlLZllwSG1nZmVnMFpHZUVodG1vZnJpZXB4SEdDTUxLNzc2cGZC?= =?utf-8?B?b2YrOU1MMG1YTkp2UjV1Q3IwS2wvN2F6enZQeWExOUw5TE41enZ5K1ZGN1cr?= =?utf-8?B?VVNJUHJZU3EzR0V4WUpjRHVibThsNU1pdXpBYjI3bDhZWFlqbGllZEJyTTVm?= =?utf-8?B?SzZhTDNSdkRrSWduR1VHdXNGM01MQnB5ZUVnaTFQdGtBKzJ1VkxXV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change-CrossTenant-AuthSource: PH0PR11MB5000.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jan 2022 10:22:28.8489 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ibETzePG6OR4N3kmazfB706OXyonsrXKqq/s/FAMHawd1BJ9z/dDunw+TMxqnkzSieuIte7JnJrWXDXM5al6nA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN7PR11MB2867 X-OriginatorOrg: intel.com 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 On 1/17/2022 5:40 AM, Sebastian, Selwin wrote: > Acked by: Selwin Sebastian > Hi Selwin, Patchwork doesn't recognize the tag, I guess because it is looking for exact "Acked-by: " tag, with '-'. Can you please pay attention next time, able to see the status in the patchwork help maintainers to trace patch's status. Cheers, ferruh > -----Original Message----- > From: Namburu, Chandu-babu > Sent: Monday, January 10, 2022 12:08 PM > To: dev@dpdk.org; david.marchand@redhat.com; ferruh.yigit@intel.com > Cc: Sebastian, Selwin ; Arsalan_Awan@mentor.com; stable@dpdk.org > Subject: RE: [PATCH v2] net/axgbe: use PCI root complex device to distinguish AMD hardware > > [Public] > > Hi, > > Gentle reminder. > > This is patch is required to submit changes for new AMD products. Please review and let us know if any modification are required. > > Regards, > Chandu > > -----Original Message----- > From: Namburu, Chandu-babu > Sent: Wednesday, December 22, 2021 2:58 PM > To: dev@dpdk.org; david.marchand@redhat.com; ferruh.yigit@intel.com > Cc: Sebastian, Selwin ; Arsalan_Awan@mentor.com; stable@dpdk.org > Subject: RE: [PATCH v2] net/axgbe: use PCI root complex device to distinguish AMD hardware > > [Public] > > Hi David Marchand, > > I have submitted v2 patch with your suggestion in git log. Please review changes. > > Regards, > Chandu > > -----Original Message----- > From: Namburu, Chandu-babu > Sent: Thursday, December 2, 2021 9:41 PM > To: dev@dpdk.org; david.marchand@redhat.com > Cc: Sebastian, Selwin ; Arsalan_Awan@mentor.com; ferruh.yigit@intel.com; Namburu, Chandu-babu ; stable@dpdk.org > Subject: [PATCH v2] net/axgbe: use PCI root complex device to distinguish AMD hardware > > "bus/pci: optimize bus scan" broke axgbe on V1000/R1000. > RV root complex pci device does not have any kernel driver assigned so it is removed from pci scan list which is used in > "net/axgbe: add a HW quirk for register definitions". > > Get root complex device id directly from pci sysfs instead of pci scan list. > > Fixes: 991e0b1dbc4a (net/axgbe: add a HW quirk for register definitions) > Cc: stable@dpdk.org > > Signed-off-by: Chandubabu Namburu > --- > drivers/net/axgbe/axgbe_ethdev.c | 39 ++++++++++++++++---------------- > 1 file changed, 20 insertions(+), 19 deletions(-) > > diff --git a/drivers/net/axgbe/axgbe_ethdev.c b/drivers/net/axgbe/axgbe_ethdev.c > index 7d40c18a86..7b8d94ca3c 100644 > --- a/drivers/net/axgbe/axgbe_ethdev.c > +++ b/drivers/net/axgbe/axgbe_ethdev.c > @@ -10,6 +10,8 @@ > #include "axgbe_regs.h" > #include "rte_time.h" > > +#include "eal_filesystem.h" > + > static int eth_axgbe_dev_init(struct rte_eth_dev *eth_dev); static int axgbe_dev_configure(struct rte_eth_dev *dev); static int axgbe_dev_start(struct rte_eth_dev *dev); @@ -2117,28 +2119,27 @@ static void axgbe_default_config(struct axgbe_port *pdata) > pdata->power_down = 0; > } > > -static int > -pci_device_cmp(const struct rte_device *dev, const void *_pci_id) > +/* > + * Return PCI root complex device id on success else 0 */ static > +uint16_t > +get_pci_rc_devid(void) > { > - const struct rte_pci_device *pdev = RTE_DEV_TO_PCI_CONST(dev); > - const struct rte_pci_id *pcid = _pci_id; > + char pci_sysfs[PATH_MAX]; > + const struct rte_pci_addr pci_rc_addr = {0, 0, 0, 0}; > + unsigned long device_id; > > - if (pdev->id.vendor_id == AMD_PCI_VENDOR_ID && > - pdev->id.device_id == pcid->device_id) > - return 0; > - return 1; > -} > + snprintf(pci_sysfs, sizeof(pci_sysfs), "%s/" PCI_PRI_FMT "/device", > + rte_pci_get_sysfs_path(), pci_rc_addr.domain, > + pci_rc_addr.bus, pci_rc_addr.devid, pci_rc_addr.function); > > -static bool > -pci_search_device(int device_id) > -{ > - struct rte_bus *pci_bus; > - struct rte_pci_id dev_id; > + /* get device id */ > + if (eal_parse_sysfs_value(pci_sysfs, &device_id) < 0) { > + PMD_INIT_LOG(ERR, "Error in reading PCI sysfs\n"); > + return 0; > + } > > - dev_id.device_id = device_id; > - pci_bus = rte_bus_find_by_name("pci"); > - return (pci_bus != NULL) && > - (pci_bus->find_device(NULL, pci_device_cmp, &dev_id) != NULL); > + return (uint16_t)device_id; > } > > /* > @@ -2180,7 +2181,7 @@ eth_axgbe_dev_init(struct rte_eth_dev *eth_dev) > /* > * Use root complex device ID to differentiate RV AXGBE vs SNOWY AXGBE > */ > - if (pci_search_device(AMD_PCI_RV_ROOT_COMPLEX_ID)) { > + if ((get_pci_rc_devid()) == AMD_PCI_RV_ROOT_COMPLEX_ID) { > pdata->xpcs_window_def_reg = PCS_V2_RV_WINDOW_DEF; > pdata->xpcs_window_sel_reg = PCS_V2_RV_WINDOW_SELECT; > } else { > -- > 2.25.1