From: "Sebastian, Selwin" <Selwin.Sebastian@amd.com>
To: Ferruh Yigit <ferruh.yigit@intel.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "Namburu, Chandu-babu" <chandu@amd.com>
Subject: RE: [PATCH v1 1/2] net/axgbe: add support for Yellow Carp ethernet device
Date: Wed, 2 Feb 2022 11:56:29 +0000 [thread overview]
Message-ID: <DM4PR12MB5055BCAE6A99884CD2664ED58D279@DM4PR12MB5055.namprd12.prod.outlook.com> (raw)
In-Reply-To: <71f12431-3aeb-4b2e-ad17-de064dbda5c1@intel.com>
[AMD Official Use Only]
Hi Ferruh,
Linux kernel also handles it the same way using root complex ID (https://lore.kernel.org/netdev/20211217111557.1099919-3-rrangoju@amd.com/T/)
Documentation on v3xxx CPU is not yet available in public domain.
Thanks and Regards
Selwin Sebastian
-----Original Message-----
From: Ferruh Yigit <ferruh.yigit@intel.com>
Sent: Wednesday, February 2, 2022 4:23 PM
To: Sebastian, Selwin <Selwin.Sebastian@amd.com>; dev@dpdk.org
Cc: Namburu, Chandu-babu <chandu@amd.com>
Subject: Re: [PATCH v1 1/2] net/axgbe: add support for Yellow Carp ethernet device
[CAUTION: External Email]
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 <ferruh.yigit@intel.com>
> Sent: Tuesday, February 1, 2022 7:56 PM
> To: Sebastian, Selwin <Selwin.Sebastian@amd.com>; dev@dpdk.org
> Cc: Namburu, Chandu-babu <chandu@amd.com>
> 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 <selwin.sebastian@amd.com>
>>
>> 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 <selwin.sebastian@amd.com>
>> ---
>> 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);
>
next prev parent reply other threads:[~2022-02-02 11:56 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-31 5:39 [PATCH v1 0/2] net/axgbe: Add support for Yellow Carp ethernet ssebasti
2022-01-31 5:39 ` [PATCH v1 1/2] net/axgbe: add support for Yellow Carp ethernet device ssebasti
2022-01-31 6:48 ` Namburu, Chandu-babu
2022-02-03 11:56 ` Ferruh Yigit
2022-02-01 14:26 ` Ferruh Yigit
2022-02-02 8:56 ` Sebastian, Selwin
2022-02-02 10:53 ` Ferruh Yigit
2022-02-02 11:56 ` Sebastian, Selwin [this message]
2022-01-31 5:39 ` [PATCH v1 2/2] net/axgbe: disable the CDR wa for Yellow Carp devices ssebasti
2022-02-01 14:23 ` [PATCH v1 0/2] net/axgbe: Add support for Yellow Carp ethernet Ferruh Yigit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DM4PR12MB5055BCAE6A99884CD2664ED58D279@DM4PR12MB5055.namprd12.prod.outlook.com \
--to=selwin.sebastian@amd.com \
--cc=chandu@amd.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).