ethdev: add 1.6T link speed
PATCH 1/1 ethdev: add 1.6T link speed
Current ethdev speed definitions stop at 800 Gbps, preventing applications such as bonding from reporting a 1.6 Tbps negotiated link speed.
IEEE 802.3df standardizes 800 Gbps, and IEEE P802.3dj is standardizing 1.6 Tbps as the next Ethernet MAC rate, with no intermediate rate.
Add the 1.6 Tbps speed definition and update testpmd, telemetry, virtio, tests and documentation to recognize it.
Signed-off-by Maayan Kashani <[email protected]>
--- 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_26_11.rst | 5 +++++ 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 | 6 ++++++ 10 files changed, 35 insertions(+), 7 deletions(-)
app/test-pmd/cmdline.c +7 -5
@@ -725,7 +725,7 @@ static void cmd_help_long_parsed(void *parsed_result,"port config (port_id|all)" " speed (10|100|1000|2500|5000|10000|25000|40000|50000|" -"100000|200000|400000|800000|auto)" +"100000|200000|400000|800000|1600000|auto)" " duplex (half|full|auto)\n" " Set speed and duplex for all ports or port_id\n\n"
@@ -1447,6 +1447,8 @@ parse_and_check_speed_duplex(char *speedstr, char *duplexstr, uint32_t *speed) *speed =RTE_ETH_LINK_SPEED_400G ; }else if (!strcmp (speedstr,"800000" )) { *speed =RTE_ETH_LINK_SPEED_800G ; + }else if (!strcmp (speedstr,"1600000" )) { + *speed =RTE_ETH_LINK_SPEED_1600G ; }else if (!strcmp (speedstr,"auto" )) { *speed =RTE_ETH_LINK_SPEED_AUTONEG ; }else {
@@ -1498,7 +1500,7 @@ static cmdline_parse_token_string_t cmd_config_speed_all_item1 =static cmdline_parse_token_string_t cmd_config_speed_all_value1 = TOKEN_STRING_INITIALIZER(struct cmd_config_speed_all, value1,"10#100#1000#2500#5000#10000#25000#40000#50000#" -"100000#200000#400000#800000#auto" ); +"100000#200000#400000#800000#1600000#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 =
@@ -1510,7 +1512,7 @@ static cmdline_parse_inst_t cmd_config_speed_all = { .data = NULL, .help_str = "port config all speed " "10|100|1000|2500|5000|10000|25000|40000|50000|" - "100000|200000|400000|800000|auto " + "100000|200000|400000|800000|1600000|auto " "duplex half|full|auto", .tokens = { (void *)&cmd_config_speed_all_port,
@@ -1575,7 +1577,7 @@ static cmdline_parse_token_string_t cmd_config_speed_specific_item1 =static cmdline_parse_token_string_t cmd_config_speed_specific_value1 = TOKEN_STRING_INITIALIZER(struct cmd_config_speed_specific, value1,"10#100#1000#2500#5000#10000#25000#40000#50000#" -"100000#200000#400000#800000#auto" ); +"100000#200000#400000#800000#1600000#auto" );static cmdline_parse_token_string_t cmd_config_speed_specific_item2 = TOKEN_STRING_INITIALIZER(struct cmd_config_speed_specific, item2,"duplex" );
@@ -1588,7 +1590,7 @@ static cmdline_parse_inst_t cmd_config_speed_specific = { .data = NULL, .help_str = "port config <port_id> speed " "10|100|1000|2500|5000|10000|25000|40000|50000|" - "100000|200000|400000|800000|auto " + "100000|200000|400000|800000|1600000|auto " "duplex half|full|auto", .tokens = { (void *)&cmd_config_speed_specific_port,
app/test-pmd/config.c +2 -0
@@ -638,6 +638,8 @@ device_infos_display_speeds(uint32_t speed_capa)printf (" 400 Gbps " );if (speed_capa &RTE_ETH_LINK_SPEED_800G )printf (" 800 Gbps " ); +if (speed_capa &RTE_ETH_LINK_SPEED_1600G ) +printf (" 1.6 Tbps " ); }void
app/test-pmd/parameters.c +3 -0
@@ -934,6 +934,9 @@ parse_link_speed(int n)case 800000 : speed |=RTE_ETH_LINK_SPEED_800G ;break ; +case 1600000 : + speed |=RTE_ETH_LINK_SPEED_1600G ; +break ;case 100 :case 10 :default :
app/test/test_ethdev_link.c +2 -1
@@ -56,7 +56,7 @@ test_link_status_up_default(void) "string with HDX");/* test max str len */ - link_status.link_speed =RTE_ETH_SPEED_NUM_800G ; + link_status.link_speed =RTE_ETH_SPEED_NUM_1600G ; link_status.link_duplex =RTE_ETH_LINK_HALF_DUPLEX ; link_status.link_autoneg =RTE_ETH_LINK_AUTONEG ; link_status.link_connector =RTE_ETH_LINK_CONNECTOR_GAUI ;
@@ -136,6 +136,7 @@ test_link_speed_all_values(void) { "200 Gbps", RTE_ETH_SPEED_NUM_200G }, { "400 Gbps", RTE_ETH_SPEED_NUM_400G }, { "800 Gbps", RTE_ETH_SPEED_NUM_800G }, + { "1.6 Tbps", RTE_ETH_SPEED_NUM_1600G }, { "Unknown", RTE_ETH_SPEED_NUM_UNKNOWN }, { "Invalid", 50505 } };
doc/guides/rel_notes/release_26_11.rst +5 -0
@@ -100,6 +100,11 @@ New Features the kernel driver is the generic ``vfio-platform``, which carries no device identity in its name. +* **Added link speed 1.6T to ethdev.** + + Added the 1.6 Tb/s Ethernet link speed, + allowing aggregate links such as two 800 Gb/s members to be represented. + * **Added module EEPROM decoding API to ethdev.** Added the experimental ``rte_eth_module_eeprom_parse()`` function
doc/guides/testpmd_app_ug/run_app.rst +1 -0
@@ -441,6 +441,7 @@ The command line options are: 200000 - 200Gbps 400000 - 400Gbps 800000 - 800Gbps + 1600000 - 1.6Tbps ... * ``--disable-link-check``
doc/guides/testpmd_app_ug/testpmd_funcs.rst +1 -1
@@ -2166,7 +2166,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|2500|5000|10000|25000|40000|50000|100000|200000|400000|800000|auto) \ + testpmd> port config (port_id|all) speed (10|100|1000|2500|5000|10000|25000|40000|50000|100000|200000|400000|800000|1600000|auto) \ duplex (half|full|auto) port config - queues/descriptors
drivers/net/virtio/virtio_ethdev.c +2 -0
@@ -2123,6 +2123,8 @@ virtio_dev_speed_capa_get(uint32_t speed)return RTE_ETH_LINK_SPEED_400G ;case RTE_ETH_SPEED_NUM_800G :return RTE_ETH_LINK_SPEED_800G ; +case RTE_ETH_SPEED_NUM_1600G : +return RTE_ETH_LINK_SPEED_1600G ;default :return 0 ; }
lib/ethdev/rte_ethdev.c +6 -0
@@ -1073,6 +1073,9 @@ rte_eth_speed_bitflag(uint32_t speed, int duplex)case RTE_ETH_SPEED_NUM_800G : ret =RTE_ETH_LINK_SPEED_800G ;break ; +case RTE_ETH_SPEED_NUM_1600G : + ret =RTE_ETH_LINK_SPEED_1600G ; +break ;default : ret =0 ; }
@@ -3277,6 +3280,9 @@ rte_eth_link_speed_to_str(uint32_t link_speed)case RTE_ETH_SPEED_NUM_800G : ret ="800 Gbps" ;break ; +case RTE_ETH_SPEED_NUM_1600G : + ret ="1.6 Tbps" ; +break ;case RTE_ETH_SPEED_NUM_UNKNOWN : ret ="Unknown" ;break ;
lib/ethdev/rte_ethdev.h +6 -0
@@ -296,6 +296,11 @@ struct rte_eth_stats {#define RTE_ETH_LINK_SPEED_200G RTE_BIT32(15)/**< 200 Gbps */ #define RTE_ETH_LINK_SPEED_400G RTE_BIT32(16)/**< 400 Gbps */ #define RTE_ETH_LINK_SPEED_800G RTE_BIT32(17)/**< 800 Gbps */ +/* +* 800 Gbps is standardized in IEEE 802.3df; IEEE P802.3dj is +* standardizing 1.6 Tbps as the next rate. +*/ +#define RTE_ETH_LINK_SPEED_1600G RTE_BIT32(18)/**< 1.6 Tbps */ /**@}*/ /**@{@name Link speed
@@ -317,6 +322,7 @@ struct rte_eth_stats {#define RTE_ETH_SPEED_NUM_200G 200000/**< 200 Gbps */ #define RTE_ETH_SPEED_NUM_400G 400000/**< 400 Gbps */ #define RTE_ETH_SPEED_NUM_800G 800000/**< 800 Gbps */ +#define RTE_ETH_SPEED_NUM_1600G 1600000/**< 1.6 Tbps */ #define RTE_ETH_SPEED_NUM_UNKNOWN UINT32_MAX/**< Unknown */ /**@}*/
Signature · 1 line
2.25.1
Quoted 5 lines · On Tue, 3 Nov 2026 15:01:27 +0200 Maayan Kashani <[email protected]> wrote:
lib/ethdev/rte_ethdev.h +0
-0
lib/ethdev/rte_ethdev.h struct rte_eth_stats { · line 304
Quoted 9 lines
lib/ethdev/rte_ethdev.h +5
-0@@ -296,6 +296,11 @@ struct rte_eth_stats {#define RTE_ETH_LINK_SPEED_200G RTE_BIT32(15)/**< 200 Gbps */ #define RTE_ETH_LINK_SPEED_400G RTE_BIT32(16)/**< 400 Gbps */ #define RTE_ETH_LINK_SPEED_800G RTE_BIT32(17)/**< 800 Gbps */ +/* +* 800 Gbps is standardized in IEEE 802.3df; IEEE P802.3dj is +* standardizing 1.6 Tbps as the next rate. +*/ +#define RTE_ETH_LINK_SPEED_1600G RTE_BIT32(18)/**< 1.6 Tbps */ /**@}*/
I am ok with the rest of the changes but the comment. There is no reason to add comment for one speed. Looks like something AI generated to tell itself how important it is.
Will drop the comment during merge