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 CACC5A00C5; Wed, 2 Feb 2022 11:54:40 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 549D840DF4; Wed, 2 Feb 2022 11:54:40 +0100 (CET) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id 0031140688 for ; Wed, 2 Feb 2022 11:54:37 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1643799278; x=1675335278; h=message-id:date:to:cc:references:from:subject: in-reply-to:content-transfer-encoding:mime-version; bh=DIyGrKWXimDkYcJBO1nHqAJabtT7+9D+DOhf+td12Z0=; b=GWWhUPBZ+fIY90anARTZUbNLtQq+eLfigsk0c+BGqqDTcM86kpwpNXOe /zyKVQXOSEE53mtpJGHisYcQ89hPnAaaP/qPubn+SC5bq6m5aOkinVHZ8 z2alZvzCYYLdSrp4t6ewjUd5ZpjUwTQKDrSUoLuLAa7Y2Oan1nVwK7ivf 3sHjD6J5clEWjp1/agtfdGveVreqznk51wkHjOhAsfmoOM4V1Qj+NPhh+ YPGQPjuH6xE6Dyf6bE/E0SIFfELP5wvhXykqgJzfPtipyK2glutrKJTf1 fPEZbabzcrv6Xmy4Z6KeJkaqVCGB9yzu+/VXHl/xnm2iOX5ktRnSC4SwK w==; X-IronPort-AV: E=McAfee;i="6200,9189,10245"; a="245486557" X-IronPort-AV: E=Sophos;i="5.88,336,1635231600"; d="scan'208";a="245486557" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Feb 2022 02:54:15 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,336,1635231600"; d="scan'208";a="538202587" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orsmga008.jf.intel.com with ESMTP; 02 Feb 2022 02:54:14 -0800 Received: from fmsmsx606.amr.corp.intel.com (10.18.126.86) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Wed, 2 Feb 2022 02:54:14 -0800 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) 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 via Frontend Transport; Wed, 2 Feb 2022 02:54:14 -0800 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.172) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.20; Wed, 2 Feb 2022 02:54:14 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=c1Ar8dtA0gjGm0jiTTYLRXsTsKjWGa4YdBf2WBeNAAJzuE4TX1YcQp+pOubXKYFDVywQE9g5FUH5pUFpXHzU+VbJ1lDZ8lGYOMMc6/Tkhio+ZMY6kWaF7+l74/3UGl+FQKGjIeJ58IKRzW/7XnO+cg6kRS0+Gk/cweWC4abGestoNouQgr2NRwsf2LjE4lxaFMQuHFzR714leXNN26JoFekkpFwZEW2NPWmlfGz9n47dXD7xZ7TiCeyGzAGj7EnflSHARKmeI5KuhQd+nE038+pG6qzHe819ipfs0k6AY0fbf1gZLxmLMOKLxr1R6XNdOO5s9YTuXwrsRs1P1C6OQw== 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=ovLDDbQqV0oqV4cpGI6gTQikwvA9GldhsuBSvkNE32I=; b=Axm4XVIPZRjtsxUK2zjU1wT+7FYr6G2G1R0F/NIJsEOEiCiB1dumak8/yu61WiNcAESZDP/elsZ9fnfb0ClqghNgJABocXE9o35ViIKfXv/DAaIc/ldiWLD7I0vL3nIlRUYJwKQ5tJJg8yBcrF1QjZM3GYk7ZVPxiWFBo1EUx719ZsJT6pjEkXr7SN43lmFP/Vfj4kmrVhTJXVivFFfawBIAvs1eaFKWGTPJYIS7jU+ldp/mjoyo7AeP33sCaQRHNYihyhYXb0w47EQzFc2sVgaZiTU0VBLsGXWnZ/e1Hlv173iAHPiflHJoGQQRyjBFJPyzIjvC2sGs7hXG5IYLAA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; 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 DM6PR11MB3883.namprd11.prod.outlook.com (2603:10b6:5:19f::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.12; Wed, 2 Feb 2022 10:54:10 +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.4951.012; Wed, 2 Feb 2022 10:54:00 +0000 Message-ID: <71f12431-3aeb-4b2e-ad17-de064dbda5c1@intel.com> Date: Wed, 2 Feb 2022 10:53:20 +0000 Content-Language: en-US To: "Sebastian, Selwin" , "dev@dpdk.org" CC: "Namburu, Chandu-babu" References: <20220131053920.167230-1-ssebasti@amd.com> <20220131053920.167230-2-ssebasti@amd.com> <357547fd-2e00-f0b0-5ea8-dfeca8c6cd30@intel.com> From: Ferruh Yigit Subject: Re: [PATCH v1 1/2] net/axgbe: add support for Yellow Carp ethernet device X-User: ferruhy In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P265CA0016.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:2ad::10) 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: cce1d878-2442-4087-fb8b-08d9e63a3d39 X-MS-TrafficTypeDiagnostic: DM6PR11MB3883:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7691; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: WcCF66sISjap/JrpFBu5F4OeWAL5SKjN79RtlrJ2yhzfbs2s3esor1q5IZ+vBXQ2puBEuOQIuJcUflUUfmHA7eHU1mHiN6ZR5B1oeJqOBh3QT62cTScjYGBdYc+V6XOrGBU5gtob70c+pvT5yyN1kFgqE1ZoBtJMRGq9/Rj5s38nJ5w0csZGwaehTPhoPkITQz23K3rwIHnO026FEkYWU87HwQgIuf5U70127CsaAlbAenVoQZ6Kt9RkCRPrgm+SXXvoj4leGY7Dcgcj/k+QAiDGN5pj+CrLe+wtdb3169UiOcZ1Zma+jQp89bme/LniAOwjNDC89RIrx2la1fSQrYQUJ6qjuJl3qLDX1LS7QfjPAWgEjyDtpOnrFkpyutjXD8GI3c0qYnQsrQLlZ/TA/i45yF4sFhSUiiKbSYYt205fDncfPBjTjSVr1lBzr2t6ZVF3ekDtkOqmB5jhWqEHnRkstq20AwuREYX/nguz3+rXMsIiDU5F3a6f7XaraelrzBAAvFFnuAdl7PBMN+gsjNuGoFMH22nggUkmipK3DPs6hFJhE/nl/b8epI/D5LVRYqIvfDqaB8ba2/EpxWlez4JAMtajaOB+M+hnyLmGf9KVWAPmo7FNf+5SK2v8jo5QEOZLs0oY+b7u8yb6xntTyX5qjivrwPLv1wCcual+Gk1gXfO91UVa7xTGtorrBhk7uq3BxSalcGhHHEp5WeoeXQ== 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:(13230001)(366004)(5660300002)(26005)(186003)(2616005)(6486002)(316002)(6666004)(53546011)(44832011)(55236004)(82960400001)(6506007)(31686004)(6512007)(66946007)(110136005)(36756003)(83380400001)(2906002)(66476007)(508600001)(31696002)(8676002)(86362001)(38100700002)(8936002)(66556008)(4326008)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?WThiL3JzelQ2U3F1ZEYwdFNuUm1PbzA3MlRxTzh0NDFYSlJJRGE2b3ZTUmtT?= =?utf-8?B?azg4M3MvWHV0aTVPdFBCd3N6QmZ5ck40T1pnWkZoekxMZ1h1RGpGT3hhcnRY?= =?utf-8?B?Zk5CYjgyaDV0emNpUnpHUnl6S0Y0cUcxaFNoZ0pqeXM2YmwrWEN1bGgwbFI5?= =?utf-8?B?cTRXOGRYaHpCY1JJOVZuZWtMN0tkZ0FHTko5RElGSk9WT1pjalpMbHE5eWo3?= =?utf-8?B?WUU0enB4eFBDcVh1cm1RdzVlMEFXTS9qc2FFenJqZzkycStJK1BVTlgwNUNu?= =?utf-8?B?UEhxTk45b3dJRUtPNE5lc2pZZXVuVzNacUdCaXhBaDZZVjNtMTZ3ajBKNFNM?= =?utf-8?B?NCtmd0JFWUxjTENhUUNJbjRvQVhPcHRUMDRtTzV6d1ljcWIwa3VDeFowQThE?= =?utf-8?B?eXpSSnE5RThtQ09LYUtzZmJHdW9zcnRWZXp0V3cyaW5RRm4yMGRKMVhmNXF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Tenant-AuthSource: PH0PR11MB5000.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Feb 2022 10:54:00.3226 (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: 4t+CJCn4wDwkeuLolsMvxQ65rrRMKgyC46xkKze16A20FPcniF6EfNx7UVcob7Bs9VcdkRJsmVFC+siG3mQywA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB3883 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 2/2/2022 8:56 AM, Sebastian, Selwin wrote: > [AMD Official Use Only] > > Hi Ferruh, > Yellow Carp is the name of the new V3xxx series CPU with same ethernet IP and same PCI id as older generation CPUs. We are using root complex device PCI ID to differentiate the CPUs so that right window settings can be applied. > It must be difficult to manage, how is it handled in Linux Kernel, same way (root complex)? And what do you think about proving link/documentation for new device? (The question asked on cover letter.) > Thanks and Regards > Selwin Sebastian > > > -----Original Message----- > From: Ferruh Yigit > Sent: Tuesday, February 1, 2022 7:56 PM > To: Sebastian, Selwin ; dev@dpdk.org > Cc: Namburu, Chandu-babu > Subject: Re: [PATCH v1 1/2] net/axgbe: add support for Yellow Carp ethernet device > > [CAUTION: External Email] > > On 1/31/2022 5:39 AM, ssebasti@amd.com wrote: >> From: Selwin Sebastian >> >> Yellow Carp ethernet devices (V3xxx) use the existing PCI ID but the >> window settings for the indirect PCS access have been > > Can you please explain (again) what is happening here? > > Was is same IP used in multiple CPUs with same PCI id but slightly different configuration, and you are trying to detect the device by checking root complex device PCI ID? > If so why the device name (Yellow Carp) is different, or is it the name of the CPU? > >> altered. Add the check for Yellow Carp Ethernet devices to use the new >> register values. >> >> Signed-off-by: Selwin Sebastian >> --- >> drivers/net/axgbe/axgbe_common.h | 2 ++ >> drivers/net/axgbe/axgbe_ethdev.c | 34 +++++++++++++++++++++----------- >> 2 files changed, 25 insertions(+), 11 deletions(-) >> >> diff --git a/drivers/net/axgbe/axgbe_common.h >> b/drivers/net/axgbe/axgbe_common.h >> index 5310ac54f5..b9ebf64fb8 100644 >> --- a/drivers/net/axgbe/axgbe_common.h >> +++ b/drivers/net/axgbe/axgbe_common.h >> @@ -901,6 +901,8 @@ >> #define PCS_V2_WINDOW_SELECT 0x9064 >> #define PCS_V2_RV_WINDOW_DEF 0x1060 >> #define PCS_V2_RV_WINDOW_SELECT 0x1064 >> +#define PCS_V2_YC_WINDOW_DEF 0x18060 >> +#define PCS_V2_YC_WINDOW_SELECT 0x18064 >> >> /* PCS register entry bit positions and sizes */ >> #define PCS_V2_WINDOW_DEF_OFFSET_INDEX 6 >> diff --git a/drivers/net/axgbe/axgbe_ethdev.c >> b/drivers/net/axgbe/axgbe_ethdev.c >> index e9546469f3..2be9387f98 100644 >> --- a/drivers/net/axgbe/axgbe_ethdev.c >> +++ b/drivers/net/axgbe/axgbe_ethdev.c >> @@ -173,6 +173,8 @@ static const struct axgbe_xstats axgbe_xstats_strings[] = { >> /* The set of PCI devices this driver supports */ >> #define AMD_PCI_VENDOR_ID 0x1022 >> #define AMD_PCI_RV_ROOT_COMPLEX_ID 0x15d0 >> +#define AMD_PCI_YC_ROOT_COMPLEX_ID 0x14b5 >> +#define AMD_PCI_SNOWY_ROOT_COMPLEX_ID 0x1450 >> #define AMD_PCI_AXGBE_DEVICE_V2A 0x1458 >> #define AMD_PCI_AXGBE_DEVICE_V2B 0x1459 >> >> @@ -2178,17 +2180,6 @@ eth_axgbe_dev_init(struct rte_eth_dev *eth_dev) >> pci_dev = RTE_DEV_TO_PCI(eth_dev->device); >> pdata->pci_dev = pci_dev; >> >> - /* >> - * Use root complex device ID to differentiate RV AXGBE vs SNOWY AXGBE >> - */ >> - 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 { >> - pdata->xpcs_window_def_reg = PCS_V2_WINDOW_DEF; >> - pdata->xpcs_window_sel_reg = PCS_V2_WINDOW_SELECT; >> - } >> - >> pdata->xgmac_regs = >> (void *)pci_dev->mem_resource[AXGBE_AXGMAC_BAR].addr; >> pdata->xprop_regs = (void *)((uint8_t *)pdata->xgmac_regs @@ >> -2203,6 +2194,27 @@ eth_axgbe_dev_init(struct rte_eth_dev *eth_dev) >> else >> pdata->vdata = &axgbe_v2b; >> >> + /* >> + * Use PCI root complex device ID to identify the CPU >> + */ >> + switch (get_pci_rc_devid()) { >> + case 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; >> + break; >> + case AMD_PCI_YC_ROOT_COMPLEX_ID: >> + pdata->xpcs_window_def_reg = PCS_V2_YC_WINDOW_DEF; >> + pdata->xpcs_window_sel_reg = PCS_V2_YC_WINDOW_SELECT; >> + break; >> + case AMD_PCI_SNOWY_ROOT_COMPLEX_ID: >> + pdata->xpcs_window_def_reg = PCS_V2_WINDOW_DEF; >> + pdata->xpcs_window_sel_reg = PCS_V2_WINDOW_SELECT; >> + break; >> + default: >> + PMD_DRV_LOG(ERR, "No supported devices found\n"); >> + return -ENODEV; >> + } >> + >> /* Configure the PCS indirect addressing support */ >> reg = XPCS32_IOREAD(pdata, pdata->xpcs_window_def_reg); >> pdata->xpcs_window = XPCS_GET_BITS(reg, PCS_V2_WINDOW_DEF, >> OFFSET); >