* [dpdk-dev] [PATCH] net/mlx5: add 200G and 400G link speed
@ 2020-04-21 13:44 Asaf Penso
2020-04-22 16:29 ` Ajit Khaparde
2020-05-06 10:58 ` [dpdk-dev] [PATCH v2] net/mlx5: add 200G " Asaf Penso
0 siblings, 2 replies; 13+ messages in thread
From: Asaf Penso @ 2020-04-21 13:44 UTC (permalink / raw)
To: dev; +Cc: thomas, viacheslavo, matan
There is no way to report back a link speed of 200Gbps nor 400Gbps.
Adding both 200G and 400G link speed.
Signed-off-by: Asaf Penso <asafp@mellanox.com>
---
app/test-pmd/cmdline.c | 14 ++++++++-----
doc/guides/rel_notes/release_20_05.rst | 2 ++
doc/guides/testpmd_app_ug/testpmd_funcs.rst | 2 +-
drivers/net/mlx5/mlx5_ethdev.c | 32 ++++++++++++++++++++++++++++-
lib/librte_ethdev/rte_ethdev.c | 4 ++++
lib/librte_ethdev/rte_ethdev.h | 4 ++++
6 files changed, 51 insertions(+), 7 deletions(-)
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index a36c505..7b77584 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -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|400000|auto)"
" duplex (half|full|auto)\n"
" Set speed and duplex for all ports or port_id\n\n"
@@ -1619,6 +1619,10 @@ struct cmd_config_speed_all {
*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, "400000")) {
+ *speed = ETH_LINK_SPEED_400G;
} else if (!strcmp(speedstr, "auto")) {
*speed = ETH_LINK_SPEED_AUTONEG;
} else {
@@ -1666,7 +1670,7 @@ struct cmd_config_speed_all {
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#400000#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 =
@@ -1677,7 +1681,7 @@ struct 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|400000|auto duplex "
"half|full|auto",
.tokens = {
(void *)&cmd_config_speed_all_port,
@@ -1741,7 +1745,7 @@ struct cmd_config_speed_specific {
"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#400000#auto");
cmdline_parse_token_string_t cmd_config_speed_specific_item2 =
TOKEN_STRING_INITIALIZER(struct cmd_config_speed_specific, item2,
"duplex");
@@ -1753,7 +1757,7 @@ struct 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|400000|auto duplex "
"half|full|auto",
.tokens = {
(void *)&cmd_config_speed_specific_port,
diff --git a/doc/guides/rel_notes/release_20_05.rst b/doc/guides/rel_notes/release_20_05.rst
index bacd4c6..636c356 100644
--- a/doc/guides/rel_notes/release_20_05.rst
+++ b/doc/guides/rel_notes/release_20_05.rst
@@ -56,6 +56,8 @@ New Features
Also, make sure to start the actual text at the margin.
=========================================================
+* **ethdev: Added new values to link speed for 200Gbps and 400Gbps**
+
* **Updated Mellanox mlx5 driver.**
Updated Mellanox mlx5 driver with new features and improvements, including:
diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
index dcee5de..5b8b0dc 100644
--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
@@ -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|400000|auto) \
duplex (half|full|auto)
port config - queues/descriptors
diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c
index d7d3bc7..e78a665 100644
--- a/drivers/net/mlx5/mlx5_ethdev.c
+++ b/drivers/net/mlx5/mlx5_ethdev.c
@@ -119,6 +119,20 @@ struct ethtool_link_settings {
#define ETHTOOL_LINK_MODE_100000baseCR4_Full_BIT 38
#define ETHTOOL_LINK_MODE_100000baseLR4_ER4_Full_BIT 39
#endif
+#ifndef HAVE_ETHTOOL_LINK_MODE_200G
+#define ETHTOOL_LINK_MODE_200000baseCR4_Full_BIT 40
+#define ETHTOOL_LINK_MODE_200000baseKR4_Full_BIT 41
+#define ETHTOOL_LINK_MODE_200000baseLR4_ER4_FR4_Full_BIT 42
+#define ETHTOOL_LINK_MODE_200000baseDR4_Full_BIT 43
+#define ETHTOOL_LINK_MODE_200000baseSR4_Full_BIT 44
+#endif
+#ifndef HAVE_ETHTOOL_LINK_MODE_400G
+#define ETHTOOL_LINK_MODE_400000baseKR8_Full_BIT 45
+#define ETHTOOL_LINK_MODE_400000baseSR8_Full_BIT 46
+#define ETHTOOL_LINK_MODE_400000baseLR8_ER8_FR8_Full_BIT 47
+#define ETHTOOL_LINK_MODE_400000baseDR8_Full_BIT 48
+#define ETHTOOL_LINK_MODE_400000baseCR8_Full_BIT 49
+#endif
/**
* Get master interface name from private structure.
@@ -537,7 +551,9 @@ struct ethtool_link_settings {
info->default_txportconf.ring_size = 256;
info->default_rxportconf.burst_size = MLX5_RX_DEFAULT_BURST;
info->default_txportconf.burst_size = MLX5_TX_DEFAULT_BURST;
- if (priv->link_speed_capa & ETH_LINK_SPEED_100G) {
+ if ((priv->link_speed_capa & ETH_LINK_SPEED_400G) |
+ (priv->link_speed_capa & ETH_LINK_SPEED_200G) |
+ (priv->link_speed_capa & ETH_LINK_SPEED_100G)) {
info->default_rxportconf.nb_queues = 16;
info->default_txportconf.nb_queues = 16;
if (dev->data->nb_rx_queues > 2 ||
@@ -1028,6 +1044,20 @@ int mlx5_fw_version_get(struct rte_eth_dev *dev, char *fw_ver, size_t fw_size)
MLX5_BITSHIFT(ETHTOOL_LINK_MODE_100000baseCR4_Full_BIT) |
MLX5_BITSHIFT(ETHTOOL_LINK_MODE_100000baseLR4_ER4_Full_BIT)))
priv->link_speed_capa |= ETH_LINK_SPEED_100G;
+ if (sc & (MLX5_BITSHIFT(ETHTOOL_LINK_MODE_200000baseCR4_Full_BIT) |
+ MLX5_BITSHIFT(ETHTOOL_LINK_MODE_200000baseKR4_Full_BIT) |
+ MLX5_BITSHIFT(
+ ETHTOOL_LINK_MODE_200000baseLR4_ER4_FR4_Full_BIT) |
+ MLX5_BITSHIFT(ETHTOOL_LINK_MODE_200000baseDR4_Full_BIT) |
+ MLX5_BITSHIFT(ETHTOOL_LINK_MODE_200000baseSR4_Full_BIT)))
+ priv->link_speed_capa |= ETH_LINK_SPEED_200G;
+ if (sc & (MLX5_BITSHIFT(ETHTOOL_LINK_MODE_400000baseKR8_Full_BIT) |
+ MLX5_BITSHIFT(ETHTOOL_LINK_MODE_400000baseSR8_Full_BIT) |
+ MLX5_BITSHIFT(
+ ETHTOOL_LINK_MODE_400000baseLR8_ER8_FR8_Full_BIT) |
+ MLX5_BITSHIFT(ETHTOOL_LINK_MODE_400000baseDR8_Full_BIT) |
+ MLX5_BITSHIFT(ETHTOOL_LINK_MODE_400000baseCR8_Full_BIT)))
+ priv->link_speed_capa |= ETH_LINK_SPEED_400G;
dev_link.link_duplex = ((ecmd->duplex == DUPLEX_HALF) ?
ETH_LINK_HALF_DUPLEX : ETH_LINK_FULL_DUPLEX);
dev_link.link_autoneg = !(dev->data->dev_conf.link_speeds &
diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
index 0854ef8..6c49a59 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
@@ -1098,6 +1098,10 @@ struct rte_eth_dev *
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;
+ case ETH_SPEED_NUM_400G:
+ return ETH_LINK_SPEED_400G;
default:
return 0;
}
diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index 8d69b88..5509b5a 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -283,6 +283,8 @@ 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 */
+#define ETH_LINK_SPEED_400G (1 << 16) /**< 400 Gbps */
/**
* Ethernet numeric link speeds in Mbps
@@ -300,6 +302,8 @@ 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 */
+#define ETH_SPEED_NUM_400G 400000 /**< 400 Gbps */
/**
* A structure used to retrieve link-level information of an Ethernet port.
--
1.8.3.1
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [dpdk-dev] [PATCH] net/mlx5: add 200G and 400G link speed
2020-04-21 13:44 [dpdk-dev] [PATCH] net/mlx5: add 200G and 400G link speed Asaf Penso
@ 2020-04-22 16:29 ` Ajit Khaparde
2020-05-06 10:58 ` [dpdk-dev] [PATCH v2] net/mlx5: add 200G " Asaf Penso
1 sibling, 0 replies; 13+ messages in thread
From: Ajit Khaparde @ 2020-04-22 16:29 UTC (permalink / raw)
To: Asaf Penso; +Cc: dpdk-dev, Thomas Monjalon, Viacheslav Ovsiienko, Matan Azrad
On Tue, Apr 21, 2020 at 6:45 AM Asaf Penso <asafp@mellanox.com> wrote:
> There is no way to report back a link speed of 200Gbps nor 400Gbps.
>
> Adding both 200G and 400G link speed.
>
> Signed-off-by: Asaf Penso <asafp@mellanox.com>
>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
^ permalink raw reply [flat|nested] 13+ messages in thread
* [dpdk-dev] [PATCH v2] net/mlx5: add 200G link speed
2020-04-21 13:44 [dpdk-dev] [PATCH] net/mlx5: add 200G and 400G link speed Asaf Penso
2020-04-22 16:29 ` Ajit Khaparde
@ 2020-05-06 10:58 ` Asaf Penso
2020-05-06 12:07 ` [dpdk-dev] [PATCH v3] " Asaf Penso
2020-05-06 12:22 ` Asaf Penso
1 sibling, 2 replies; 13+ messages in thread
From: Asaf Penso @ 2020-05-06 10:58 UTC (permalink / raw)
To: thomas, ferruh.yigit, arybchenko, viacheslavo, matan; +Cc: dev, ajit.khaparde
There is no way to report back a link speed of 200Gbps.
Adding 200G link speed.
Signed-off-by: Asaf Penso <asafp@mellanox.com>
---
v2 - reword commit log and remove 400G
---
app/test-pmd/cmdline.c | 12 +++++++-----
doc/guides/rel_notes/release_20_05.rst | 2 ++
doc/guides/testpmd_app_ug/testpmd_funcs.rst | 2 +-
drivers/net/mlx5/mlx5_ethdev.c | 23 ++++++++++++++++++++++-
lib/librte_ethdev/rte_ethdev.c | 2 ++
lib/librte_ethdev/rte_ethdev.h | 2 ++
6 files changed, 36 insertions(+), 7 deletions(-)
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index a36c505..63954ed 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -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"
@@ -1619,6 +1619,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 {
@@ -1666,7 +1668,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 =
@@ -1677,7 +1679,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,
@@ -1741,7 +1743,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");
@@ -1753,7 +1755,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,
diff --git a/doc/guides/rel_notes/release_20_05.rst b/doc/guides/rel_notes/release_20_05.rst
index bacd4c6..5441605 100644
--- a/doc/guides/rel_notes/release_20_05.rst
+++ b/doc/guides/rel_notes/release_20_05.rst
@@ -56,6 +56,8 @@ New Features
Also, make sure to start the actual text at the margin.
=========================================================
+* **ethdev: Added a new value to link speed for 200Gbps **
+
* **Updated Mellanox mlx5 driver.**
Updated Mellanox mlx5 driver with new features and improvements, including:
diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
index dcee5de..51054d9 100644
--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
@@ -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
diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c
index d7d3bc7..3953787 100644
--- a/drivers/net/mlx5/mlx5_ethdev.c
+++ b/drivers/net/mlx5/mlx5_ethdev.c
@@ -86,6 +86,8 @@ struct ethtool_link_settings {
uint32_t link_mode_masks[];
};
+/* The following kernel values can be found in
+ * /include/uapi/linux/ethtool.h */
#define ETHTOOL_GLINKSETTINGS 0x0000004c
#define ETHTOOL_LINK_MODE_1000baseT_Full_BIT 5
#define ETHTOOL_LINK_MODE_Autoneg_BIT 6
@@ -119,6 +121,13 @@ struct ethtool_link_settings {
#define ETHTOOL_LINK_MODE_100000baseCR4_Full_BIT 38
#define ETHTOOL_LINK_MODE_100000baseLR4_ER4_Full_BIT 39
#endif
+#ifndef HAVE_ETHTOOL_LINK_MODE_200G
+#define ETHTOOL_LINK_MODE_200000baseKR4_Full_BIT 62
+#define ETHTOOL_LINK_MODE_200000baseSR4_Full_BIT 63
+#define ETHTOOL_LINK_MODE_200000baseLR4_ER4_FR4_Full_BIT 0 /* 64 - 64 */
+#define ETHTOOL_LINK_MODE_200000baseDR4_Full_BIT 1 /* 65 - 64 */
+#define ETHTOOL_LINK_MODE_200000baseCR4_Full_BIT 2 /* 66 - 64 */
+#endif
/**
* Get master interface name from private structure.
@@ -537,7 +546,8 @@ mlx5_set_default_params(struct rte_eth_dev *dev, struct rte_eth_dev_info *info)
info->default_txportconf.ring_size = 256;
info->default_rxportconf.burst_size = MLX5_RX_DEFAULT_BURST;
info->default_txportconf.burst_size = MLX5_TX_DEFAULT_BURST;
- if (priv->link_speed_capa & ETH_LINK_SPEED_100G) {
+ if ((priv->link_speed_capa & ETH_LINK_SPEED_200G) |
+ (priv->link_speed_capa & ETH_LINK_SPEED_100G)) {
info->default_rxportconf.nb_queues = 16;
info->default_txportconf.nb_queues = 16;
if (dev->data->nb_rx_queues > 2 ||
@@ -1028,6 +1038,17 @@ mlx5_link_update_unlocked_gs(struct rte_eth_dev *dev,
MLX5_BITSHIFT(ETHTOOL_LINK_MODE_100000baseCR4_Full_BIT) |
MLX5_BITSHIFT(ETHTOOL_LINK_MODE_100000baseLR4_ER4_Full_BIT)))
priv->link_speed_capa |= ETH_LINK_SPEED_100G;
+ if (sc & (MLX5_BITSHIFT(ETHTOOL_LINK_MODE_200000baseKR4_Full_BIT) |
+ MLX5_BITSHIFT(ETHTOOL_LINK_MODE_200000baseSR4_Full_BIT)))
+ priv->link_speed_capa |= ETH_LINK_SPEED_200G;
+
+ sc = ecmd->link_mode_masks[2] |
+ ((uint64_t)ecmd->link_mode_masks[3] << 32);
+ if (sc & (MLX5_BITSHIFT(ETHTOOL_LINK_MODE_200000baseCR4_Full_BIT) |
+ MLX5_BITSHIFT(
+ ETHTOOL_LINK_MODE_200000baseLR4_ER4_FR4_Full_BIT) |
+ MLX5_BITSHIFT(ETHTOOL_LINK_MODE_200000baseDR4_Full_BIT)))
+ priv->link_speed_capa |= ETH_LINK_SPEED_200G;
dev_link.link_duplex = ((ecmd->duplex == DUPLEX_HALF) ?
ETH_LINK_HALF_DUPLEX : ETH_LINK_FULL_DUPLEX);
dev_link.link_autoneg = !(dev->data->dev_conf.link_speeds &
diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
index 0854ef8..43a0489 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
@@ -1098,6 +1098,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;
}
diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index 8d69b88..221072c 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -283,6 +283,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
@@ -300,6 +301,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.
--
2.7.4
^ permalink raw reply [flat|nested] 13+ messages in thread
* [dpdk-dev] [PATCH v3] net/mlx5: add 200G link speed
2020-05-06 10:58 ` [dpdk-dev] [PATCH v2] net/mlx5: add 200G " Asaf Penso
@ 2020-05-06 12:07 ` Asaf Penso
2020-05-06 13:43 ` Slava Ovsiienko
2020-05-06 12:22 ` Asaf Penso
1 sibling, 1 reply; 13+ messages in thread
From: Asaf Penso @ 2020-05-06 12:07 UTC (permalink / raw)
To: thomas, ferruh.yigit, arybchenko, viacheslavo, matan; +Cc: dev
There is no way to report back a link speed of 200Gbps.
Adding 200G link speed.
Signed-off-by: Asaf Penso <asafp@mellanox.com>
---
app/test-pmd/cmdline.c | 12 +++++++-----
doc/guides/rel_notes/release_20_05.rst | 2 ++
doc/guides/testpmd_app_ug/testpmd_funcs.rst | 2 +-
drivers/net/mlx5/mlx5_ethdev.c | 22 +++++++++++++++++++++-
lib/librte_ethdev/rte_ethdev.c | 2 ++
lib/librte_ethdev/rte_ethdev.h | 2 ++
6 files changed, 35 insertions(+), 7 deletions(-)
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 1375f22..e6c6b68 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -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"
@@ -1619,6 +1619,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 {
@@ -1666,7 +1668,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 =
@@ -1677,7 +1679,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,
@@ -1741,7 +1743,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");
@@ -1753,7 +1755,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,
diff --git a/doc/guides/rel_notes/release_20_05.rst b/doc/guides/rel_notes/release_20_05.rst
index 777d36e..eb8a623 100644
--- a/doc/guides/rel_notes/release_20_05.rst
+++ b/doc/guides/rel_notes/release_20_05.rst
@@ -66,6 +66,8 @@ New Features
Added tracepoints in ``EAL``, ``ethdev``, ``cryptodev``, ``eventdev`` and
``mempool`` libraries for important functions.
+* **ethdev: Added a new value to link speed for 200Gbps **
+
* **Added new API for rte_ring.**
* New synchronization modes for rte_ring.
diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
index a360ecc..a1cbb2e 100644
--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
@@ -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
diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c
index d7d3bc7..47f11b9 100644
--- a/drivers/net/mlx5/mlx5_ethdev.c
+++ b/drivers/net/mlx5/mlx5_ethdev.c
@@ -86,6 +86,7 @@ struct ethtool_link_settings {
uint32_t link_mode_masks[];
};
+/* The kernel values can be found in /include/uapi/linux/ethtool.h */
#define ETHTOOL_GLINKSETTINGS 0x0000004c
#define ETHTOOL_LINK_MODE_1000baseT_Full_BIT 5
#define ETHTOOL_LINK_MODE_Autoneg_BIT 6
@@ -119,6 +120,13 @@ struct ethtool_link_settings {
#define ETHTOOL_LINK_MODE_100000baseCR4_Full_BIT 38
#define ETHTOOL_LINK_MODE_100000baseLR4_ER4_Full_BIT 39
#endif
+#ifndef HAVE_ETHTOOL_LINK_MODE_200G
+#define ETHTOOL_LINK_MODE_200000baseKR4_Full_BIT 62
+#define ETHTOOL_LINK_MODE_200000baseSR4_Full_BIT 63
+#define ETHTOOL_LINK_MODE_200000baseLR4_ER4_FR4_Full_BIT 0 /* 64 - 64 */
+#define ETHTOOL_LINK_MODE_200000baseDR4_Full_BIT 1 /* 65 - 64 */
+#define ETHTOOL_LINK_MODE_200000baseCR4_Full_BIT 2 /* 66 - 64 */
+#endif
/**
* Get master interface name from private structure.
@@ -537,7 +545,8 @@ mlx5_set_default_params(struct rte_eth_dev *dev, struct rte_eth_dev_info *info)
info->default_txportconf.ring_size = 256;
info->default_rxportconf.burst_size = MLX5_RX_DEFAULT_BURST;
info->default_txportconf.burst_size = MLX5_TX_DEFAULT_BURST;
- if (priv->link_speed_capa & ETH_LINK_SPEED_100G) {
+ if ((priv->link_speed_capa & ETH_LINK_SPEED_200G) |
+ (priv->link_speed_capa & ETH_LINK_SPEED_100G)) {
info->default_rxportconf.nb_queues = 16;
info->default_txportconf.nb_queues = 16;
if (dev->data->nb_rx_queues > 2 ||
@@ -1028,6 +1037,17 @@ mlx5_link_update_unlocked_gs(struct rte_eth_dev *dev,
MLX5_BITSHIFT(ETHTOOL_LINK_MODE_100000baseCR4_Full_BIT) |
MLX5_BITSHIFT(ETHTOOL_LINK_MODE_100000baseLR4_ER4_Full_BIT)))
priv->link_speed_capa |= ETH_LINK_SPEED_100G;
+ if (sc & (MLX5_BITSHIFT(ETHTOOL_LINK_MODE_200000baseKR4_Full_BIT) |
+ MLX5_BITSHIFT(ETHTOOL_LINK_MODE_200000baseSR4_Full_BIT)))
+ priv->link_speed_capa |= ETH_LINK_SPEED_200G;
+
+ sc = ecmd->link_mode_masks[2] |
+ ((uint64_t)ecmd->link_mode_masks[3] << 32);
+ if (sc & (MLX5_BITSHIFT(ETHTOOL_LINK_MODE_200000baseCR4_Full_BIT) |
+ MLX5_BITSHIFT(
+ ETHTOOL_LINK_MODE_200000baseLR4_ER4_FR4_Full_BIT) |
+ MLX5_BITSHIFT(ETHTOOL_LINK_MODE_200000baseDR4_Full_BIT)))
+ priv->link_speed_capa |= ETH_LINK_SPEED_200G;
dev_link.link_duplex = ((ecmd->duplex == DUPLEX_HALF) ?
ETH_LINK_HALF_DUPLEX : ETH_LINK_FULL_DUPLEX);
dev_link.link_autoneg = !(dev->data->dev_conf.link_speeds &
diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
index 72aed59..a64df8f 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
@@ -1099,6 +1099,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;
}
diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index 0f6d053..a49242b 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -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.
--
2.7.4
^ permalink raw reply [flat|nested] 13+ messages in thread
* [dpdk-dev] [PATCH v3] net/mlx5: add 200G link speed
2020-05-06 10:58 ` [dpdk-dev] [PATCH v2] net/mlx5: add 200G " Asaf Penso
2020-05-06 12:07 ` [dpdk-dev] [PATCH v3] " Asaf Penso
@ 2020-05-06 12:22 ` Asaf Penso
2020-05-06 12:59 ` Ferruh Yigit
2020-05-06 20:24 ` Ferruh Yigit
1 sibling, 2 replies; 13+ messages in thread
From: Asaf Penso @ 2020-05-06 12:22 UTC (permalink / raw)
To: thomas, ferruh.yigit, arybchenko, viacheslavo, matan; +Cc: dev
There is no way to report back a link speed of 200Gbps.
Adding 200G link speed.
Signed-off-by: Asaf Penso <asafp@mellanox.com>
---
v2 - reword commit log and remove 400G
v3 - rebase and fix checkpatch warning
---
app/test-pmd/cmdline.c | 12 +++++++-----
doc/guides/rel_notes/release_20_05.rst | 2 ++
doc/guides/testpmd_app_ug/testpmd_funcs.rst | 2 +-
drivers/net/mlx5/mlx5_ethdev.c | 22 +++++++++++++++++++++-
lib/librte_ethdev/rte_ethdev.c | 2 ++
lib/librte_ethdev/rte_ethdev.h | 2 ++
6 files changed, 35 insertions(+), 7 deletions(-)
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 1375f22..e6c6b68 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -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"
@@ -1619,6 +1619,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 {
@@ -1666,7 +1668,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 =
@@ -1677,7 +1679,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,
@@ -1741,7 +1743,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");
@@ -1753,7 +1755,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,
diff --git a/doc/guides/rel_notes/release_20_05.rst b/doc/guides/rel_notes/release_20_05.rst
index 777d36e..eb8a623 100644
--- a/doc/guides/rel_notes/release_20_05.rst
+++ b/doc/guides/rel_notes/release_20_05.rst
@@ -66,6 +66,8 @@ New Features
Added tracepoints in ``EAL``, ``ethdev``, ``cryptodev``, ``eventdev`` and
``mempool`` libraries for important functions.
+* **ethdev: Added a new value to link speed for 200Gbps **
+
* **Added new API for rte_ring.**
* New synchronization modes for rte_ring.
diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
index a360ecc..a1cbb2e 100644
--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
@@ -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
diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c
index d7d3bc7..47f11b9 100644
--- a/drivers/net/mlx5/mlx5_ethdev.c
+++ b/drivers/net/mlx5/mlx5_ethdev.c
@@ -86,6 +86,7 @@ struct ethtool_link_settings {
uint32_t link_mode_masks[];
};
+/* The kernel values can be found in /include/uapi/linux/ethtool.h */
#define ETHTOOL_GLINKSETTINGS 0x0000004c
#define ETHTOOL_LINK_MODE_1000baseT_Full_BIT 5
#define ETHTOOL_LINK_MODE_Autoneg_BIT 6
@@ -119,6 +120,13 @@ struct ethtool_link_settings {
#define ETHTOOL_LINK_MODE_100000baseCR4_Full_BIT 38
#define ETHTOOL_LINK_MODE_100000baseLR4_ER4_Full_BIT 39
#endif
+#ifndef HAVE_ETHTOOL_LINK_MODE_200G
+#define ETHTOOL_LINK_MODE_200000baseKR4_Full_BIT 62
+#define ETHTOOL_LINK_MODE_200000baseSR4_Full_BIT 63
+#define ETHTOOL_LINK_MODE_200000baseLR4_ER4_FR4_Full_BIT 0 /* 64 - 64 */
+#define ETHTOOL_LINK_MODE_200000baseDR4_Full_BIT 1 /* 65 - 64 */
+#define ETHTOOL_LINK_MODE_200000baseCR4_Full_BIT 2 /* 66 - 64 */
+#endif
/**
* Get master interface name from private structure.
@@ -537,7 +545,8 @@ mlx5_set_default_params(struct rte_eth_dev *dev, struct rte_eth_dev_info *info)
info->default_txportconf.ring_size = 256;
info->default_rxportconf.burst_size = MLX5_RX_DEFAULT_BURST;
info->default_txportconf.burst_size = MLX5_TX_DEFAULT_BURST;
- if (priv->link_speed_capa & ETH_LINK_SPEED_100G) {
+ if ((priv->link_speed_capa & ETH_LINK_SPEED_200G) |
+ (priv->link_speed_capa & ETH_LINK_SPEED_100G)) {
info->default_rxportconf.nb_queues = 16;
info->default_txportconf.nb_queues = 16;
if (dev->data->nb_rx_queues > 2 ||
@@ -1028,6 +1037,17 @@ mlx5_link_update_unlocked_gs(struct rte_eth_dev *dev,
MLX5_BITSHIFT(ETHTOOL_LINK_MODE_100000baseCR4_Full_BIT) |
MLX5_BITSHIFT(ETHTOOL_LINK_MODE_100000baseLR4_ER4_Full_BIT)))
priv->link_speed_capa |= ETH_LINK_SPEED_100G;
+ if (sc & (MLX5_BITSHIFT(ETHTOOL_LINK_MODE_200000baseKR4_Full_BIT) |
+ MLX5_BITSHIFT(ETHTOOL_LINK_MODE_200000baseSR4_Full_BIT)))
+ priv->link_speed_capa |= ETH_LINK_SPEED_200G;
+
+ sc = ecmd->link_mode_masks[2] |
+ ((uint64_t)ecmd->link_mode_masks[3] << 32);
+ if (sc & (MLX5_BITSHIFT(ETHTOOL_LINK_MODE_200000baseCR4_Full_BIT) |
+ MLX5_BITSHIFT(
+ ETHTOOL_LINK_MODE_200000baseLR4_ER4_FR4_Full_BIT) |
+ MLX5_BITSHIFT(ETHTOOL_LINK_MODE_200000baseDR4_Full_BIT)))
+ priv->link_speed_capa |= ETH_LINK_SPEED_200G;
dev_link.link_duplex = ((ecmd->duplex == DUPLEX_HALF) ?
ETH_LINK_HALF_DUPLEX : ETH_LINK_FULL_DUPLEX);
dev_link.link_autoneg = !(dev->data->dev_conf.link_speeds &
diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
index 72aed59..a64df8f 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
@@ -1099,6 +1099,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;
}
diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index 0f6d053..a49242b 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -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.
--
2.7.4
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [dpdk-dev] [PATCH v3] net/mlx5: add 200G link speed
2020-05-06 12:22 ` Asaf Penso
@ 2020-05-06 12:59 ` Ferruh Yigit
2020-05-06 13:17 ` Thomas Monjalon
2020-05-06 20:24 ` Ferruh Yigit
1 sibling, 1 reply; 13+ messages in thread
From: Ferruh Yigit @ 2020-05-06 12:59 UTC (permalink / raw)
To: Asaf Penso, thomas, arybchenko, viacheslavo, matan; +Cc: dev
On 5/6/2020 1:22 PM, Asaf Penso wrote:
> There is no way to report back a link speed of 200Gbps.
>
> Adding 200G link speed.
>
> Signed-off-by: Asaf Penso <asafp@mellanox.com>
> ---
> v2 - reword commit log and remove 400G
>
> v3 - rebase and fix checkpatch warning
> ---
> app/test-pmd/cmdline.c | 12 +++++++-----
> doc/guides/rel_notes/release_20_05.rst | 2 ++
> doc/guides/testpmd_app_ug/testpmd_funcs.rst | 2 +-
> drivers/net/mlx5/mlx5_ethdev.c | 22 +++++++++++++++++++++-
> lib/librte_ethdev/rte_ethdev.c | 2 ++
> lib/librte_ethdev/rte_ethdev.h | 2 ++
> 6 files changed, 35 insertions(+), 7 deletions(-)
Hi Asaf,
Patch looks good, but it updates ethdev & testpmd to have 200G defines and mlx5
to use it, so net/mlx5 prefix not really fits to the patch, can you separate
mlx5 changes into another patch?
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [dpdk-dev] [PATCH v3] net/mlx5: add 200G link speed
2020-05-06 12:59 ` Ferruh Yigit
@ 2020-05-06 13:17 ` Thomas Monjalon
2020-05-06 14:01 ` Ferruh Yigit
0 siblings, 1 reply; 13+ messages in thread
From: Thomas Monjalon @ 2020-05-06 13:17 UTC (permalink / raw)
To: Ferruh Yigit; +Cc: Asaf Penso, arybchenko, viacheslavo, matan, dev
06/05/2020 14:59, Ferruh Yigit:
> On 5/6/2020 1:22 PM, Asaf Penso wrote:
> > There is no way to report back a link speed of 200Gbps.
> >
> > Adding 200G link speed.
> >
> > Signed-off-by: Asaf Penso <asafp@mellanox.com>
> > ---
> > v2 - reword commit log and remove 400G
> >
> > v3 - rebase and fix checkpatch warning
> > ---
> > app/test-pmd/cmdline.c | 12 +++++++-----
> > doc/guides/rel_notes/release_20_05.rst | 2 ++
> > doc/guides/testpmd_app_ug/testpmd_funcs.rst | 2 +-
> > drivers/net/mlx5/mlx5_ethdev.c | 22 +++++++++++++++++++++-
> > lib/librte_ethdev/rte_ethdev.c | 2 ++
> > lib/librte_ethdev/rte_ethdev.h | 2 ++
> > 6 files changed, 35 insertions(+), 7 deletions(-)
>
> Hi Asaf,
>
> Patch looks good, but it updates ethdev & testpmd to have 200G defines and mlx5
> to use it, so net/mlx5 prefix not really fits to the patch, can you separate
> mlx5 changes into another patch?
I think I was the one advising to squash all.
The reason is that the changes in testpmd and ethdev are
simple and mechanical.
The real change is in mlx5 in my opinion, but I'm fine with splitting as well.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [dpdk-dev] [PATCH v3] net/mlx5: add 200G link speed
2020-05-06 12:07 ` [dpdk-dev] [PATCH v3] " Asaf Penso
@ 2020-05-06 13:43 ` Slava Ovsiienko
0 siblings, 0 replies; 13+ messages in thread
From: Slava Ovsiienko @ 2020-05-06 13:43 UTC (permalink / raw)
To: Asaf Penso, Thomas Monjalon, ferruh.yigit, arybchenko, Matan Azrad; +Cc: dev
> -----Original Message-----
> From: Asaf Penso <asafp@mellanox.com>
> Sent: Wednesday, May 6, 2020 15:07
> To: Thomas Monjalon <thomas@monjalon.net>; ferruh.yigit@intel.com;
> arybchenko@solarflare.com; Slava Ovsiienko <viacheslavo@mellanox.com>;
> Matan Azrad <matan@mellanox.com>
> Cc: dev@dpdk.org
> Subject: [PATCH v3] net/mlx5: 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>
For the mlx5-related part:
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
> ---
> app/test-pmd/cmdline.c | 12 +++++++-----
> doc/guides/rel_notes/release_20_05.rst | 2 ++
> doc/guides/testpmd_app_ug/testpmd_funcs.rst | 2 +-
> drivers/net/mlx5/mlx5_ethdev.c | 22 +++++++++++++++++++++-
> lib/librte_ethdev/rte_ethdev.c | 2 ++
> lib/librte_ethdev/rte_ethdev.h | 2 ++
> 6 files changed, 35 insertions(+), 7 deletions(-)
>
> diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index
> 1375f22..e6c6b68 100644
> --- a/app/test-pmd/cmdline.c
> +++ b/app/test-pmd/cmdline.c
> @@ -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"
>
> @@ -1619,6 +1619,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 {
> @@ -1666,7 +1668,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 =
> @@ -1677,7 +1679,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,
> @@ -1741,7 +1743,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");
> @@ -1753,7 +1755,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,
> diff --git a/doc/guides/rel_notes/release_20_05.rst
> b/doc/guides/rel_notes/release_20_05.rst
> index 777d36e..eb8a623 100644
> --- a/doc/guides/rel_notes/release_20_05.rst
> +++ b/doc/guides/rel_notes/release_20_05.rst
> @@ -66,6 +66,8 @@ New Features
> Added tracepoints in ``EAL``, ``ethdev``, ``cryptodev``, ``eventdev`` and
> ``mempool`` libraries for important functions.
>
> +* **ethdev: Added a new value to link speed for 200Gbps **
> +
> * **Added new API for rte_ring.**
>
> * New synchronization modes for rte_ring.
> diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
> b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
> index a360ecc..a1cbb2e 100644
> --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
> +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
> @@ -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
> diff --git a/drivers/net/mlx5/mlx5_ethdev.c
> b/drivers/net/mlx5/mlx5_ethdev.c index d7d3bc7..47f11b9 100644
> --- a/drivers/net/mlx5/mlx5_ethdev.c
> +++ b/drivers/net/mlx5/mlx5_ethdev.c
> @@ -86,6 +86,7 @@ struct ethtool_link_settings {
> uint32_t link_mode_masks[];
> };
>
> +/* The kernel values can be found in /include/uapi/linux/ethtool.h */
> #define ETHTOOL_GLINKSETTINGS 0x0000004c #define
> ETHTOOL_LINK_MODE_1000baseT_Full_BIT 5 #define
> ETHTOOL_LINK_MODE_Autoneg_BIT 6 @@ -119,6 +120,13 @@ struct
> ethtool_link_settings { #define
> ETHTOOL_LINK_MODE_100000baseCR4_Full_BIT 38 #define
> ETHTOOL_LINK_MODE_100000baseLR4_ER4_Full_BIT 39 #endif
> +#ifndef HAVE_ETHTOOL_LINK_MODE_200G
> +#define ETHTOOL_LINK_MODE_200000baseKR4_Full_BIT 62 #define
> +ETHTOOL_LINK_MODE_200000baseSR4_Full_BIT 63 #define
> +ETHTOOL_LINK_MODE_200000baseLR4_ER4_FR4_Full_BIT 0 /* 64 - 64 */
> +#define ETHTOOL_LINK_MODE_200000baseDR4_Full_BIT 1 /* 65 - 64 */
> +#define ETHTOOL_LINK_MODE_200000baseCR4_Full_BIT 2 /* 66 - 64 */
> #endif
>
> /**
> * Get master interface name from private structure.
> @@ -537,7 +545,8 @@ mlx5_set_default_params(struct rte_eth_dev *dev,
> struct rte_eth_dev_info *info)
> info->default_txportconf.ring_size = 256;
> info->default_rxportconf.burst_size = MLX5_RX_DEFAULT_BURST;
> info->default_txportconf.burst_size = MLX5_TX_DEFAULT_BURST;
> - if (priv->link_speed_capa & ETH_LINK_SPEED_100G) {
> + if ((priv->link_speed_capa & ETH_LINK_SPEED_200G) |
> + (priv->link_speed_capa & ETH_LINK_SPEED_100G)) {
> info->default_rxportconf.nb_queues = 16;
> info->default_txportconf.nb_queues = 16;
> if (dev->data->nb_rx_queues > 2 ||
> @@ -1028,6 +1037,17 @@ mlx5_link_update_unlocked_gs(struct
> rte_eth_dev *dev,
>
> MLX5_BITSHIFT(ETHTOOL_LINK_MODE_100000baseCR4_Full_BIT) |
>
> MLX5_BITSHIFT(ETHTOOL_LINK_MODE_100000baseLR4_ER4_Full_BIT)))
> priv->link_speed_capa |= ETH_LINK_SPEED_100G;
> + if (sc &
> (MLX5_BITSHIFT(ETHTOOL_LINK_MODE_200000baseKR4_Full_BIT) |
> +
> MLX5_BITSHIFT(ETHTOOL_LINK_MODE_200000baseSR4_Full_BIT)))
> + priv->link_speed_capa |= ETH_LINK_SPEED_200G;
> +
> + sc = ecmd->link_mode_masks[2] |
> + ((uint64_t)ecmd->link_mode_masks[3] << 32);
> + if (sc &
> (MLX5_BITSHIFT(ETHTOOL_LINK_MODE_200000baseCR4_Full_BIT) |
> + MLX5_BITSHIFT(
> +
> ETHTOOL_LINK_MODE_200000baseLR4_ER4_FR4_Full_BIT) |
> +
> MLX5_BITSHIFT(ETHTOOL_LINK_MODE_200000baseDR4_Full_BIT)))
> + priv->link_speed_capa |= ETH_LINK_SPEED_200G;
> dev_link.link_duplex = ((ecmd->duplex == DUPLEX_HALF) ?
> ETH_LINK_HALF_DUPLEX :
> ETH_LINK_FULL_DUPLEX);
> dev_link.link_autoneg = !(dev->data->dev_conf.link_speeds & diff --
> git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c index
> 72aed59..a64df8f 100644
> --- a/lib/librte_ethdev/rte_ethdev.c
> +++ b/lib/librte_ethdev/rte_ethdev.c
> @@ -1099,6 +1099,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;
> }
> diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
> index 0f6d053..a49242b 100644
> --- a/lib/librte_ethdev/rte_ethdev.h
> +++ b/lib/librte_ethdev/rte_ethdev.h
> @@ -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.
> --
> 2.7.4
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [dpdk-dev] [PATCH v3] net/mlx5: add 200G link speed
2020-05-06 13:17 ` Thomas Monjalon
@ 2020-05-06 14:01 ` Ferruh Yigit
2020-05-06 14:19 ` Thomas Monjalon
0 siblings, 1 reply; 13+ messages in thread
From: Ferruh Yigit @ 2020-05-06 14:01 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: Asaf Penso, arybchenko, viacheslavo, matan, dev
On 5/6/2020 2:17 PM, Thomas Monjalon wrote:
> 06/05/2020 14:59, Ferruh Yigit:
>> On 5/6/2020 1:22 PM, Asaf Penso wrote:
>>> There is no way to report back a link speed of 200Gbps.
>>>
>>> Adding 200G link speed.
>>>
>>> Signed-off-by: Asaf Penso <asafp@mellanox.com>
>>> ---
>>> v2 - reword commit log and remove 400G
>>>
>>> v3 - rebase and fix checkpatch warning
>>> ---
>>> app/test-pmd/cmdline.c | 12 +++++++-----
>>> doc/guides/rel_notes/release_20_05.rst | 2 ++
>>> doc/guides/testpmd_app_ug/testpmd_funcs.rst | 2 +-
>>> drivers/net/mlx5/mlx5_ethdev.c | 22 +++++++++++++++++++++-
>>> lib/librte_ethdev/rte_ethdev.c | 2 ++
>>> lib/librte_ethdev/rte_ethdev.h | 2 ++
>>> 6 files changed, 35 insertions(+), 7 deletions(-)
>>
>> Hi Asaf,
>>
>> Patch looks good, but it updates ethdev & testpmd to have 200G defines and mlx5
>> to use it, so net/mlx5 prefix not really fits to the patch, can you separate
>> mlx5 changes into another patch?
>
> I think I was the one advising to squash all.
> The reason is that the changes in testpmd and ethdev are
> simple and mechanical.
> The real change is in mlx5 in my opinion, but I'm fine with splitting as well.
>
Agree the real change is in the PMD and rest is mechanical, my concern was if we
need to refer the ethdev or testpmd change later, we will need to use commit
"net/mlx5: ..." which may be confusing.
I think ethdev, testpmd & doc can be combined into one "ethdev: ..." and PMD
implementation into other patch.
Does it make sense?
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [dpdk-dev] [PATCH v3] net/mlx5: add 200G link speed
2020-05-06 14:01 ` Ferruh Yigit
@ 2020-05-06 14:19 ` Thomas Monjalon
2020-05-06 14:22 ` Ferruh Yigit
0 siblings, 1 reply; 13+ messages in thread
From: Thomas Monjalon @ 2020-05-06 14:19 UTC (permalink / raw)
To: Ferruh Yigit; +Cc: dev, Asaf Penso, arybchenko, viacheslavo, matan, dev
06/05/2020 16:01, Ferruh Yigit:
> On 5/6/2020 2:17 PM, Thomas Monjalon wrote:
> > 06/05/2020 14:59, Ferruh Yigit:
> >> On 5/6/2020 1:22 PM, Asaf Penso wrote:
> >>> There is no way to report back a link speed of 200Gbps.
> >>>
> >>> Adding 200G link speed.
> >>>
> >>> Signed-off-by: Asaf Penso <asafp@mellanox.com>
> >>> ---
> >>> v2 - reword commit log and remove 400G
> >>>
> >>> v3 - rebase and fix checkpatch warning
> >>> ---
> >>> app/test-pmd/cmdline.c | 12 +++++++-----
> >>> doc/guides/rel_notes/release_20_05.rst | 2 ++
> >>> doc/guides/testpmd_app_ug/testpmd_funcs.rst | 2 +-
> >>> drivers/net/mlx5/mlx5_ethdev.c | 22 +++++++++++++++++++++-
> >>> lib/librte_ethdev/rte_ethdev.c | 2 ++
> >>> lib/librte_ethdev/rte_ethdev.h | 2 ++
> >>> 6 files changed, 35 insertions(+), 7 deletions(-)
> >>
> >> Hi Asaf,
> >>
> >> Patch looks good, but it updates ethdev & testpmd to have 200G defines and mlx5
> >> to use it, so net/mlx5 prefix not really fits to the patch, can you separate
> >> mlx5 changes into another patch?
> >
> > I think I was the one advising to squash all.
> > The reason is that the changes in testpmd and ethdev are
> > simple and mechanical.
> > The real change is in mlx5 in my opinion, but I'm fine with splitting as well.
> >
>
> Agree the real change is in the PMD and rest is mechanical, my concern was if we
> need to refer the ethdev or testpmd change later, we will need to use commit
> "net/mlx5: ..." which may be confusing.
>
> I think ethdev, testpmd & doc can be combined into one "ethdev: ..." and PMD
> implementation into other patch.
>
> Does it make sense?
Yes I understand your concern about future reference.
I am OK with what you propose:
1/ ethdev: add 200G link speed
2/ net/mlx5: support 200G link speed
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [dpdk-dev] [PATCH v3] net/mlx5: add 200G link speed
2020-05-06 14:19 ` Thomas Monjalon
@ 2020-05-06 14:22 ` Ferruh Yigit
2020-05-06 14:23 ` Asaf Penso
0 siblings, 1 reply; 13+ messages in thread
From: Ferruh Yigit @ 2020-05-06 14:22 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: dev, Asaf Penso, arybchenko, viacheslavo, matan
On 5/6/2020 3:19 PM, Thomas Monjalon wrote:
> 06/05/2020 16:01, Ferruh Yigit:
>> On 5/6/2020 2:17 PM, Thomas Monjalon wrote:
>>> 06/05/2020 14:59, Ferruh Yigit:
>>>> On 5/6/2020 1:22 PM, Asaf Penso wrote:
>>>>> There is no way to report back a link speed of 200Gbps.
>>>>>
>>>>> Adding 200G link speed.
>>>>>
>>>>> Signed-off-by: Asaf Penso <asafp@mellanox.com>
>>>>> ---
>>>>> v2 - reword commit log and remove 400G
>>>>>
>>>>> v3 - rebase and fix checkpatch warning
>>>>> ---
>>>>> app/test-pmd/cmdline.c | 12 +++++++-----
>>>>> doc/guides/rel_notes/release_20_05.rst | 2 ++
>>>>> doc/guides/testpmd_app_ug/testpmd_funcs.rst | 2 +-
>>>>> drivers/net/mlx5/mlx5_ethdev.c | 22 +++++++++++++++++++++-
>>>>> lib/librte_ethdev/rte_ethdev.c | 2 ++
>>>>> lib/librte_ethdev/rte_ethdev.h | 2 ++
>>>>> 6 files changed, 35 insertions(+), 7 deletions(-)
>>>>
>>>> Hi Asaf,
>>>>
>>>> Patch looks good, but it updates ethdev & testpmd to have 200G defines and mlx5
>>>> to use it, so net/mlx5 prefix not really fits to the patch, can you separate
>>>> mlx5 changes into another patch?
>>>
>>> I think I was the one advising to squash all.
>>> The reason is that the changes in testpmd and ethdev are
>>> simple and mechanical.
>>> The real change is in mlx5 in my opinion, but I'm fine with splitting as well.
>>>
>>
>> Agree the real change is in the PMD and rest is mechanical, my concern was if we
>> need to refer the ethdev or testpmd change later, we will need to use commit
>> "net/mlx5: ..." which may be confusing.
>>
>> I think ethdev, testpmd & doc can be combined into one "ethdev: ..." and PMD
>> implementation into other patch.
>>
>> Does it make sense?
>
> Yes I understand your concern about future reference.
> I am OK with what you propose:
> 1/ ethdev: add 200G link speed
> 2/ net/mlx5: support 200G link speed
>
OK I will split while merging.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [dpdk-dev] [PATCH v3] net/mlx5: add 200G link speed
2020-05-06 14:22 ` Ferruh Yigit
@ 2020-05-06 14:23 ` Asaf Penso
0 siblings, 0 replies; 13+ messages in thread
From: Asaf Penso @ 2020-05-06 14:23 UTC (permalink / raw)
To: Ferruh Yigit, Thomas Monjalon
Cc: dev, arybchenko, Slava Ovsiienko, Matan Azrad
Regards,
Asaf Penso
> -----Original Message-----
> From: Ferruh Yigit <ferruh.yigit@intel.com>
> Sent: Wednesday, May 6, 2020 5:23 PM
> To: Thomas Monjalon <thomas@monjalon.net>
> Cc: dev@dpdk.org; Asaf Penso <asafp@mellanox.com>;
> arybchenko@solarflare.com; Slava Ovsiienko <viacheslavo@mellanox.com>;
> Matan Azrad <matan@mellanox.com>
> Subject: Re: [dpdk-dev] [PATCH v3] net/mlx5: add 200G link speed
>
> On 5/6/2020 3:19 PM, Thomas Monjalon wrote:
> > 06/05/2020 16:01, Ferruh Yigit:
> >> On 5/6/2020 2:17 PM, Thomas Monjalon wrote:
> >>> 06/05/2020 14:59, Ferruh Yigit:
> >>>> On 5/6/2020 1:22 PM, Asaf Penso wrote:
> >>>>> There is no way to report back a link speed of 200Gbps.
> >>>>>
> >>>>> Adding 200G link speed.
> >>>>>
> >>>>> Signed-off-by: Asaf Penso <asafp@mellanox.com>
> >>>>> ---
> >>>>> v2 - reword commit log and remove 400G
> >>>>>
> >>>>> v3 - rebase and fix checkpatch warning
> >>>>> ---
> >>>>> app/test-pmd/cmdline.c | 12 +++++++-----
> >>>>> doc/guides/rel_notes/release_20_05.rst | 2 ++
> >>>>> doc/guides/testpmd_app_ug/testpmd_funcs.rst | 2 +-
> >>>>> drivers/net/mlx5/mlx5_ethdev.c | 22
> +++++++++++++++++++++-
> >>>>> lib/librte_ethdev/rte_ethdev.c | 2 ++
> >>>>> lib/librte_ethdev/rte_ethdev.h | 2 ++
> >>>>> 6 files changed, 35 insertions(+), 7 deletions(-)
> >>>>
> >>>> Hi Asaf,
> >>>>
> >>>> Patch looks good, but it updates ethdev & testpmd to have 200G
> defines and mlx5
> >>>> to use it, so net/mlx5 prefix not really fits to the patch, can you
> separate
> >>>> mlx5 changes into another patch?
> >>>
> >>> I think I was the one advising to squash all.
> >>> The reason is that the changes in testpmd and ethdev are
> >>> simple and mechanical.
> >>> The real change is in mlx5 in my opinion, but I'm fine with splitting as
> well.
> >>>
> >>
> >> Agree the real change is in the PMD and rest is mechanical, my concern
> was if we
> >> need to refer the ethdev or testpmd change later, we will need to use
> commit
> >> "net/mlx5: ..." which may be confusing.
> >>
> >> I think ethdev, testpmd & doc can be combined into one "ethdev: ..." and
> PMD
> >> implementation into other patch.
> >>
> >> Does it make sense?
> >
> > Yes I understand your concern about future reference.
> > I am OK with what you propose:
> > 1/ ethdev: add 200G link speed
> > 2/ net/mlx5: support 200G link speed
> >
>
> OK I will split while merging.
Great, thanks for the assistance.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [dpdk-dev] [PATCH v3] net/mlx5: add 200G link speed
2020-05-06 12:22 ` Asaf Penso
2020-05-06 12:59 ` Ferruh Yigit
@ 2020-05-06 20:24 ` Ferruh Yigit
1 sibling, 0 replies; 13+ messages in thread
From: Ferruh Yigit @ 2020-05-06 20:24 UTC (permalink / raw)
To: Asaf Penso, thomas, arybchenko, viacheslavo, matan; +Cc: dev
On 5/6/2020 1:22 PM, Asaf Penso wrote:
> There is no way to report back a link speed of 200Gbps.
>
> Adding 200G link speed.
>
> Signed-off-by: Asaf Penso <asafp@mellanox.com>
The doc warning fixed [1] and patch split into two as discussed [2] while merging.
For ethdev part,
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Applied to dpdk-next-net/master, thanks.
[1]
WARNING: Inline strong start-string without end-string.
[2]
ethdev: add 200G link speed
net/mlx5: support 200G link speed
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2020-05-06 20:25 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-21 13:44 [dpdk-dev] [PATCH] net/mlx5: add 200G and 400G link speed Asaf Penso
2020-04-22 16:29 ` Ajit Khaparde
2020-05-06 10:58 ` [dpdk-dev] [PATCH v2] net/mlx5: add 200G " Asaf Penso
2020-05-06 12:07 ` [dpdk-dev] [PATCH v3] " Asaf Penso
2020-05-06 13:43 ` Slava Ovsiienko
2020-05-06 12:22 ` Asaf Penso
2020-05-06 12:59 ` Ferruh Yigit
2020-05-06 13:17 ` Thomas Monjalon
2020-05-06 14:01 ` Ferruh Yigit
2020-05-06 14:19 ` Thomas Monjalon
2020-05-06 14:22 ` Ferruh Yigit
2020-05-06 14:23 ` Asaf Penso
2020-05-06 20:24 ` 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).