DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] ethdev: add link speed 400G
@ 2023-02-16 10:43 Thomas Monjalon
  2023-02-16 10:49 ` Morten Brørup
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Thomas Monjalon @ 2023-02-16 10:43 UTC (permalink / raw)
  To: dev
  Cc: Bruce Richardson, Jerin Jacob, Ajit Khaparde, Raslan Darawsheh,
	David Marchand, Aman Singh, Yuying Zhang, Ferruh Yigit,
	Andrew Rybchenko, Maxime Coquelin, Chenbo Xia

There are some devices supporting 400G speed,
and it is well standardized in IEEE.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 app/test-pmd/cmdline.c             | 2 ++
 app/test-pmd/config.c              | 2 ++
 app/test-pmd/parameters.c          | 3 +++
 app/test/test_ethdev_link.c        | 3 ++-
 drivers/net/virtio/virtio_ethdev.c | 2 ++
 lib/ethdev/rte_ethdev.c            | 6 ++++++
 lib/ethdev/rte_ethdev.h            | 2 ++
 7 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index bb7ff2b449..e312aa93d6 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -1352,6 +1352,8 @@ parse_and_check_speed_duplex(char *speedstr, char *duplexstr, uint32_t *speed)
 			*speed = RTE_ETH_LINK_SPEED_100G;
 		} else if (!strcmp(speedstr, "200000")) {
 			*speed = RTE_ETH_LINK_SPEED_200G;
+		} else if (!strcmp(speedstr, "400000")) {
+			*speed = RTE_ETH_LINK_SPEED_400G;
 		} else if (!strcmp(speedstr, "auto")) {
 			*speed = RTE_ETH_LINK_SPEED_AUTONEG;
 		} else {
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 41484c3dde..8f162645ec 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -612,6 +612,8 @@ device_infos_display_speeds(uint32_t speed_capa)
 		printf(" 100 Gbps  ");
 	if (speed_capa & RTE_ETH_LINK_SPEED_200G)
 		printf(" 200 Gbps  ");
+	if (speed_capa & RTE_ETH_LINK_SPEED_400G)
+		printf(" 400 Gbps  ");
 }
 
 void
diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index e734ad9a02..3b37809baf 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -568,6 +568,9 @@ parse_link_speed(int n)
 	case 200000:
 		speed |= RTE_ETH_LINK_SPEED_200G;
 		break;
+	case 400000:
+		speed |= RTE_ETH_LINK_SPEED_400G;
+		break;
 	case 100:
 	case 10:
 	default:
diff --git a/app/test/test_ethdev_link.c b/app/test/test_ethdev_link.c
index 6248aea49a..ab52385a12 100644
--- a/app/test/test_ethdev_link.c
+++ b/app/test/test_ethdev_link.c
@@ -54,7 +54,7 @@ test_link_status_up_default(void)
 		"string with HDX");
 
 	/* test max str len */
-	link_status.link_speed = RTE_ETH_SPEED_NUM_200G;
+	link_status.link_speed = RTE_ETH_SPEED_NUM_400G;
 	link_status.link_duplex = RTE_ETH_LINK_HALF_DUPLEX;
 	link_status.link_autoneg = RTE_ETH_LINK_AUTONEG;
 	ret = rte_eth_link_to_str(text, sizeof(text), &link_status);
@@ -130,6 +130,7 @@ test_link_speed_all_values(void)
 		{ "56 Gbps",  RTE_ETH_SPEED_NUM_56G },
 		{ "100 Gbps", RTE_ETH_SPEED_NUM_100G },
 		{ "200 Gbps", RTE_ETH_SPEED_NUM_200G },
+		{ "400 Gbps", RTE_ETH_SPEED_NUM_400G },
 		{ "Unknown",  RTE_ETH_SPEED_NUM_UNKNOWN },
 		{ "Invalid",   50505 }
 	};
diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index 0103d95920..dc6856d749 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -2046,6 +2046,8 @@ virtio_dev_speed_capa_get(uint32_t speed)
 		return RTE_ETH_LINK_SPEED_100G;
 	case RTE_ETH_SPEED_NUM_200G:
 		return RTE_ETH_LINK_SPEED_200G;
+	case RTE_ETH_SPEED_NUM_400G:
+		return RTE_ETH_LINK_SPEED_400G;
 	default:
 		return 0;
 	}
diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c
index 055c46082b..27c0ecbf7d 100644
--- a/lib/ethdev/rte_ethdev.c
+++ b/lib/ethdev/rte_ethdev.c
@@ -978,6 +978,9 @@ rte_eth_speed_bitflag(uint32_t speed, int duplex)
 	case RTE_ETH_SPEED_NUM_200G:
 		ret = RTE_ETH_LINK_SPEED_200G;
 		break;
+	case RTE_ETH_SPEED_NUM_400G:
+		ret = RTE_ETH_LINK_SPEED_400G;
+		break;
 	default:
 		ret = 0;
 	}
@@ -2882,6 +2885,9 @@ rte_eth_link_speed_to_str(uint32_t link_speed)
 	case RTE_ETH_SPEED_NUM_200G:
 		ret = "200 Gbps";
 		break;
+	case RTE_ETH_SPEED_NUM_400G:
+		ret = "400 Gbps";
+		break;
 	case RTE_ETH_SPEED_NUM_UNKNOWN:
 		ret = "Unknown";
 		break;
diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h
index c129ca1eaf..89b25c9a0f 100644
--- a/lib/ethdev/rte_ethdev.h
+++ b/lib/ethdev/rte_ethdev.h
@@ -304,6 +304,7 @@ struct rte_eth_stats {
 #define RTE_ETH_LINK_SPEED_56G     RTE_BIT32(13) /**<  56 Gbps */
 #define RTE_ETH_LINK_SPEED_100G    RTE_BIT32(14) /**< 100 Gbps */
 #define RTE_ETH_LINK_SPEED_200G    RTE_BIT32(15) /**< 200 Gbps */
+#define RTE_ETH_LINK_SPEED_400G    RTE_BIT32(16) /**< 400 Gbps */
 /**@}*/
 
 /**@{@name Link speed
@@ -323,6 +324,7 @@ struct rte_eth_stats {
 #define RTE_ETH_SPEED_NUM_56G      56000 /**<  56 Gbps */
 #define RTE_ETH_SPEED_NUM_100G    100000 /**< 100 Gbps */
 #define RTE_ETH_SPEED_NUM_200G    200000 /**< 200 Gbps */
+#define RTE_ETH_SPEED_NUM_400G    400000 /**< 400 Gbps */
 #define RTE_ETH_SPEED_NUM_UNKNOWN UINT32_MAX /**< Unknown */
 /**@}*/
 
-- 
2.39.1


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

* RE: [PATCH] ethdev: add link speed 400G
  2023-02-16 10:43 [PATCH] ethdev: add link speed 400G Thomas Monjalon
@ 2023-02-16 10:49 ` Morten Brørup
  2023-02-16 11:23 ` Andrew Rybchenko
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 9+ messages in thread
From: Morten Brørup @ 2023-02-16 10:49 UTC (permalink / raw)
  To: Thomas Monjalon, dev

> From: Thomas Monjalon [mailto:thomas@monjalon.net]
> Sent: Thursday, 16 February 2023 11.44
> 
> There are some devices supporting 400G speed,
> and it is well standardized in IEEE.
> 
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> ---

Plain and simple, easy to...

Reviewed-by: Morten Brørup <mb@smartsharesystems.com>


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

* Re: [PATCH] ethdev: add link speed 400G
  2023-02-16 10:43 [PATCH] ethdev: add link speed 400G Thomas Monjalon
  2023-02-16 10:49 ` Morten Brørup
@ 2023-02-16 11:23 ` Andrew Rybchenko
  2023-02-16 11:27 ` fengchengwen
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 9+ messages in thread
From: Andrew Rybchenko @ 2023-02-16 11:23 UTC (permalink / raw)
  To: Thomas Monjalon, dev
  Cc: Bruce Richardson, Jerin Jacob, Ajit Khaparde, Raslan Darawsheh,
	David Marchand, Aman Singh, Yuying Zhang, Ferruh Yigit,
	Maxime Coquelin, Chenbo Xia

On 2/16/23 13:43, Thomas Monjalon wrote:
> There are some devices supporting 400G speed,
> and it is well standardized in IEEE.
> 
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>

Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>



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

* Re: [PATCH] ethdev: add link speed 400G
  2023-02-16 10:43 [PATCH] ethdev: add link speed 400G Thomas Monjalon
  2023-02-16 10:49 ` Morten Brørup
  2023-02-16 11:23 ` Andrew Rybchenko
@ 2023-02-16 11:27 ` fengchengwen
  2023-02-16 12:30 ` Ferruh Yigit
  2023-03-01 11:16 ` [PATCH v2] " Thomas Monjalon
  4 siblings, 0 replies; 9+ messages in thread
From: fengchengwen @ 2023-02-16 11:27 UTC (permalink / raw)
  To: Thomas Monjalon, dev
  Cc: Bruce Richardson, Jerin Jacob, Ajit Khaparde, Raslan Darawsheh,
	David Marchand, Aman Singh, Yuying Zhang, Ferruh Yigit,
	Andrew Rybchenko, Maxime Coquelin, Chenbo Xia

Hi Thomas,

  Higher rates are generally implemented with multiple lanes. The lane configuration is
critical to link negotiation success. The number of lanes configured using the ethtool
is provided [1].

 Currently, the community uses only one u32 bit (link_speed) to indicate a rate, which
is not enough.

 It is recommended that the rate be extended to support the configuration of the number
of lanes. Our team plan to develop it target 23.07 version (have not yet been designed).
Maybe other team already developping it (if have please let me know so that we can reduce
invest).

 Beside, as for this patch, I think we could upstream first.


[1] https://lore.kernel.org/netdev/20201010154119.3537085-1-idosch@idosch.org/T/


On 2023/2/16 18:43, Thomas Monjalon wrote:
> There are some devices supporting 400G speed,
> and it is well standardized in IEEE.
> 
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>

Acked-by: Chengwen Feng <fengchengwen@huawei.com>



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

* Re: [PATCH] ethdev: add link speed 400G
  2023-02-16 10:43 [PATCH] ethdev: add link speed 400G Thomas Monjalon
                   ` (2 preceding siblings ...)
  2023-02-16 11:27 ` fengchengwen
@ 2023-02-16 12:30 ` Ferruh Yigit
  2023-02-16 23:56   ` Thomas Monjalon
  2023-03-01 11:16 ` [PATCH v2] " Thomas Monjalon
  4 siblings, 1 reply; 9+ messages in thread
From: Ferruh Yigit @ 2023-02-16 12:30 UTC (permalink / raw)
  To: Thomas Monjalon, dev
  Cc: Bruce Richardson, Jerin Jacob, Ajit Khaparde, Raslan Darawsheh,
	David Marchand, Aman Singh, Yuying Zhang, Andrew Rybchenko,
	Maxime Coquelin, Chenbo Xia

On 2/16/2023 10:43 AM, Thomas Monjalon wrote:
> There are some devices supporting 400G speed,
> and it is well standardized in IEEE.
> 
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> ---
>  app/test-pmd/cmdline.c             | 2 ++
>  app/test-pmd/config.c              | 2 ++
>  app/test-pmd/parameters.c          | 3 +++
>  app/test/test_ethdev_link.c        | 3 ++-
>  drivers/net/virtio/virtio_ethdev.c | 2 ++
>  lib/ethdev/rte_ethdev.c            | 6 ++++++
>  lib/ethdev/rte_ethdev.h            | 2 ++
>  7 files changed, 19 insertions(+), 1 deletion(-)

It looks like some testpmd help strings and documentation missed, please
check previous commit as reference:
Commit f6eb39384933 ("ethdev: add 200G link speed")


Also last time release notes also updated for new speed, what about
doing same?

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

* Re: [PATCH] ethdev: add link speed 400G
  2023-02-16 12:30 ` Ferruh Yigit
@ 2023-02-16 23:56   ` Thomas Monjalon
  0 siblings, 0 replies; 9+ messages in thread
From: Thomas Monjalon @ 2023-02-16 23:56 UTC (permalink / raw)
  To: dev, Ferruh Yigit
  Cc: Bruce Richardson, Jerin Jacob, Ajit Khaparde, Raslan Darawsheh,
	David Marchand, Aman Singh, Yuying Zhang, Andrew Rybchenko,
	Maxime Coquelin, Chenbo Xia

16/02/2023 13:30, Ferruh Yigit:
> On 2/16/2023 10:43 AM, Thomas Monjalon wrote:
> > There are some devices supporting 400G speed,
> > and it is well standardized in IEEE.
> > 
> > Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> > ---
> >  app/test-pmd/cmdline.c             | 2 ++
> >  app/test-pmd/config.c              | 2 ++
> >  app/test-pmd/parameters.c          | 3 +++
> >  app/test/test_ethdev_link.c        | 3 ++-
> >  drivers/net/virtio/virtio_ethdev.c | 2 ++
> >  lib/ethdev/rte_ethdev.c            | 6 ++++++
> >  lib/ethdev/rte_ethdev.h            | 2 ++
> >  7 files changed, 19 insertions(+), 1 deletion(-)
> 
> It looks like some testpmd help strings and documentation missed, please
> check previous commit as reference:
> Commit f6eb39384933 ("ethdev: add 200G link speed")
> 
> 
> Also last time release notes also updated for new speed, what about
> doing same?

Yes you're right, I will do the same, thanks.






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

* [PATCH v2] ethdev: add link speed 400G
  2023-02-16 10:43 [PATCH] ethdev: add link speed 400G Thomas Monjalon
                   ` (3 preceding siblings ...)
  2023-02-16 12:30 ` Ferruh Yigit
@ 2023-03-01 11:16 ` Thomas Monjalon
  2023-03-01 14:50   ` Ajit Khaparde
  4 siblings, 1 reply; 9+ messages in thread
From: Thomas Monjalon @ 2023-03-01 11:16 UTC (permalink / raw)
  To: dev
  Cc: Bruce Richardson, Jerin Jacob, Ajit Khaparde, Raslan Darawsheh,
	David Marchand, Morten Brørup, Andrew Rybchenko,
	Chengwen Feng, Aman Singh, Yuying Zhang, Ferruh Yigit,
	Maxime Coquelin, Chenbo Xia

There are some devices supporting 400G speed,
and it is well standardized in IEEE.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
---
v2:
- update testpmd command
- add release note
---
 app/test-pmd/cmdline.c                      | 12 +++++++-----
 app/test-pmd/config.c                       |  2 ++
 app/test-pmd/parameters.c                   |  3 +++
 app/test/test_ethdev_link.c                 |  3 ++-
 doc/guides/rel_notes/release_23_03.rst      |  2 ++
 doc/guides/testpmd_app_ug/run_app.rst       |  1 +
 doc/guides/testpmd_app_ug/testpmd_funcs.rst |  2 +-
 drivers/net/virtio/virtio_ethdev.c          |  2 ++
 lib/ethdev/rte_ethdev.c                     |  6 ++++++
 lib/ethdev/rte_ethdev.h                     |  2 ++
 10 files changed, 28 insertions(+), 7 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 151f356224..02c72d06b7 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -653,7 +653,7 @@ static void cmd_help_long_parsed(void *parsed_result,
 			"    Detach physical or virtual dev by port_id\n\n"
 
 			"port config (port_id|all)"
-			" speed (10|100|1000|10000|25000|40000|50000|100000|200000|auto)"
+			" speed (10|100|1000|10000|25000|40000|50000|100000|200000|400000|auto)"
 			" duplex (half|full|auto)\n"
 			"    Set speed and duplex for all ports or port_id\n\n"
 
@@ -1356,6 +1356,8 @@ parse_and_check_speed_duplex(char *speedstr, char *duplexstr, uint32_t *speed)
 			*speed = RTE_ETH_LINK_SPEED_100G;
 		} else if (!strcmp(speedstr, "200000")) {
 			*speed = RTE_ETH_LINK_SPEED_200G;
+		} else if (!strcmp(speedstr, "400000")) {
+			*speed = RTE_ETH_LINK_SPEED_400G;
 		} else if (!strcmp(speedstr, "auto")) {
 			*speed = RTE_ETH_LINK_SPEED_AUTONEG;
 		} else {
@@ -1406,7 +1408,7 @@ static cmdline_parse_token_string_t cmd_config_speed_all_item1 =
 	TOKEN_STRING_INITIALIZER(struct cmd_config_speed_all, item1, "speed");
 static cmdline_parse_token_string_t cmd_config_speed_all_value1 =
 	TOKEN_STRING_INITIALIZER(struct cmd_config_speed_all, value1,
-				"10#100#1000#10000#25000#40000#50000#100000#200000#auto");
+				"10#100#1000#10000#25000#40000#50000#100000#200000#400000#auto");
 static cmdline_parse_token_string_t cmd_config_speed_all_item2 =
 	TOKEN_STRING_INITIALIZER(struct cmd_config_speed_all, item2, "duplex");
 static cmdline_parse_token_string_t cmd_config_speed_all_value2 =
@@ -1417,7 +1419,7 @@ static cmdline_parse_inst_t cmd_config_speed_all = {
 	.f = cmd_config_speed_all_parsed,
 	.data = NULL,
 	.help_str = "port config all speed "
-		"10|100|1000|10000|25000|40000|50000|100000|200000|auto duplex "
+		"10|100|1000|10000|25000|40000|50000|100000|200000|400000|auto duplex "
 							"half|full|auto",
 	.tokens = {
 		(void *)&cmd_config_speed_all_port,
@@ -1481,7 +1483,7 @@ static cmdline_parse_token_string_t cmd_config_speed_specific_item1 =
 								"speed");
 static cmdline_parse_token_string_t cmd_config_speed_specific_value1 =
 	TOKEN_STRING_INITIALIZER(struct cmd_config_speed_specific, value1,
-				"10#100#1000#10000#25000#40000#50000#100000#200000#auto");
+				"10#100#1000#10000#25000#40000#50000#100000#200000#400000#auto");
 static cmdline_parse_token_string_t cmd_config_speed_specific_item2 =
 	TOKEN_STRING_INITIALIZER(struct cmd_config_speed_specific, item2,
 								"duplex");
@@ -1493,7 +1495,7 @@ static cmdline_parse_inst_t cmd_config_speed_specific = {
 	.f = cmd_config_speed_specific_parsed,
 	.data = NULL,
 	.help_str = "port config <port_id> speed "
-		"10|100|1000|10000|25000|40000|50000|100000|200000|auto duplex "
+		"10|100|1000|10000|25000|40000|50000|100000|200000|400000|auto duplex "
 							"half|full|auto",
 	.tokens = {
 		(void *)&cmd_config_speed_specific_port,
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 4121c5c9bb..018536f177 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -612,6 +612,8 @@ device_infos_display_speeds(uint32_t speed_capa)
 		printf(" 100 Gbps  ");
 	if (speed_capa & RTE_ETH_LINK_SPEED_200G)
 		printf(" 200 Gbps  ");
+	if (speed_capa & RTE_ETH_LINK_SPEED_400G)
+		printf(" 400 Gbps  ");
 }
 
 void
diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index e734ad9a02..3b37809baf 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -568,6 +568,9 @@ parse_link_speed(int n)
 	case 200000:
 		speed |= RTE_ETH_LINK_SPEED_200G;
 		break;
+	case 400000:
+		speed |= RTE_ETH_LINK_SPEED_400G;
+		break;
 	case 100:
 	case 10:
 	default:
diff --git a/app/test/test_ethdev_link.c b/app/test/test_ethdev_link.c
index 6248aea49a..ab52385a12 100644
--- a/app/test/test_ethdev_link.c
+++ b/app/test/test_ethdev_link.c
@@ -54,7 +54,7 @@ test_link_status_up_default(void)
 		"string with HDX");
 
 	/* test max str len */
-	link_status.link_speed = RTE_ETH_SPEED_NUM_200G;
+	link_status.link_speed = RTE_ETH_SPEED_NUM_400G;
 	link_status.link_duplex = RTE_ETH_LINK_HALF_DUPLEX;
 	link_status.link_autoneg = RTE_ETH_LINK_AUTONEG;
 	ret = rte_eth_link_to_str(text, sizeof(text), &link_status);
@@ -130,6 +130,7 @@ test_link_speed_all_values(void)
 		{ "56 Gbps",  RTE_ETH_SPEED_NUM_56G },
 		{ "100 Gbps", RTE_ETH_SPEED_NUM_100G },
 		{ "200 Gbps", RTE_ETH_SPEED_NUM_200G },
+		{ "400 Gbps", RTE_ETH_SPEED_NUM_400G },
 		{ "Unknown",  RTE_ETH_SPEED_NUM_UNKNOWN },
 		{ "Invalid",   50505 }
 	};
diff --git a/doc/guides/rel_notes/release_23_03.rst b/doc/guides/rel_notes/release_23_03.rst
index 49c18617a5..ef2629a1ca 100644
--- a/doc/guides/rel_notes/release_23_03.rst
+++ b/doc/guides/rel_notes/release_23_03.rst
@@ -73,6 +73,8 @@ New Features
   Added power monitor and wake up API support
   with WFE/SVE instructions for Arm architecture.
 
+* **Added Ethernet link speed for 400 Gb/s.**
+
 * **Added support for mapping a queue with an aggregated port.**
 
   * Introduced new function ``rte_eth_dev_count_aggr_ports()``
diff --git a/doc/guides/testpmd_app_ug/run_app.rst b/doc/guides/testpmd_app_ug/run_app.rst
index f85f323033..57b23241cf 100644
--- a/doc/guides/testpmd_app_ug/run_app.rst
+++ b/doc/guides/testpmd_app_ug/run_app.rst
@@ -394,6 +394,7 @@ The command line options are:
        50000 - 50Gbps
        100000 - 100Gbps
        200000 - 200Gbps
+       400000 - 400Gbps
        ...
 
 *   ``--disable-link-check``
diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
index 5a88933635..8f23847859 100644
--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
@@ -2048,7 +2048,7 @@ port config - speed
 
 Set the speed and duplex mode for all ports or a specific port::
 
-   testpmd> port config (port_id|all) speed (10|100|1000|10000|25000|40000|50000|100000|200000|auto) \
+   testpmd> port config (port_id|all) speed (10|100|1000|10000|25000|40000|50000|100000|200000|400000|auto) \
             duplex (half|full|auto)
 
 port config - queues/descriptors
diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index 0103d95920..dc6856d749 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -2046,6 +2046,8 @@ virtio_dev_speed_capa_get(uint32_t speed)
 		return RTE_ETH_LINK_SPEED_100G;
 	case RTE_ETH_SPEED_NUM_200G:
 		return RTE_ETH_LINK_SPEED_200G;
+	case RTE_ETH_SPEED_NUM_400G:
+		return RTE_ETH_LINK_SPEED_400G;
 	default:
 		return 0;
 	}
diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c
index 0266cc82ac..3814c202cd 100644
--- a/lib/ethdev/rte_ethdev.c
+++ b/lib/ethdev/rte_ethdev.c
@@ -978,6 +978,9 @@ rte_eth_speed_bitflag(uint32_t speed, int duplex)
 	case RTE_ETH_SPEED_NUM_200G:
 		ret = RTE_ETH_LINK_SPEED_200G;
 		break;
+	case RTE_ETH_SPEED_NUM_400G:
+		ret = RTE_ETH_LINK_SPEED_400G;
+		break;
 	default:
 		ret = 0;
 	}
@@ -2882,6 +2885,9 @@ rte_eth_link_speed_to_str(uint32_t link_speed)
 	case RTE_ETH_SPEED_NUM_200G:
 		ret = "200 Gbps";
 		break;
+	case RTE_ETH_SPEED_NUM_400G:
+		ret = "400 Gbps";
+		break;
 	case RTE_ETH_SPEED_NUM_UNKNOWN:
 		ret = "Unknown";
 		break;
diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h
index 049641d57c..d40cb22dae 100644
--- a/lib/ethdev/rte_ethdev.h
+++ b/lib/ethdev/rte_ethdev.h
@@ -304,6 +304,7 @@ struct rte_eth_stats {
 #define RTE_ETH_LINK_SPEED_56G     RTE_BIT32(13) /**<  56 Gbps */
 #define RTE_ETH_LINK_SPEED_100G    RTE_BIT32(14) /**< 100 Gbps */
 #define RTE_ETH_LINK_SPEED_200G    RTE_BIT32(15) /**< 200 Gbps */
+#define RTE_ETH_LINK_SPEED_400G    RTE_BIT32(16) /**< 400 Gbps */
 /**@}*/
 
 /**@{@name Link speed
@@ -323,6 +324,7 @@ struct rte_eth_stats {
 #define RTE_ETH_SPEED_NUM_56G      56000 /**<  56 Gbps */
 #define RTE_ETH_SPEED_NUM_100G    100000 /**< 100 Gbps */
 #define RTE_ETH_SPEED_NUM_200G    200000 /**< 200 Gbps */
+#define RTE_ETH_SPEED_NUM_400G    400000 /**< 400 Gbps */
 #define RTE_ETH_SPEED_NUM_UNKNOWN UINT32_MAX /**< Unknown */
 /**@}*/
 
-- 
2.39.1


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

* Re: [PATCH v2] ethdev: add link speed 400G
  2023-03-01 11:16 ` [PATCH v2] " Thomas Monjalon
@ 2023-03-01 14:50   ` Ajit Khaparde
  2023-03-02  8:58     ` Ferruh Yigit
  0 siblings, 1 reply; 9+ messages in thread
From: Ajit Khaparde @ 2023-03-01 14:50 UTC (permalink / raw)
  To: Thomas Monjalon
  Cc: dev, Bruce Richardson, Jerin Jacob, Raslan Darawsheh,
	David Marchand, Morten Brørup, Andrew Rybchenko,
	Chengwen Feng, Aman Singh, Yuying Zhang, Ferruh Yigit,
	Maxime Coquelin, Chenbo Xia

[-- Attachment #1: Type: text/plain, Size: 457 bytes --]

On Wed, Mar 1, 2023 at 3:16 AM Thomas Monjalon <thomas@monjalon.net> wrote:
>
> There are some devices supporting 400G speed,
> and it is well standardized in IEEE.
>
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> Reviewed-by: Morten Brørup <mb@smartsharesystems.com>
> Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
> Acked-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>

[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4218 bytes --]

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

* Re: [PATCH v2] ethdev: add link speed 400G
  2023-03-01 14:50   ` Ajit Khaparde
@ 2023-03-02  8:58     ` Ferruh Yigit
  0 siblings, 0 replies; 9+ messages in thread
From: Ferruh Yigit @ 2023-03-02  8:58 UTC (permalink / raw)
  To: Ajit Khaparde, Thomas Monjalon
  Cc: dev, Bruce Richardson, Jerin Jacob, Raslan Darawsheh,
	David Marchand, Morten Brørup, Andrew Rybchenko,
	Chengwen Feng, Aman Singh, Yuying Zhang, Maxime Coquelin,
	Chenbo Xia

On 3/1/2023 2:50 PM, Ajit Khaparde wrote:
> On Wed, Mar 1, 2023 at 3:16 AM Thomas Monjalon <thomas@monjalon.net> wrote:
>>
>> There are some devices supporting 400G speed,
>> and it is well standardized in IEEE.
>>
>> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
>> Reviewed-by: Morten Brørup <mb@smartsharesystems.com>
>> Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
>> Acked-by: Chengwen Feng <fengchengwen@huawei.com>
> Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>

Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>

Applied to dpdk-next-net/main, thanks.

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

end of thread, other threads:[~2023-03-02  8:58 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-16 10:43 [PATCH] ethdev: add link speed 400G Thomas Monjalon
2023-02-16 10:49 ` Morten Brørup
2023-02-16 11:23 ` Andrew Rybchenko
2023-02-16 11:27 ` fengchengwen
2023-02-16 12:30 ` Ferruh Yigit
2023-02-16 23:56   ` Thomas Monjalon
2023-03-01 11:16 ` [PATCH v2] " Thomas Monjalon
2023-03-01 14:50   ` Ajit Khaparde
2023-03-02  8:58     ` 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).