Resolve a FIXME in mlx5_dev_infos_get() by dynamically checking the lro_allowed flag instead of unconditionally advertising MLX5_MAX_LRO_SIZE.
Signed-off-by: Rayane Boussanni <[email protected]> --- Thank you Dariusz for the review! drivers/net/mlx5/mlx5_ethdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; /* * Since we need one CQ per QP, the limit is the minimum number * between the two values. -- 2.43.0.windows.1

