* [PATCH v1 0/2] net/axgbe: Add support for Yellow Carp ethernet
@ 2022-01-31 5:39 ssebasti
2022-01-31 5:39 ` [PATCH v1 1/2] net/axgbe: add support for Yellow Carp ethernet device ssebasti
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: ssebasti @ 2022-01-31 5:39 UTC (permalink / raw)
To: dev; +Cc: chandu, ferruh.yigit
From: Selwin Sebastian <selwin.sebastian@amd.com>
Adding support for Yellow Carp ethernet device
Selwin Sebastian (2):
net/axgbe: add support for Yellow Carp ethernet device
net/axgbe: disable the CDR wa for Yellow Carp devices
drivers/net/axgbe/axgbe_common.h | 2 ++
drivers/net/axgbe/axgbe_ethdev.c | 36 ++++++++++++++++++++++----------
2 files changed, 27 insertions(+), 11 deletions(-)
--
2.25.1
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v1 1/2] net/axgbe: add support for Yellow Carp ethernet device
2022-01-31 5:39 [PATCH v1 0/2] net/axgbe: Add support for Yellow Carp ethernet ssebasti
@ 2022-01-31 5:39 ` ssebasti
2022-01-31 6:48 ` Namburu, Chandu-babu
2022-02-01 14:26 ` Ferruh Yigit
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
2 siblings, 2 replies; 10+ messages in thread
From: ssebasti @ 2022-01-31 5:39 UTC (permalink / raw)
To: dev; +Cc: chandu, ferruh.yigit
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
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);
--
2.25.1
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v1 2/2] net/axgbe: disable the CDR wa for Yellow Carp devices
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 5:39 ` ssebasti
2022-02-01 14:23 ` [PATCH v1 0/2] net/axgbe: Add support for Yellow Carp ethernet Ferruh Yigit
2 siblings, 0 replies; 10+ messages in thread
From: ssebasti @ 2022-01-31 5:39 UTC (permalink / raw)
To: dev; +Cc: chandu, ferruh.yigit
From: Selwin Sebastian <selwin.sebastian@amd.com>
Yellow Carp ethernet devices (V3xxx) do not require
autonegotiation CDR workaround, hence disable the same.
Signed-off-by: Selwin Sebastian <selwin.sebastian@amd.com>
---
drivers/net/axgbe/axgbe_ethdev.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/axgbe/axgbe_ethdev.c b/drivers/net/axgbe/axgbe_ethdev.c
index 2be9387f98..951da5cc26 100644
--- a/drivers/net/axgbe/axgbe_ethdev.c
+++ b/drivers/net/axgbe/axgbe_ethdev.c
@@ -2205,6 +2205,8 @@ eth_axgbe_dev_init(struct rte_eth_dev *eth_dev)
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;
+ /* Yellow Carp devices do not need cdr workaround */
+ pdata->vdata->an_cdr_workaround = 0;
break;
case AMD_PCI_SNOWY_ROOT_COMPLEX_ID:
pdata->xpcs_window_def_reg = PCS_V2_WINDOW_DEF;
--
2.25.1
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [PATCH v1 1/2] net/axgbe: add support for Yellow Carp ethernet device
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
1 sibling, 1 reply; 10+ messages in thread
From: Namburu, Chandu-babu @ 2022-01-31 6:48 UTC (permalink / raw)
To: Sebastian, Selwin, dev; +Cc: ferruh.yigit
[Public]
-----Original Message-----
From: Sebastian, Selwin <Selwin.Sebastian@amd.com>
Sent: Monday, January 31, 2022 11:09 AM
To: dev@dpdk.org
Cc: Namburu, Chandu-babu <chandu@amd.com>; ferruh.yigit@intel.com
Subject: [PATCH v1 1/2] net/axgbe: add support for Yellow Carp ethernet device
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 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);
--
2.25.1
For series,
Acked-by: Chandubabu Namburu <chandu@amd.com>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v1 0/2] net/axgbe: Add support for Yellow Carp ethernet
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 5:39 ` [PATCH v1 2/2] net/axgbe: disable the CDR wa for Yellow Carp devices ssebasti
@ 2022-02-01 14:23 ` Ferruh Yigit
2 siblings, 0 replies; 10+ messages in thread
From: Ferruh Yigit @ 2022-02-01 14:23 UTC (permalink / raw)
To: ssebasti, dev; +Cc: chandu
On 1/31/2022 5:39 AM, ssebasti@amd.com wrote:
> From: Selwin Sebastian <selwin.sebastian@amd.com>
>
> Adding support for Yellow Carp ethernet device
>
Hi Selwin,
Since you are referring to this new device (Yellow Carp), can you please
point to some documentation for it, better in the documentation but at
least in the commit log.
And if this device support is important enough, you can add this into the
release notes.
> Selwin Sebastian (2):
> net/axgbe: add support for Yellow Carp ethernet device
> net/axgbe: disable the CDR wa for Yellow Carp devices
>
> drivers/net/axgbe/axgbe_common.h | 2 ++
> drivers/net/axgbe/axgbe_ethdev.c | 36 ++++++++++++++++++++++----------
> 2 files changed, 27 insertions(+), 11 deletions(-)
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v1 1/2] net/axgbe: add support for Yellow Carp ethernet device
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-01 14:26 ` Ferruh Yigit
2022-02-02 8:56 ` Sebastian, Selwin
1 sibling, 1 reply; 10+ messages in thread
From: Ferruh Yigit @ 2022-02-01 14:26 UTC (permalink / raw)
To: ssebasti, dev; +Cc: chandu
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);
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [PATCH v1 1/2] net/axgbe: add support for Yellow Carp ethernet device
2022-02-01 14:26 ` Ferruh Yigit
@ 2022-02-02 8:56 ` Sebastian, Selwin
2022-02-02 10:53 ` Ferruh Yigit
0 siblings, 1 reply; 10+ messages in thread
From: Sebastian, Selwin @ 2022-02-02 8:56 UTC (permalink / raw)
To: Ferruh Yigit, dev; +Cc: Namburu, Chandu-babu
[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.
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);
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v1 1/2] net/axgbe: add support for Yellow Carp ethernet device
2022-02-02 8:56 ` Sebastian, Selwin
@ 2022-02-02 10:53 ` Ferruh Yigit
2022-02-02 11:56 ` Sebastian, Selwin
0 siblings, 1 reply; 10+ messages in thread
From: Ferruh Yigit @ 2022-02-02 10:53 UTC (permalink / raw)
To: Sebastian, Selwin, dev; +Cc: Namburu, Chandu-babu
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);
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [PATCH v1 1/2] net/axgbe: add support for Yellow Carp ethernet device
2022-02-02 10:53 ` Ferruh Yigit
@ 2022-02-02 11:56 ` Sebastian, Selwin
0 siblings, 0 replies; 10+ messages in thread
From: Sebastian, Selwin @ 2022-02-02 11:56 UTC (permalink / raw)
To: Ferruh Yigit, dev; +Cc: Namburu, Chandu-babu
[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);
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v1 1/2] net/axgbe: add support for Yellow Carp ethernet device
2022-01-31 6:48 ` Namburu, Chandu-babu
@ 2022-02-03 11:56 ` Ferruh Yigit
0 siblings, 0 replies; 10+ messages in thread
From: Ferruh Yigit @ 2022-02-03 11:56 UTC (permalink / raw)
To: Namburu, Chandu-babu, Sebastian, Selwin, dev
On 1/31/2022 6:48 AM, Namburu, Chandu-babu wrote:
> [Public]
>
>
>
> -----Original Message-----
> From: Sebastian, Selwin <Selwin.Sebastian@amd.com>
> Sent: Monday, January 31, 2022 11:09 AM
> To: dev@dpdk.org
> Cc: Namburu, Chandu-babu <chandu@amd.com>; ferruh.yigit@intel.com
> Subject: [PATCH v1 1/2] net/axgbe: add support for Yellow Carp ethernet device
>
> 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 altered. Add the check for Yellow Carp Ethernet devices to use the new register values.
>
> Signed-off-by: Selwin Sebastian <selwin.sebastian@amd.com>
<...>
>
> For series,
> Acked-by: Chandubabu Namburu <chandu@amd.com>
Series applied to dpdk-next-net/main, thanks.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2022-02-03 11:56 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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
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).