|SUCCESS| [v2] net/mlx5: query hardware capability for max lro size
dpdklab at iol.unh.edu
dpdklab at iol.unh.edu
Sat Apr 25 00:42:59 CEST 2026
Test-Label: ai-code-review
Test-Status: SUCCESS
https://dpdk.org/patch/163289
_AI Code Review_
=== Patch Review: series.patch (via Claude) ===
Review date: 2026-04-24
8a3f7b2c1e4d5a6f7890abcd1234567890ef1234
Author: Rayane Boussanni <rboussanni at gmail.com>
net/mlx5: query hardware capability for max lro size
Resolve a FIXME in mlx5_dev_infos_get() by dynamically checking the
lro_allowed flag instead of unconditionally advertising
MLX5_MAX_LRO_SIZE.
> diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c
> index a29cdeeb50..734ce0e60d 100644
> --- a/drivers/net/mlx5/mlx5_ethdev.c
> +++ b/drivers/net/mlx5/mlx5_ethdev.c
> @@ -363,9 +363,9 @@ mlx5_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *info)
> info->min_mtu = priv->min_mtu;
> info->max_mtu = priv->max_mtu;
> info->max_rx_pktlen = info->max_mtu + MLX5_ETH_OVERHEAD;
> - /* FIXME: we should ask the device for these values. */
> info->min_rx_bufsize = 32;
> - info->max_lro_pkt_size = MLX5_MAX_LRO_SIZE;
> + info->max_lro_pkt_size = priv->sh->config.lro_allowed ?
> + MLX5_MAX_LRO_SIZE : 0;
Does this code safely handle cases where priv->sh or priv->sh->config
might be NULL? In mlx5_dev_infos_get(), can priv->sh be accessed without
validation?
The ternary operator formatting here introduces misaligned continuation.
DPDK coding style requires the '?' and ':' to align with the assignment
operator, or for complex expressions to be broken into separate if/else
blocks for better readability.
> /*
> * Since we need one CQ per QP, the limit is the minimum number
> * between the two values.
More information about the test-report
mailing list