* Sets tx mbuf limiting parameters. * * @param dev * Pointer to Ethernet device. * @param[out] info * Info structure output buffer. */
| 279 | * Info structure output buffer. |
| 280 | */ |
| 281 | static void |
| 282 | mlx5_set_txlimit_params(struct rte_eth_dev *dev, struct rte_eth_dev_info *info) |
| 283 | { |
| 284 | struct mlx5_priv *priv = dev->data->dev_private; |
| 285 | struct mlx5_port_config *config = &priv->config; |
| 286 | unsigned int inlen; |
| 287 | uint16_t nb_max; |
| 288 | |
| 289 | inlen = (config->txq_inline_max == MLX5_ARG_UNSET) ? |
| 290 | MLX5_SEND_DEF_INLINE_LEN : |
| 291 | (unsigned int)config->txq_inline_max; |
| 292 | MLX5_ASSERT(config->txq_inline_min >= 0); |
| 293 | inlen = RTE_MAX(inlen, (unsigned int)config->txq_inline_min); |
| 294 | inlen = RTE_MIN(inlen, MLX5_WQE_SIZE_MAX + |
| 295 | MLX5_ESEG_MIN_INLINE_SIZE - |
| 296 | MLX5_WQE_CSEG_SIZE - |
| 297 | MLX5_WQE_ESEG_SIZE - |
| 298 | MLX5_WQE_DSEG_SIZE * 2); |
| 299 | nb_max = (MLX5_WQE_SIZE_MAX + |
| 300 | MLX5_ESEG_MIN_INLINE_SIZE - |
| 301 | MLX5_WQE_CSEG_SIZE - |
| 302 | MLX5_WQE_ESEG_SIZE - |
| 303 | MLX5_WQE_DSEG_SIZE - |
| 304 | inlen) / MLX5_WSEG_SIZE; |
| 305 | info->tx_desc_lim.nb_seg_max = nb_max; |
| 306 | info->tx_desc_lim.nb_mtu_seg_max = nb_max; |
| 307 | } |
| 308 | |
| 309 | /** |
| 310 | * Get maximal work queue size in WQEs |
no outgoing calls
no test coverage detected