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 6C702A00C3; Tue, 1 Feb 2022 15:26:30 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 03B1240698; Tue, 1 Feb 2022 15:26:30 +0100 (CET) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id 7D6C240691 for ; Tue, 1 Feb 2022 15:26:27 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1643725587; x=1675261587; h=message-id:date:to:cc:references:from:subject: in-reply-to:content-transfer-encoding:mime-version; bh=DoJQHNpMagvAsqV8UbmmmMpyrc5tAa227+WVTTYjKs4=; b=UWrgQaPgamrbMeJOgPnLUCBpqV6F1UmQNvRFcoP7qi+S0MlRzwBhSHvv wB7eFHfzDDedtv5VcLFciQFQQzgtWBoTAc9WZC3osICq7V6GcYE5aDrpu TnRY28wXPqcWmpY6U6ocbFLiUX08MXUei+Y3cV3moL7vdDiOBY21LPZvK MBq8yHBivWNr7m9XYCvqo3pOcwln24BeiAUn+jimde2Cc1w215b+kXuTz Sx6vTu4PAI/95Vzp54VD5Tm9nAQfL5q6tqWSjG+t9h9ztgSYsBXxlSmIr QK3TamGbwRSuchX+DQhgxrChV32CNIuPm11K3oA4uxGaElIwvdqKD5mgF g==; X-IronPort-AV: E=McAfee;i="6200,9189,10244"; a="247651422" X-IronPort-AV: E=Sophos;i="5.88,334,1635231600"; d="scan'208";a="247651422" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Feb 2022 06:26:26 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,334,1635231600"; d="scan'208";a="565604923" Received: from fmsmsx605.amr.corp.intel.com ([10.18.126.85]) by orsmga001.jf.intel.com with ESMTP; 01 Feb 2022 06:26:23 -0800 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Tue, 1 Feb 2022 06:26:23 -0800 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20 via Frontend Transport; Tue, 1 Feb 2022 06:26:23 -0800 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.47) 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; Tue, 1 Feb 2022 06:26:23 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JKH32cnZu1E4VcBSTlRl5Iv3rtOEDNA5co5G8HK3tq5ttQXElZ4y/VaGJTzNx1ohwBd1TePgnub7H2TqLIX6kCoqTV+NoYdH48fSK81S2sLlQMbYB1UJPS3ii3+pc0hJcibV+7kDSNRGlJcrqvdUFj5XZ9Cv2gL1JGJBl4fO9JRD0kC0sIxnfUen24HhCobtmuzTP2xnjA4sd3ddvQrivyeuHiPmEq6ZdLLOVXuw2FfBnWjT0qB59YK32KJbdtPLns3lesDNcw2Vs8kiycJY0sDxGqlFyS0Xt9RivN2zUnFyipKRb0QuFkzYOYJtllI7xoydmnhK+VlDDTx2xJEjcA== 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=RO40SzkHM6g0IMdk0h6Ddu4/58ayo6FOdFJZKn8RfyM=; b=BUCrDL1/T99/xtzda1fm2S4saINf8bnnmyR+hBBgXeYPE8o9TuylAbDt7xJ8IYPb0r3JuvQRJadH59rqepJMpGRtbmTPXrL6p515NAIkd9o84DuVOkv0ycnApESqIaFQO6P2dfHBH2Dxy1U0dwaFfyYLlTS13DBMpED392ozDwnMbMqQCfOf1PMFKgPgt3Dgo7ZZydBM6VlgyHZraJamy8vNHNB6SHgtTooiAUnwA3jPFRrYHlS+8JNonQn+QHqqBUrnVzsr92t5PwWgJTZV4ZRwSNyXeCby3YJP+KZaKpyJGNxEVf/3nwMCUM4L4+29R54tYKwvZdVWhOwOwVNuWg== 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 SJ0PR11MB5133.namprd11.prod.outlook.com (2603:10b6:a03:2ac::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4909.7; Tue, 1 Feb 2022 14:26:22 +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.4930.022; Tue, 1 Feb 2022 14:26:22 +0000 Message-ID: <357547fd-2e00-f0b0-5ea8-dfeca8c6cd30@intel.com> Date: Tue, 1 Feb 2022 14:26:17 +0000 Content-Language: en-US To: , CC: References: <20220131053920.167230-1-ssebasti@amd.com> <20220131053920.167230-2-ssebasti@amd.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: <20220131053920.167230-2-ssebasti@amd.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P123CA0174.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:18a::17) 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: 8336a225-7e4d-4641-44c0-08d9e58ed1d1 X-MS-TrafficTypeDiagnostic: SJ0PR11MB5133:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4303; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: nePdKySJ2/8Dy9ygAEaZiBk5wmiJV9nhXhhQ4n997nslowLTgXRGgWmEr6VPq0XMfSr9EzO1ygJdt3rrYL2FIZj5X3Y4BDT/r45OmEqauAHuiLU1QZ/d+6Yc0AI1QqQZUJQCPo9+Zyv28Cr6ESsyG/0zQATskhpjIapaBjRls2k6+bx2xF4cOVwfjIuuMbrfilF0HIVxgOuUFqOhkXbxVUBEs3k0ZbSmqtXLTpgLDQtZjlFRgPoymybvpKQTFikjGe2swKOkk7FZyHsXuAsC4T5XFiHg6Ewa6OmHyCp8jQ68tTd2ThAgHQpRtQNx7HllBaZKETZcNVwsQGQSxWPqDWO/QRSoWWAH5J/L/YAInVaK+A6lc0W9B/AUDM+0+wqLcAUsavkCd7n3dZcRb+MftrTDF2o/jNPAWIYbMtEJDVgL4IC1cP1KlkwUi+K3QTW22fnKjO6HK/0Y/MZi6q7I3Mj+Fj1alefluf+/4CC6waE9Lhnc9hXbwFTK0/jBUdMPtt377bduo+TCJFxj3SCwXit3gX++jDTifibmePgx2MhyPUbCDhqRL+vrDmsxI6baa2WZrL9CsEHfCJfufc8Ei98g3VimMhabBPiUhNpLz3lX0l2CakJYjRXR2HyT9VIUI+CAmAXmbGZBDRotuB7dUyW9I6c5mJHuyXOSnWXJLFkMaiAAqI9rfukJbYafaAttg+SRfbEGEP5qjFMirC/uXA== 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)(83380400001)(6666004)(2616005)(4326008)(66556008)(66476007)(186003)(6512007)(38100700002)(44832011)(82960400001)(5660300002)(316002)(2906002)(6486002)(8676002)(55236004)(6506007)(53546011)(86362001)(31696002)(31686004)(36756003)(66946007)(8936002)(26005)(508600001)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?cGs3OG1nRmJjNGQ1anRhOEgzRDcwSEw3R0taei9NNzIzcDhHR3ZheEZzazhM?= =?utf-8?B?cnlrT2ZUQ1BaRkpwNmJTekp4dnZ6aTdxb1I2Z05oYUU1QkdCSVM0aGNuOWl1?= =?utf-8?B?Ymc3cERWNEZBbjFXdGlSVGs4NzVldlUyTFBCWEFDVWNzVjFCTTdDLzBEQ1Bm?= =?utf-8?B?a292UDN3TS83V1REb3h5VHpCVVFrbVlPdjlCZWpIZnM0SktFbkJQZDlxanZq?= =?utf-8?B?Vkc3Ti82cnpqalNlKzJsTHl0S1crOXNLSDhyOFZHV0pzcisvNEd4TXZBK01M?= =?utf-8?B?OW5OZnlGckw1djVsNHhOc2YvV251a1NyaFRsMVlqNmNzRGNZbU5uT3lXVEhw?= =?utf-8?B?SEpoMWNjbnpBb0ZoVHFrOTZUdi84QVlISVA4dDhZWGt6SE1LaCsvQUtUS2Fl?= =?utf-8?B?dTVFLzNNMEx0OUhhSWgzZ0M1S01qSW92MUZuSCtyVmhETDFCaUlDdUltYVNk?= =?utf-8?B?emFGbEhjek9hM3ZmT1NRTVVwUSs0bWZQTnJUZUQ5ZjVSRXQ5eXZiR2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mpSQS9BSUpBSG1KU1grZGYweXlJ?= =?utf-8?B?TlhNSmc5M2kxaWtGcUxpem4wSXN6WXAvbXYvV2ZFS3pMYnBsazU4TjBlZlRs?= =?utf-8?B?eTRQN0h3SlpEdjJ6Z1hhODF5UC9hOEpzZ2ptOE9Cc0tpTzFWbXpCR050MlNT?= =?utf-8?B?NktZdFhLMzFsaVNGOXRCQmt0b2lPYmU1Y0ExZGZSSVdzYTdUdmtiSmJQYlFw?= =?utf-8?B?SUt4aityYndramdVVDhrMXRMYitTWXloYTNNSjArUDN0QXJiSjZJSW9vYTRZ?= =?utf-8?B?cUp2ZkJRZm90TkExTE40NTU5MVNVT2VFNVRyVE8ycGpzYnVUcEZ5UW5wdyth?= =?utf-8?B?cmF6M2F0bUVHKzcvbUxoY1NmWnlocUhiTFY1MUlLV2FHUlg5bGVFbnlPWmVB?= =?utf-8?B?MXJxcFkwbzNWUmpxV0ZacGRvaGZaVkR1T1U4Z3U5UjhWbU50YW9OcFQ5dGRD?= =?utf-8?B?SlVBTjhiYXVPeGVRUGlwWXJ5Y0xkMzRCU0RUTXg3MDFpdnhQYjZQR0VURVJx?= =?utf-8?B?RkwyY2g1QTN0R1JST0dQRERXU1RnTVFkZDF6TXViL1Y5T0V5bTZOdmpHZnB3?= =?utf-8?B?M2NYVnRPZ1Q2QzJIM05ITTNHTjRQdFVWN3dZUms4N3p2MCtBcjd4TkU5eXU1?= =?utf-8?B?ajBFWU5vWGdadTJZRWNHWlYzK3EwZVBlQm94YnIySitYQzRabmdLZjcrMzg4?= =?utf-8?B?d05DQ2hHcmtVSzRmd2JPNnIrQ0VibXp3SjRBNURsNjJYV29HeUE0VWVEWmpl?= =?utf-8?Q?8OLhO/j8bjiRHOV6JJsbLaE=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 8336a225-7e4d-4641-44c0-08d9e58ed1d1 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5000.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Feb 2022 14:26:22.0092 (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: bVpOHWXwoKhfgFv5OTQaxW6zKoax9Wle8V+dsvsrrTepaPzsXibP4uZKe2ellac6gpqubvYGpJ7InfRWlVjQ8g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR11MB5133 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/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);