DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/ixgbe: enable 10Mb/s link setup for x553
@ 2019-03-29  7:31 Wei Zhao
  2019-03-29  7:31 ` Wei Zhao
  2019-03-29  8:15 ` [dpdk-dev] [PATCH v2] " Wei Zhao
  0 siblings, 2 replies; 12+ messages in thread
From: Wei Zhao @ 2019-03-29  7:31 UTC (permalink / raw)
  To: dev; +Cc: stable, qi.z.zhang, Wei Zhao

There is need to eanble 10Mb/s link foixgbe NIC of x553.
This new device has own device id of 0x15E4 and 0x15E5, so
ixgbe PMD driver need to special check when setup link for
these two types of device.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 97e1021..01f3a99 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -2701,6 +2701,9 @@ static int eth_ixgbevf_pci_remove(struct rte_pci_device *pci_dev)
 		allowed_speeds = ETH_LINK_SPEED_100M | ETH_LINK_SPEED_1G |
 			ETH_LINK_SPEED_2_5G |  ETH_LINK_SPEED_5G |
 			ETH_LINK_SPEED_10G;
+		if (hw->device_id == IXGBE_DEV_ID_X550EM_A_1G_T ||
+				hw->device_id == IXGBE_DEV_ID_X550EM_A_1G_T_L)
+			allowed_speeds |= ETH_LINK_SPEED_10M;
 		break;
 	default:
 		allowed_speeds = ETH_LINK_SPEED_100M | ETH_LINK_SPEED_1G |
@@ -2708,6 +2711,7 @@ static int eth_ixgbevf_pci_remove(struct rte_pci_device *pci_dev)
 	}
 
 	link_speeds = &dev->data->dev_conf.link_speeds;
+	*link_speeds = ETH_LINK_SPEED_10M;
 	if (*link_speeds & ~allowed_speeds) {
 		PMD_INIT_LOG(ERR, "Invalid link setting");
 		goto error;
@@ -2742,6 +2746,8 @@ static int eth_ixgbevf_pci_remove(struct rte_pci_device *pci_dev)
 			speed |= IXGBE_LINK_SPEED_1GB_FULL;
 		if (*link_speeds & ETH_LINK_SPEED_100M)
 			speed |= IXGBE_LINK_SPEED_100_FULL;
+		if (*link_speeds & ETH_LINK_SPEED_10M)
+			speed |= IXGBE_LINK_SPEED_10_FULL;
 	}
 
 	err = ixgbe_setup_link(hw, speed, link_up);
@@ -4061,8 +4067,12 @@ static int ixgbevf_dev_xstats_get_names(__rte_unused struct rte_eth_dev *dev,
 	switch (link_speed) {
 	default:
 	case IXGBE_LINK_SPEED_UNKNOWN:
+		if (hw->device_id == IXGBE_DEV_ID_X550EM_A_1G_T ||
+			hw->device_id == IXGBE_DEV_ID_X550EM_A_1G_T_L)
+			link.link_speed = ETH_SPEED_NUM_10M;
+		else
+			link.link_speed = ETH_SPEED_NUM_100M;
 		link.link_duplex = ETH_LINK_FULL_DUPLEX;
-		link.link_speed = ETH_SPEED_NUM_100M;
 		break;
 
 	case IXGBE_LINK_SPEED_100_FULL:
-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [dpdk-dev] [PATCH] net/ixgbe: enable 10Mb/s link setup for x553
  2019-03-29  7:31 [dpdk-dev] [PATCH] net/ixgbe: enable 10Mb/s link setup for x553 Wei Zhao
@ 2019-03-29  7:31 ` Wei Zhao
  2019-03-29  8:15 ` [dpdk-dev] [PATCH v2] " Wei Zhao
  1 sibling, 0 replies; 12+ messages in thread
From: Wei Zhao @ 2019-03-29  7:31 UTC (permalink / raw)
  To: dev; +Cc: stable, qi.z.zhang, Wei Zhao

There is need to eanble 10Mb/s link foixgbe NIC of x553.
This new device has own device id of 0x15E4 and 0x15E5, so
ixgbe PMD driver need to special check when setup link for
these two types of device.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 97e1021..01f3a99 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -2701,6 +2701,9 @@ static int eth_ixgbevf_pci_remove(struct rte_pci_device *pci_dev)
 		allowed_speeds = ETH_LINK_SPEED_100M | ETH_LINK_SPEED_1G |
 			ETH_LINK_SPEED_2_5G |  ETH_LINK_SPEED_5G |
 			ETH_LINK_SPEED_10G;
+		if (hw->device_id == IXGBE_DEV_ID_X550EM_A_1G_T ||
+				hw->device_id == IXGBE_DEV_ID_X550EM_A_1G_T_L)
+			allowed_speeds |= ETH_LINK_SPEED_10M;
 		break;
 	default:
 		allowed_speeds = ETH_LINK_SPEED_100M | ETH_LINK_SPEED_1G |
@@ -2708,6 +2711,7 @@ static int eth_ixgbevf_pci_remove(struct rte_pci_device *pci_dev)
 	}
 
 	link_speeds = &dev->data->dev_conf.link_speeds;
+	*link_speeds = ETH_LINK_SPEED_10M;
 	if (*link_speeds & ~allowed_speeds) {
 		PMD_INIT_LOG(ERR, "Invalid link setting");
 		goto error;
@@ -2742,6 +2746,8 @@ static int eth_ixgbevf_pci_remove(struct rte_pci_device *pci_dev)
 			speed |= IXGBE_LINK_SPEED_1GB_FULL;
 		if (*link_speeds & ETH_LINK_SPEED_100M)
 			speed |= IXGBE_LINK_SPEED_100_FULL;
+		if (*link_speeds & ETH_LINK_SPEED_10M)
+			speed |= IXGBE_LINK_SPEED_10_FULL;
 	}
 
 	err = ixgbe_setup_link(hw, speed, link_up);
@@ -4061,8 +4067,12 @@ static int ixgbevf_dev_xstats_get_names(__rte_unused struct rte_eth_dev *dev,
 	switch (link_speed) {
 	default:
 	case IXGBE_LINK_SPEED_UNKNOWN:
+		if (hw->device_id == IXGBE_DEV_ID_X550EM_A_1G_T ||
+			hw->device_id == IXGBE_DEV_ID_X550EM_A_1G_T_L)
+			link.link_speed = ETH_SPEED_NUM_10M;
+		else
+			link.link_speed = ETH_SPEED_NUM_100M;
 		link.link_duplex = ETH_LINK_FULL_DUPLEX;
-		link.link_speed = ETH_SPEED_NUM_100M;
 		break;
 
 	case IXGBE_LINK_SPEED_100_FULL:
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [dpdk-dev] [PATCH v2] net/ixgbe: enable 10Mb/s link setup for x553
  2019-03-29  7:31 [dpdk-dev] [PATCH] net/ixgbe: enable 10Mb/s link setup for x553 Wei Zhao
  2019-03-29  7:31 ` Wei Zhao
@ 2019-03-29  8:15 ` Wei Zhao
  2019-03-29  8:15   ` Wei Zhao
                     ` (2 more replies)
  1 sibling, 3 replies; 12+ messages in thread
From: Wei Zhao @ 2019-03-29  8:15 UTC (permalink / raw)
  To: dev; +Cc: wenzhuo.lu, stable, qi.z.zhang, Wei Zhao

There is need to eanble 10Mb/s link foixgbe NIC of x553.
This new device has own device id of 0x15E4 and 0x15E5, so
ixgbe PMD driver need to special check when setup link for
these two types of device.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>

---

v2:
delete test code and change permit link speed
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 97e1021..0aef577 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -2701,6 +2701,10 @@ static int eth_ixgbevf_pci_remove(struct rte_pci_device *pci_dev)
 		allowed_speeds = ETH_LINK_SPEED_100M | ETH_LINK_SPEED_1G |
 			ETH_LINK_SPEED_2_5G |  ETH_LINK_SPEED_5G |
 			ETH_LINK_SPEED_10G;
+		if (hw->device_id == IXGBE_DEV_ID_X550EM_A_1G_T ||
+				hw->device_id == IXGBE_DEV_ID_X550EM_A_1G_T_L)
+			allowed_speeds = ETH_LINK_SPEED_10M |
+				ETH_LINK_SPEED_100M | ETH_LINK_SPEED_1G;
 		break;
 	default:
 		allowed_speeds = ETH_LINK_SPEED_100M | ETH_LINK_SPEED_1G |
@@ -2742,6 +2746,8 @@ static int eth_ixgbevf_pci_remove(struct rte_pci_device *pci_dev)
 			speed |= IXGBE_LINK_SPEED_1GB_FULL;
 		if (*link_speeds & ETH_LINK_SPEED_100M)
 			speed |= IXGBE_LINK_SPEED_100_FULL;
+		if (*link_speeds & ETH_LINK_SPEED_10M)
+			speed |= IXGBE_LINK_SPEED_10_FULL;
 	}
 
 	err = ixgbe_setup_link(hw, speed, link_up);
@@ -4061,8 +4067,12 @@ static int ixgbevf_dev_xstats_get_names(__rte_unused struct rte_eth_dev *dev,
 	switch (link_speed) {
 	default:
 	case IXGBE_LINK_SPEED_UNKNOWN:
+		if (hw->device_id == IXGBE_DEV_ID_X550EM_A_1G_T ||
+			hw->device_id == IXGBE_DEV_ID_X550EM_A_1G_T_L)
+			link.link_speed = ETH_SPEED_NUM_10M;
+		else
+			link.link_speed = ETH_SPEED_NUM_100M;
 		link.link_duplex = ETH_LINK_FULL_DUPLEX;
-		link.link_speed = ETH_SPEED_NUM_100M;
 		break;
 
 	case IXGBE_LINK_SPEED_100_FULL:
-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [dpdk-dev] [PATCH v2] net/ixgbe: enable 10Mb/s link setup for x553
  2019-03-29  8:15 ` [dpdk-dev] [PATCH v2] " Wei Zhao
@ 2019-03-29  8:15   ` Wei Zhao
  2019-03-29 18:46   ` Stillwell Jr, Paul M
  2019-04-01  6:25   ` [dpdk-dev] [PATCH v3] " Wei Zhao
  2 siblings, 0 replies; 12+ messages in thread
From: Wei Zhao @ 2019-03-29  8:15 UTC (permalink / raw)
  To: dev; +Cc: wenzhuo.lu, stable, qi.z.zhang, Wei Zhao

There is need to eanble 10Mb/s link foixgbe NIC of x553.
This new device has own device id of 0x15E4 and 0x15E5, so
ixgbe PMD driver need to special check when setup link for
these two types of device.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>

---

v2:
delete test code and change permit link speed
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 97e1021..0aef577 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -2701,6 +2701,10 @@ static int eth_ixgbevf_pci_remove(struct rte_pci_device *pci_dev)
 		allowed_speeds = ETH_LINK_SPEED_100M | ETH_LINK_SPEED_1G |
 			ETH_LINK_SPEED_2_5G |  ETH_LINK_SPEED_5G |
 			ETH_LINK_SPEED_10G;
+		if (hw->device_id == IXGBE_DEV_ID_X550EM_A_1G_T ||
+				hw->device_id == IXGBE_DEV_ID_X550EM_A_1G_T_L)
+			allowed_speeds = ETH_LINK_SPEED_10M |
+				ETH_LINK_SPEED_100M | ETH_LINK_SPEED_1G;
 		break;
 	default:
 		allowed_speeds = ETH_LINK_SPEED_100M | ETH_LINK_SPEED_1G |
@@ -2742,6 +2746,8 @@ static int eth_ixgbevf_pci_remove(struct rte_pci_device *pci_dev)
 			speed |= IXGBE_LINK_SPEED_1GB_FULL;
 		if (*link_speeds & ETH_LINK_SPEED_100M)
 			speed |= IXGBE_LINK_SPEED_100_FULL;
+		if (*link_speeds & ETH_LINK_SPEED_10M)
+			speed |= IXGBE_LINK_SPEED_10_FULL;
 	}
 
 	err = ixgbe_setup_link(hw, speed, link_up);
@@ -4061,8 +4067,12 @@ static int ixgbevf_dev_xstats_get_names(__rte_unused struct rte_eth_dev *dev,
 	switch (link_speed) {
 	default:
 	case IXGBE_LINK_SPEED_UNKNOWN:
+		if (hw->device_id == IXGBE_DEV_ID_X550EM_A_1G_T ||
+			hw->device_id == IXGBE_DEV_ID_X550EM_A_1G_T_L)
+			link.link_speed = ETH_SPEED_NUM_10M;
+		else
+			link.link_speed = ETH_SPEED_NUM_100M;
 		link.link_duplex = ETH_LINK_FULL_DUPLEX;
-		link.link_speed = ETH_SPEED_NUM_100M;
 		break;
 
 	case IXGBE_LINK_SPEED_100_FULL:
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [dpdk-dev] [PATCH v2] net/ixgbe: enable 10Mb/s link setup for x553
  2019-03-29  8:15 ` [dpdk-dev] [PATCH v2] " Wei Zhao
  2019-03-29  8:15   ` Wei Zhao
@ 2019-03-29 18:46   ` Stillwell Jr, Paul M
  2019-03-29 18:46     ` Stillwell Jr, Paul M
  2019-04-01  6:32     ` Zhao1, Wei
  2019-04-01  6:25   ` [dpdk-dev] [PATCH v3] " Wei Zhao
  2 siblings, 2 replies; 12+ messages in thread
From: Stillwell Jr, Paul M @ 2019-03-29 18:46 UTC (permalink / raw)
  To: Zhao1, Wei, dev; +Cc: Lu, Wenzhuo, stable, Zhang, Qi Z, Zhao1, Wei


> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Wei Zhao
> Sent: Friday, March 29, 2019 1:16 AM
> To: dev@dpdk.org
> Cc: Lu, Wenzhuo <wenzhuo.lu@intel.com>; stable@dpdk.org; Zhang, Qi Z
> <qi.z.zhang@intel.com>; Zhao1, Wei <wei.zhao1@intel.com>
> Subject: [dpdk-dev] [PATCH v2] net/ixgbe: enable 10Mb/s link setup for x553
> 
> There is need to eanble 10Mb/s link foixgbe NIC of x553.

Couple of typos, how about:

Enable 10Mb/s link for ixgbe x553.

> This new device has own device id of 0x15E4 and 0x15E5, so ixgbe PMD driver
> need to special check when setup link for these two types of device.
> 
> Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
> 
> ---
> 
> v2:
> delete test code and change permit link speed
> ---
>  drivers/net/ixgbe/ixgbe_ethdev.c | 12 +++++++++++-
>  1 file changed, 11 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c
> b/drivers/net/ixgbe/ixgbe_ethdev.c
> index 97e1021..0aef577 100644
> --- a/drivers/net/ixgbe/ixgbe_ethdev.c
> +++ b/drivers/net/ixgbe/ixgbe_ethdev.c
> @@ -2701,6 +2701,10 @@ static int eth_ixgbevf_pci_remove(struct
> rte_pci_device *pci_dev)
>  		allowed_speeds = ETH_LINK_SPEED_100M |
> ETH_LINK_SPEED_1G |
>  			ETH_LINK_SPEED_2_5G |  ETH_LINK_SPEED_5G |
>  			ETH_LINK_SPEED_10G;
> +		if (hw->device_id == IXGBE_DEV_ID_X550EM_A_1G_T ||
> +				hw->device_id ==
> IXGBE_DEV_ID_X550EM_A_1G_T_L)
> +			allowed_speeds = ETH_LINK_SPEED_10M |
> +				ETH_LINK_SPEED_100M |
> ETH_LINK_SPEED_1G;
>  		break;
>  	default:
>  		allowed_speeds = ETH_LINK_SPEED_100M |
> ETH_LINK_SPEED_1G | @@ -2742,6 +2746,8 @@ static int
> eth_ixgbevf_pci_remove(struct rte_pci_device *pci_dev)
>  			speed |= IXGBE_LINK_SPEED_1GB_FULL;
>  		if (*link_speeds & ETH_LINK_SPEED_100M)
>  			speed |= IXGBE_LINK_SPEED_100_FULL;
> +		if (*link_speeds & ETH_LINK_SPEED_10M)
> +			speed |= IXGBE_LINK_SPEED_10_FULL;
>  	}
> 
>  	err = ixgbe_setup_link(hw, speed, link_up); @@ -4061,8 +4067,12
> @@ static int ixgbevf_dev_xstats_get_names(__rte_unused struct
> rte_eth_dev *dev,
>  	switch (link_speed) {
>  	default:
>  	case IXGBE_LINK_SPEED_UNKNOWN:
> +		if (hw->device_id == IXGBE_DEV_ID_X550EM_A_1G_T ||
> +			hw->device_id ==
> IXGBE_DEV_ID_X550EM_A_1G_T_L)
> +			link.link_speed = ETH_SPEED_NUM_10M;
> +		else
> +			link.link_speed = ETH_SPEED_NUM_100M;
>  		link.link_duplex = ETH_LINK_FULL_DUPLEX;
> -		link.link_speed = ETH_SPEED_NUM_100M;
>  		break;
> 
>  	case IXGBE_LINK_SPEED_100_FULL:
> --
> 1.8.3.1

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [dpdk-dev] [PATCH v2] net/ixgbe: enable 10Mb/s link setup for x553
  2019-03-29 18:46   ` Stillwell Jr, Paul M
@ 2019-03-29 18:46     ` Stillwell Jr, Paul M
  2019-04-01  6:32     ` Zhao1, Wei
  1 sibling, 0 replies; 12+ messages in thread
From: Stillwell Jr, Paul M @ 2019-03-29 18:46 UTC (permalink / raw)
  To: Zhao1, Wei, dev; +Cc: Lu, Wenzhuo, stable, Zhang, Qi Z, Zhao1, Wei


> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Wei Zhao
> Sent: Friday, March 29, 2019 1:16 AM
> To: dev@dpdk.org
> Cc: Lu, Wenzhuo <wenzhuo.lu@intel.com>; stable@dpdk.org; Zhang, Qi Z
> <qi.z.zhang@intel.com>; Zhao1, Wei <wei.zhao1@intel.com>
> Subject: [dpdk-dev] [PATCH v2] net/ixgbe: enable 10Mb/s link setup for x553
> 
> There is need to eanble 10Mb/s link foixgbe NIC of x553.

Couple of typos, how about:

Enable 10Mb/s link for ixgbe x553.

> This new device has own device id of 0x15E4 and 0x15E5, so ixgbe PMD driver
> need to special check when setup link for these two types of device.
> 
> Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
> 
> ---
> 
> v2:
> delete test code and change permit link speed
> ---
>  drivers/net/ixgbe/ixgbe_ethdev.c | 12 +++++++++++-
>  1 file changed, 11 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c
> b/drivers/net/ixgbe/ixgbe_ethdev.c
> index 97e1021..0aef577 100644
> --- a/drivers/net/ixgbe/ixgbe_ethdev.c
> +++ b/drivers/net/ixgbe/ixgbe_ethdev.c
> @@ -2701,6 +2701,10 @@ static int eth_ixgbevf_pci_remove(struct
> rte_pci_device *pci_dev)
>  		allowed_speeds = ETH_LINK_SPEED_100M |
> ETH_LINK_SPEED_1G |
>  			ETH_LINK_SPEED_2_5G |  ETH_LINK_SPEED_5G |
>  			ETH_LINK_SPEED_10G;
> +		if (hw->device_id == IXGBE_DEV_ID_X550EM_A_1G_T ||
> +				hw->device_id ==
> IXGBE_DEV_ID_X550EM_A_1G_T_L)
> +			allowed_speeds = ETH_LINK_SPEED_10M |
> +				ETH_LINK_SPEED_100M |
> ETH_LINK_SPEED_1G;
>  		break;
>  	default:
>  		allowed_speeds = ETH_LINK_SPEED_100M |
> ETH_LINK_SPEED_1G | @@ -2742,6 +2746,8 @@ static int
> eth_ixgbevf_pci_remove(struct rte_pci_device *pci_dev)
>  			speed |= IXGBE_LINK_SPEED_1GB_FULL;
>  		if (*link_speeds & ETH_LINK_SPEED_100M)
>  			speed |= IXGBE_LINK_SPEED_100_FULL;
> +		if (*link_speeds & ETH_LINK_SPEED_10M)
> +			speed |= IXGBE_LINK_SPEED_10_FULL;
>  	}
> 
>  	err = ixgbe_setup_link(hw, speed, link_up); @@ -4061,8 +4067,12
> @@ static int ixgbevf_dev_xstats_get_names(__rte_unused struct
> rte_eth_dev *dev,
>  	switch (link_speed) {
>  	default:
>  	case IXGBE_LINK_SPEED_UNKNOWN:
> +		if (hw->device_id == IXGBE_DEV_ID_X550EM_A_1G_T ||
> +			hw->device_id ==
> IXGBE_DEV_ID_X550EM_A_1G_T_L)
> +			link.link_speed = ETH_SPEED_NUM_10M;
> +		else
> +			link.link_speed = ETH_SPEED_NUM_100M;
>  		link.link_duplex = ETH_LINK_FULL_DUPLEX;
> -		link.link_speed = ETH_SPEED_NUM_100M;
>  		break;
> 
>  	case IXGBE_LINK_SPEED_100_FULL:
> --
> 1.8.3.1


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [dpdk-dev] [PATCH v3] net/ixgbe: enable 10Mb/s link setup for x553
  2019-03-29  8:15 ` [dpdk-dev] [PATCH v2] " Wei Zhao
  2019-03-29  8:15   ` Wei Zhao
  2019-03-29 18:46   ` Stillwell Jr, Paul M
@ 2019-04-01  6:25   ` Wei Zhao
  2019-04-01  6:25     ` Wei Zhao
  2019-04-05  7:23     ` Zhang, Qi Z
  2 siblings, 2 replies; 12+ messages in thread
From: Wei Zhao @ 2019-04-01  6:25 UTC (permalink / raw)
  To: dev; +Cc: stable, qi.z.zhang, wenzhuo.lu, paul.m.stillwell.jr, Wei Zhao

This patch enable 10Mb/s link for ixgbe x553.
This new device has own device id of 0x15E4 and 0x15E5, so
ixgbe PMD driver need to special check when setup link for
these two types of device.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>

---

v2:
delete test code and change permit link speed

V3:
update git log info
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 97e1021..0aef577 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -2701,6 +2701,10 @@ static int eth_ixgbevf_pci_remove(struct rte_pci_device *pci_dev)
 		allowed_speeds = ETH_LINK_SPEED_100M | ETH_LINK_SPEED_1G |
 			ETH_LINK_SPEED_2_5G |  ETH_LINK_SPEED_5G |
 			ETH_LINK_SPEED_10G;
+		if (hw->device_id == IXGBE_DEV_ID_X550EM_A_1G_T ||
+				hw->device_id == IXGBE_DEV_ID_X550EM_A_1G_T_L)
+			allowed_speeds = ETH_LINK_SPEED_10M |
+				ETH_LINK_SPEED_100M | ETH_LINK_SPEED_1G;
 		break;
 	default:
 		allowed_speeds = ETH_LINK_SPEED_100M | ETH_LINK_SPEED_1G |
@@ -2742,6 +2746,8 @@ static int eth_ixgbevf_pci_remove(struct rte_pci_device *pci_dev)
 			speed |= IXGBE_LINK_SPEED_1GB_FULL;
 		if (*link_speeds & ETH_LINK_SPEED_100M)
 			speed |= IXGBE_LINK_SPEED_100_FULL;
+		if (*link_speeds & ETH_LINK_SPEED_10M)
+			speed |= IXGBE_LINK_SPEED_10_FULL;
 	}
 
 	err = ixgbe_setup_link(hw, speed, link_up);
@@ -4061,8 +4067,12 @@ static int ixgbevf_dev_xstats_get_names(__rte_unused struct rte_eth_dev *dev,
 	switch (link_speed) {
 	default:
 	case IXGBE_LINK_SPEED_UNKNOWN:
+		if (hw->device_id == IXGBE_DEV_ID_X550EM_A_1G_T ||
+			hw->device_id == IXGBE_DEV_ID_X550EM_A_1G_T_L)
+			link.link_speed = ETH_SPEED_NUM_10M;
+		else
+			link.link_speed = ETH_SPEED_NUM_100M;
 		link.link_duplex = ETH_LINK_FULL_DUPLEX;
-		link.link_speed = ETH_SPEED_NUM_100M;
 		break;
 
 	case IXGBE_LINK_SPEED_100_FULL:
-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [dpdk-dev] [PATCH v3] net/ixgbe: enable 10Mb/s link setup for x553
  2019-04-01  6:25   ` [dpdk-dev] [PATCH v3] " Wei Zhao
@ 2019-04-01  6:25     ` Wei Zhao
  2019-04-05  7:23     ` Zhang, Qi Z
  1 sibling, 0 replies; 12+ messages in thread
From: Wei Zhao @ 2019-04-01  6:25 UTC (permalink / raw)
  To: dev; +Cc: stable, qi.z.zhang, wenzhuo.lu, paul.m.stillwell.jr, Wei Zhao

This patch enable 10Mb/s link for ixgbe x553.
This new device has own device id of 0x15E4 and 0x15E5, so
ixgbe PMD driver need to special check when setup link for
these two types of device.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>

---

v2:
delete test code and change permit link speed

V3:
update git log info
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 97e1021..0aef577 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -2701,6 +2701,10 @@ static int eth_ixgbevf_pci_remove(struct rte_pci_device *pci_dev)
 		allowed_speeds = ETH_LINK_SPEED_100M | ETH_LINK_SPEED_1G |
 			ETH_LINK_SPEED_2_5G |  ETH_LINK_SPEED_5G |
 			ETH_LINK_SPEED_10G;
+		if (hw->device_id == IXGBE_DEV_ID_X550EM_A_1G_T ||
+				hw->device_id == IXGBE_DEV_ID_X550EM_A_1G_T_L)
+			allowed_speeds = ETH_LINK_SPEED_10M |
+				ETH_LINK_SPEED_100M | ETH_LINK_SPEED_1G;
 		break;
 	default:
 		allowed_speeds = ETH_LINK_SPEED_100M | ETH_LINK_SPEED_1G |
@@ -2742,6 +2746,8 @@ static int eth_ixgbevf_pci_remove(struct rte_pci_device *pci_dev)
 			speed |= IXGBE_LINK_SPEED_1GB_FULL;
 		if (*link_speeds & ETH_LINK_SPEED_100M)
 			speed |= IXGBE_LINK_SPEED_100_FULL;
+		if (*link_speeds & ETH_LINK_SPEED_10M)
+			speed |= IXGBE_LINK_SPEED_10_FULL;
 	}
 
 	err = ixgbe_setup_link(hw, speed, link_up);
@@ -4061,8 +4067,12 @@ static int ixgbevf_dev_xstats_get_names(__rte_unused struct rte_eth_dev *dev,
 	switch (link_speed) {
 	default:
 	case IXGBE_LINK_SPEED_UNKNOWN:
+		if (hw->device_id == IXGBE_DEV_ID_X550EM_A_1G_T ||
+			hw->device_id == IXGBE_DEV_ID_X550EM_A_1G_T_L)
+			link.link_speed = ETH_SPEED_NUM_10M;
+		else
+			link.link_speed = ETH_SPEED_NUM_100M;
 		link.link_duplex = ETH_LINK_FULL_DUPLEX;
-		link.link_speed = ETH_SPEED_NUM_100M;
 		break;
 
 	case IXGBE_LINK_SPEED_100_FULL:
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [dpdk-dev] [PATCH v2] net/ixgbe: enable 10Mb/s link setup for x553
  2019-03-29 18:46   ` Stillwell Jr, Paul M
  2019-03-29 18:46     ` Stillwell Jr, Paul M
@ 2019-04-01  6:32     ` Zhao1, Wei
  2019-04-01  6:32       ` Zhao1, Wei
  1 sibling, 1 reply; 12+ messages in thread
From: Zhao1, Wei @ 2019-04-01  6:32 UTC (permalink / raw)
  To: Stillwell Jr, Paul M, dev; +Cc: Lu, Wenzhuo, stable, Zhang, Qi Z



> -----Original Message-----
> From: Stillwell Jr, Paul M
> Sent: Saturday, March 30, 2019 2:47 AM
> To: Zhao1, Wei <wei.zhao1@intel.com>; dev@dpdk.org
> Cc: Lu, Wenzhuo <wenzhuo.lu@intel.com>; stable@dpdk.org; Zhang, Qi Z
> <qi.z.zhang@intel.com>; Zhao1, Wei <wei.zhao1@intel.com>
> Subject: RE: [dpdk-dev] [PATCH v2] net/ixgbe: enable 10Mb/s link setup for
> x553
> 
> 
> > -----Original Message-----
> > From: dev <dev-bounces@dpdk.org> On Behalf Of Wei Zhao
> > Sent: Friday, March 29, 2019 1:16 AM
> > To: dev@dpdk.org
> > Cc: Lu, Wenzhuo <wenzhuo.lu@intel.com>; stable@dpdk.org; Zhang, Qi Z
> > <qi.z.zhang@intel.com>; Zhao1, Wei <wei.zhao1@intel.com>
> > Subject: [dpdk-dev] [PATCH v2] net/ixgbe: enable 10Mb/s link setup for
> > x553
> >
> > There is need to eanble 10Mb/s link foixgbe NIC of x553.
> 
> Couple of typos, how about:
> 
> Enable 10Mb/s link for ixgbe x553.


Good,  update in v2

> 
> > This new device has own device id of 0x15E4 and 0x15E5, so ixgbe PMD
> > driver need to special check when setup link for these two types of device.
> >
> > Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
> >
> > ---
> >
> > v2:
> > delete test code and change permit link speed
> > ---
> >  drivers/net/ixgbe/ixgbe_ethdev.c | 12 +++++++++++-
> >  1 file changed, 11 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c
> > b/drivers/net/ixgbe/ixgbe_ethdev.c
> > index 97e1021..0aef577 100644
> > --- a/drivers/net/ixgbe/ixgbe_ethdev.c
> > +++ b/drivers/net/ixgbe/ixgbe_ethdev.c
> > @@ -2701,6 +2701,10 @@ static int eth_ixgbevf_pci_remove(struct
> > rte_pci_device *pci_dev)
> >  		allowed_speeds = ETH_LINK_SPEED_100M |
> ETH_LINK_SPEED_1G |
> >  			ETH_LINK_SPEED_2_5G |  ETH_LINK_SPEED_5G |
> >  			ETH_LINK_SPEED_10G;
> > +		if (hw->device_id == IXGBE_DEV_ID_X550EM_A_1G_T ||
> > +				hw->device_id ==
> > IXGBE_DEV_ID_X550EM_A_1G_T_L)
> > +			allowed_speeds = ETH_LINK_SPEED_10M |
> > +				ETH_LINK_SPEED_100M |
> > ETH_LINK_SPEED_1G;
> >  		break;
> >  	default:
> >  		allowed_speeds = ETH_LINK_SPEED_100M |
> ETH_LINK_SPEED_1G | @@
> > -2742,6 +2746,8 @@ static int eth_ixgbevf_pci_remove(struct
> > rte_pci_device *pci_dev)
> >  			speed |= IXGBE_LINK_SPEED_1GB_FULL;
> >  		if (*link_speeds & ETH_LINK_SPEED_100M)
> >  			speed |= IXGBE_LINK_SPEED_100_FULL;
> > +		if (*link_speeds & ETH_LINK_SPEED_10M)
> > +			speed |= IXGBE_LINK_SPEED_10_FULL;
> >  	}
> >
> >  	err = ixgbe_setup_link(hw, speed, link_up); @@ -4061,8 +4067,12
> @@
> > static int ixgbevf_dev_xstats_get_names(__rte_unused struct
> > rte_eth_dev *dev,
> >  	switch (link_speed) {
> >  	default:
> >  	case IXGBE_LINK_SPEED_UNKNOWN:
> > +		if (hw->device_id == IXGBE_DEV_ID_X550EM_A_1G_T ||
> > +			hw->device_id ==
> > IXGBE_DEV_ID_X550EM_A_1G_T_L)
> > +			link.link_speed = ETH_SPEED_NUM_10M;
> > +		else
> > +			link.link_speed = ETH_SPEED_NUM_100M;
> >  		link.link_duplex = ETH_LINK_FULL_DUPLEX;
> > -		link.link_speed = ETH_SPEED_NUM_100M;
> >  		break;
> >
> >  	case IXGBE_LINK_SPEED_100_FULL:
> > --
> > 1.8.3.1

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [dpdk-dev] [PATCH v2] net/ixgbe: enable 10Mb/s link setup for x553
  2019-04-01  6:32     ` Zhao1, Wei
@ 2019-04-01  6:32       ` Zhao1, Wei
  0 siblings, 0 replies; 12+ messages in thread
From: Zhao1, Wei @ 2019-04-01  6:32 UTC (permalink / raw)
  To: Stillwell Jr, Paul M, dev; +Cc: Lu, Wenzhuo, stable, Zhang, Qi Z



> -----Original Message-----
> From: Stillwell Jr, Paul M
> Sent: Saturday, March 30, 2019 2:47 AM
> To: Zhao1, Wei <wei.zhao1@intel.com>; dev@dpdk.org
> Cc: Lu, Wenzhuo <wenzhuo.lu@intel.com>; stable@dpdk.org; Zhang, Qi Z
> <qi.z.zhang@intel.com>; Zhao1, Wei <wei.zhao1@intel.com>
> Subject: RE: [dpdk-dev] [PATCH v2] net/ixgbe: enable 10Mb/s link setup for
> x553
> 
> 
> > -----Original Message-----
> > From: dev <dev-bounces@dpdk.org> On Behalf Of Wei Zhao
> > Sent: Friday, March 29, 2019 1:16 AM
> > To: dev@dpdk.org
> > Cc: Lu, Wenzhuo <wenzhuo.lu@intel.com>; stable@dpdk.org; Zhang, Qi Z
> > <qi.z.zhang@intel.com>; Zhao1, Wei <wei.zhao1@intel.com>
> > Subject: [dpdk-dev] [PATCH v2] net/ixgbe: enable 10Mb/s link setup for
> > x553
> >
> > There is need to eanble 10Mb/s link foixgbe NIC of x553.
> 
> Couple of typos, how about:
> 
> Enable 10Mb/s link for ixgbe x553.


Good,  update in v2

> 
> > This new device has own device id of 0x15E4 and 0x15E5, so ixgbe PMD
> > driver need to special check when setup link for these two types of device.
> >
> > Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
> >
> > ---
> >
> > v2:
> > delete test code and change permit link speed
> > ---
> >  drivers/net/ixgbe/ixgbe_ethdev.c | 12 +++++++++++-
> >  1 file changed, 11 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c
> > b/drivers/net/ixgbe/ixgbe_ethdev.c
> > index 97e1021..0aef577 100644
> > --- a/drivers/net/ixgbe/ixgbe_ethdev.c
> > +++ b/drivers/net/ixgbe/ixgbe_ethdev.c
> > @@ -2701,6 +2701,10 @@ static int eth_ixgbevf_pci_remove(struct
> > rte_pci_device *pci_dev)
> >  		allowed_speeds = ETH_LINK_SPEED_100M |
> ETH_LINK_SPEED_1G |
> >  			ETH_LINK_SPEED_2_5G |  ETH_LINK_SPEED_5G |
> >  			ETH_LINK_SPEED_10G;
> > +		if (hw->device_id == IXGBE_DEV_ID_X550EM_A_1G_T ||
> > +				hw->device_id ==
> > IXGBE_DEV_ID_X550EM_A_1G_T_L)
> > +			allowed_speeds = ETH_LINK_SPEED_10M |
> > +				ETH_LINK_SPEED_100M |
> > ETH_LINK_SPEED_1G;
> >  		break;
> >  	default:
> >  		allowed_speeds = ETH_LINK_SPEED_100M |
> ETH_LINK_SPEED_1G | @@
> > -2742,6 +2746,8 @@ static int eth_ixgbevf_pci_remove(struct
> > rte_pci_device *pci_dev)
> >  			speed |= IXGBE_LINK_SPEED_1GB_FULL;
> >  		if (*link_speeds & ETH_LINK_SPEED_100M)
> >  			speed |= IXGBE_LINK_SPEED_100_FULL;
> > +		if (*link_speeds & ETH_LINK_SPEED_10M)
> > +			speed |= IXGBE_LINK_SPEED_10_FULL;
> >  	}
> >
> >  	err = ixgbe_setup_link(hw, speed, link_up); @@ -4061,8 +4067,12
> @@
> > static int ixgbevf_dev_xstats_get_names(__rte_unused struct
> > rte_eth_dev *dev,
> >  	switch (link_speed) {
> >  	default:
> >  	case IXGBE_LINK_SPEED_UNKNOWN:
> > +		if (hw->device_id == IXGBE_DEV_ID_X550EM_A_1G_T ||
> > +			hw->device_id ==
> > IXGBE_DEV_ID_X550EM_A_1G_T_L)
> > +			link.link_speed = ETH_SPEED_NUM_10M;
> > +		else
> > +			link.link_speed = ETH_SPEED_NUM_100M;
> >  		link.link_duplex = ETH_LINK_FULL_DUPLEX;
> > -		link.link_speed = ETH_SPEED_NUM_100M;
> >  		break;
> >
> >  	case IXGBE_LINK_SPEED_100_FULL:
> > --
> > 1.8.3.1


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [dpdk-dev] [PATCH v3] net/ixgbe: enable 10Mb/s link setup for x553
  2019-04-01  6:25   ` [dpdk-dev] [PATCH v3] " Wei Zhao
  2019-04-01  6:25     ` Wei Zhao
@ 2019-04-05  7:23     ` Zhang, Qi Z
  2019-04-05  7:23       ` Zhang, Qi Z
  1 sibling, 1 reply; 12+ messages in thread
From: Zhang, Qi Z @ 2019-04-05  7:23 UTC (permalink / raw)
  To: Zhao1, Wei, dev; +Cc: stable, Lu, Wenzhuo, Stillwell Jr, Paul M



> -----Original Message-----
> From: Zhao1, Wei
> Sent: Monday, April 1, 2019 2:25 PM
> To: dev@dpdk.org
> Cc: stable@dpdk.org; Zhang, Qi Z <qi.z.zhang@intel.com>; Lu, Wenzhuo
> <wenzhuo.lu@intel.com>; Stillwell Jr, Paul M <paul.m.stillwell.jr@intel.com>;
> Zhao1, Wei <wei.zhao1@intel.com>
> Subject: [PATCH v3] net/ixgbe: enable 10Mb/s link setup for x553
> 
> This patch enable 10Mb/s link for ixgbe x553.
> This new device has own device id of 0x15E4 and 0x15E5, so ixgbe PMD driver
> need to special check when setup link for these two types of device.
> 
> Signed-off-by: Wei Zhao <wei.zhao1@intel.com>

Acked-by: Qi Zhang <qi.z.zhang@intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [dpdk-dev] [PATCH v3] net/ixgbe: enable 10Mb/s link setup for x553
  2019-04-05  7:23     ` Zhang, Qi Z
@ 2019-04-05  7:23       ` Zhang, Qi Z
  0 siblings, 0 replies; 12+ messages in thread
From: Zhang, Qi Z @ 2019-04-05  7:23 UTC (permalink / raw)
  To: Zhao1, Wei, dev; +Cc: stable, Lu, Wenzhuo, Stillwell Jr, Paul M



> -----Original Message-----
> From: Zhao1, Wei
> Sent: Monday, April 1, 2019 2:25 PM
> To: dev@dpdk.org
> Cc: stable@dpdk.org; Zhang, Qi Z <qi.z.zhang@intel.com>; Lu, Wenzhuo
> <wenzhuo.lu@intel.com>; Stillwell Jr, Paul M <paul.m.stillwell.jr@intel.com>;
> Zhao1, Wei <wei.zhao1@intel.com>
> Subject: [PATCH v3] net/ixgbe: enable 10Mb/s link setup for x553
> 
> This patch enable 10Mb/s link for ixgbe x553.
> This new device has own device id of 0x15E4 and 0x15E5, so ixgbe PMD driver
> need to special check when setup link for these two types of device.
> 
> Signed-off-by: Wei Zhao <wei.zhao1@intel.com>

Acked-by: Qi Zhang <qi.z.zhang@intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2019-04-05  7:23 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-29  7:31 [dpdk-dev] [PATCH] net/ixgbe: enable 10Mb/s link setup for x553 Wei Zhao
2019-03-29  7:31 ` Wei Zhao
2019-03-29  8:15 ` [dpdk-dev] [PATCH v2] " Wei Zhao
2019-03-29  8:15   ` Wei Zhao
2019-03-29 18:46   ` Stillwell Jr, Paul M
2019-03-29 18:46     ` Stillwell Jr, Paul M
2019-04-01  6:32     ` Zhao1, Wei
2019-04-01  6:32       ` Zhao1, Wei
2019-04-01  6:25   ` [dpdk-dev] [PATCH v3] " Wei Zhao
2019-04-01  6:25     ` Wei Zhao
2019-04-05  7:23     ` Zhang, Qi Z
2019-04-05  7:23       ` Zhang, Qi Z

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).