MCPcopy Create free account
hub / github.com/F-Stack/f-stack / mlx5_set_default_params

Function mlx5_set_default_params

dpdk/drivers/net/mlx5/mlx5_ethdev.c:241–271  ·  view source on GitHub ↗

* Sets default tuning parameters. * * @param dev * Pointer to Ethernet device. * @param[out] info * Info structure output buffer. */

Source from the content-addressed store, hash-verified

239 * Info structure output buffer.
240 */
241static void
242mlx5_set_default_params(struct rte_eth_dev *dev, struct rte_eth_dev_info *info)
243{
244 struct mlx5_priv *priv = dev->data->dev_private;
245
246 /* Minimum CPU utilization. */
247 info->default_rxportconf.ring_size = 256;
248 info->default_txportconf.ring_size = 256;
249 info->default_rxportconf.burst_size = MLX5_RX_DEFAULT_BURST;
250 info->default_txportconf.burst_size = MLX5_TX_DEFAULT_BURST;
251 if ((priv->link_speed_capa & RTE_ETH_LINK_SPEED_200G) |
252 (priv->link_speed_capa & RTE_ETH_LINK_SPEED_100G)) {
253 info->default_rxportconf.nb_queues = 16;
254 info->default_txportconf.nb_queues = 16;
255 if (dev->data->nb_rx_queues > 2 ||
256 dev->data->nb_tx_queues > 2) {
257 /* Max Throughput. */
258 info->default_rxportconf.ring_size = 2048;
259 info->default_txportconf.ring_size = 2048;
260 }
261 } else {
262 info->default_rxportconf.nb_queues = 8;
263 info->default_txportconf.nb_queues = 8;
264 if (dev->data->nb_rx_queues > 2 ||
265 dev->data->nb_tx_queues > 2) {
266 /* Max Throughput. */
267 info->default_rxportconf.ring_size = 4096;
268 info->default_txportconf.ring_size = 4096;
269 }
270 }
271}
272
273/**
274 * Sets tx mbuf limiting parameters.

Callers 1

mlx5_dev_infos_getFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected