net/mlx5: update speed capabilities parsing on Linux
Subsystems (2)
PATCH 1/2 net/mlx5: update speed capabilities parsing on Linux
Ease maintenance of speed capabilities parsing from ethtool by using rte_eth_link_speed_g*().
Functions in ethdev library are simpler, more complete, and easier to maintain.
--- drivers/common/mlx5/linux/meson.build | 22 ---- drivers/net/mlx5/linux/mlx5_ethdev_os.c | 150 ++---------------------- 2 files changed, 7 insertions(+), 165 deletions(-)
drivers/common/mlx5/linux/meson.build +0 -22
@@ -146,28 +146,6 @@ has_sym_args = [ 'MLX5_OPCODE_WAIT' ], [ 'HAVE_MLX5_OPCODE_ACCESS_ASO', 'infiniband/mlx5dv.h', 'MLX5_OPCODE_ACCESS_ASO' ], - [ 'HAVE_SUPPORTED_40000baseKR4_Full', 'linux/ethtool.h', - 'SUPPORTED_40000baseKR4_Full' ], - [ 'HAVE_SUPPORTED_40000baseCR4_Full', 'linux/ethtool.h', - 'SUPPORTED_40000baseCR4_Full' ], - [ 'HAVE_SUPPORTED_40000baseSR4_Full', 'linux/ethtool.h', - 'SUPPORTED_40000baseSR4_Full' ], - [ 'HAVE_SUPPORTED_40000baseLR4_Full', 'linux/ethtool.h', - 'SUPPORTED_40000baseLR4_Full' ], - [ 'HAVE_SUPPORTED_56000baseKR4_Full', 'linux/ethtool.h', - 'SUPPORTED_56000baseKR4_Full' ], - [ 'HAVE_SUPPORTED_56000baseCR4_Full', 'linux/ethtool.h', - 'SUPPORTED_56000baseCR4_Full' ], - [ 'HAVE_SUPPORTED_56000baseSR4_Full', 'linux/ethtool.h', - 'SUPPORTED_56000baseSR4_Full' ], - [ 'HAVE_SUPPORTED_56000baseLR4_Full', 'linux/ethtool.h', - 'SUPPORTED_56000baseLR4_Full' ], - [ 'HAVE_ETHTOOL_LINK_MODE_25G', 'linux/ethtool.h', - 'ETHTOOL_LINK_MODE_25000baseCR_Full_BIT' ], - [ 'HAVE_ETHTOOL_LINK_MODE_50G', 'linux/ethtool.h', - 'ETHTOOL_LINK_MODE_50000baseCR2_Full_BIT' ], - [ 'HAVE_ETHTOOL_LINK_MODE_100G', 'linux/ethtool.h', - 'ETHTOOL_LINK_MODE_100000baseKR4_Full_BIT' ], [ 'HAVE_IFLA_NUM_VF', 'linux/if_link.h', 'IFLA_NUM_VF' ], [ 'HAVE_IFLA_EXT_MASK', 'linux/if_link.h',
drivers/net/mlx5/linux/mlx5_ethdev_os.c +7 -143
192 lines not on this page · raw message
Signature · 1 line
2.43.0
PATCH 2/2 net/mlx5: apply default tuning to future speeds
Some default parameters for number of queues and ring size are different starting with 100G speed capability.
Instead of checking all speed above 100G, make sure it is applied for any speed capability newer than 100G (including 400G for instance).
--- drivers/net/mlx5/mlx5_ethdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/mlx5/mlx5_ethdev.c +2 -2
@@ -242,8 +242,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 &RTE_ETH_LINK_SPEED_200G ) | - (priv->link_speed_capa &RTE_ETH_LINK_SPEED_100G )) { +if (priv->link_speed_capa >>rte_bsf32 (RTE_ETH_LINK_SPEED_100G )) { +/* if supports at least 100G */ info->default_rxportconf.nb_queues =16 ; info->default_txportconf.nb_queues =16 ; if (dev->data->nb_rx_queues > 2 ||
Signature · 1 line
2.43.0
RE: [PATCH 2/2] net/mlx5: apply default tuning to future speeds
Quoted 12 lines
-----Original Message-----
From: Thomas Monjalon <[email protected]>
Sent: Tuesday, March 5, 2024 14:13
To: [email protected]
Cc: Dariusz Sosnowski <[email protected]>; Slava Ovsiienko <[email protected]>; Ori Kam <[email protected]>; Suanming Mou <[email protected]>; Matan Azrad <[email protected]>
Subject: [PATCH 2/2] net/mlx5: apply default tuning to future speedsExternal email: Use caution opening links or attachments
Quoted 7 lines
Some default parameters for number of queues and ring size are different starting with 100G speed capability.
Instead of checking all speed above 100G, make sure it is applied for any speed capability newer than 100G (including 400G for instance).
Signed-off-by Thomas Monjalon <[email protected]>
Best regards,
Dariusz Sosnowski
Quoted 9 lines
-----Original Message-----
From: Thomas Monjalon <[email protected]>
Sent: Tuesday, March 5, 2024 14:13
To: [email protected]
Cc: Dariusz Sosnowski <[email protected]>; Slava Ovsiienko <[email protected]>; Ori Kam <[email protected]>; Suanming Mou <[email protected]>; Matan Azrad <[email protected]>
Subject: [PATCH 1/2] net/mlx5: update speed capabilities parsing on Linux
Quoted 8 lines
External email: Use caution opening links or attachments
Ease maintenance of speed capabilities parsing from ethtool by using rte_eth_link_speed_g*().
Functions in ethdev library are simpler, more complete, and easier to maintain.Signed-off-by Thomas Monjalon <[email protected]>
Best regards,
Dariusz Sosnowski
Hi,
Quoted 9 lines
-----Original Message-----
From: Thomas Monjalon <[email protected]>
Sent: Tuesday, March 5, 2024 3:13 PM
To: [email protected]
Cc: Dariusz Sosnowski <[email protected]>; Slava Ovsiienko <[email protected]>; Ori Kam <[email protected]>; Suanming Mou <[email protected]>; Matan Azrad <[email protected]>
Subject: [PATCH 1/2] net/mlx5: update speed capabilities parsing on Linux
Quoted 6 lines
Ease maintenance of speed capabilities parsing from ethtool by using rte_eth_link_speed_g*().
Functions in ethdev library are simpler, more complete, and easier to maintain.Signed-off-by Thomas Monjalon <[email protected]>
Series applied to next-net-mlx,
Kindest regards,
Raslan Darawsheh