ethdev: add 200G link speed
There is no way to report back a link speed of 200Gbps. Adding 200G link speed. Signed-off-by: Asaf Penso <asafp@mellanox.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
This commit is contained in:
parent
647909bcf3
commit
f6eb393849
@ -769,7 +769,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|auto)"
|
||||
" speed (10|100|1000|10000|25000|40000|50000|100000|200000|auto)"
|
||||
" duplex (half|full|auto)\n"
|
||||
" Set speed and duplex for all ports or port_id\n\n"
|
||||
|
||||
@ -1623,6 +1623,8 @@ parse_and_check_speed_duplex(char *speedstr, char *duplexstr, uint32_t *speed)
|
||||
*speed = ETH_LINK_SPEED_50G;
|
||||
} else if (!strcmp(speedstr, "100000")) {
|
||||
*speed = ETH_LINK_SPEED_100G;
|
||||
} else if (!strcmp(speedstr, "200000")) {
|
||||
*speed = ETH_LINK_SPEED_200G;
|
||||
} else if (!strcmp(speedstr, "auto")) {
|
||||
*speed = ETH_LINK_SPEED_AUTONEG;
|
||||
} else {
|
||||
@ -1670,7 +1672,7 @@ cmdline_parse_token_string_t cmd_config_speed_all_item1 =
|
||||
TOKEN_STRING_INITIALIZER(struct cmd_config_speed_all, item1, "speed");
|
||||
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#auto");
|
||||
"10#100#1000#10000#25000#40000#50000#100000#200000#auto");
|
||||
cmdline_parse_token_string_t cmd_config_speed_all_item2 =
|
||||
TOKEN_STRING_INITIALIZER(struct cmd_config_speed_all, item2, "duplex");
|
||||
cmdline_parse_token_string_t cmd_config_speed_all_value2 =
|
||||
@ -1681,7 +1683,7 @@ 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|auto duplex "
|
||||
"10|100|1000|10000|25000|40000|50000|100000|200000|auto duplex "
|
||||
"half|full|auto",
|
||||
.tokens = {
|
||||
(void *)&cmd_config_speed_all_port,
|
||||
@ -1745,7 +1747,7 @@ cmdline_parse_token_string_t cmd_config_speed_specific_item1 =
|
||||
"speed");
|
||||
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#auto");
|
||||
"10#100#1000#10000#25000#40000#50000#100000#200000#auto");
|
||||
cmdline_parse_token_string_t cmd_config_speed_specific_item2 =
|
||||
TOKEN_STRING_INITIALIZER(struct cmd_config_speed_specific, item2,
|
||||
"duplex");
|
||||
@ -1757,7 +1759,7 @@ 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|auto duplex "
|
||||
"10|100|1000|10000|25000|40000|50000|100000|200000|auto duplex "
|
||||
"half|full|auto",
|
||||
.tokens = {
|
||||
(void *)&cmd_config_speed_specific_port,
|
||||
|
@ -93,6 +93,8 @@ New Features
|
||||
* Added new query: ``rte_flow_get_aged_flows`` to get the aged-out flows
|
||||
contexts from the port.
|
||||
|
||||
* **ethdev: Added a new value to link speed for 200Gbps**
|
||||
|
||||
* **Updated Amazon ena driver.**
|
||||
|
||||
Updated ena PMD with new features and improvements, including:
|
||||
|
@ -2153,7 +2153,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|auto) \
|
||||
testpmd> port config (port_id|all) speed (10|100|1000|10000|25000|40000|50000|100000|200000|auto) \
|
||||
duplex (half|full|auto)
|
||||
|
||||
port config - queues/descriptors
|
||||
|
@ -1100,6 +1100,8 @@ rte_eth_speed_bitflag(uint32_t speed, int duplex)
|
||||
return ETH_LINK_SPEED_56G;
|
||||
case ETH_SPEED_NUM_100G:
|
||||
return ETH_LINK_SPEED_100G;
|
||||
case ETH_SPEED_NUM_200G:
|
||||
return ETH_LINK_SPEED_200G;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
@ -284,6 +284,7 @@ struct rte_eth_stats {
|
||||
#define ETH_LINK_SPEED_50G (1 << 12) /**< 50 Gbps */
|
||||
#define ETH_LINK_SPEED_56G (1 << 13) /**< 56 Gbps */
|
||||
#define ETH_LINK_SPEED_100G (1 << 14) /**< 100 Gbps */
|
||||
#define ETH_LINK_SPEED_200G (1 << 15) /**< 200 Gbps */
|
||||
|
||||
/**
|
||||
* Ethernet numeric link speeds in Mbps
|
||||
@ -301,6 +302,7 @@ struct rte_eth_stats {
|
||||
#define ETH_SPEED_NUM_50G 50000 /**< 50 Gbps */
|
||||
#define ETH_SPEED_NUM_56G 56000 /**< 56 Gbps */
|
||||
#define ETH_SPEED_NUM_100G 100000 /**< 100 Gbps */
|
||||
#define ETH_SPEED_NUM_200G 200000 /**< 200 Gbps */
|
||||
|
||||
/**
|
||||
* A structure used to retrieve link-level information of an Ethernet port.
|
||||
|
Loading…
Reference in New Issue
Block a user