[PATCH] net/mlx5: query hardware capability for max lro size
Rayane Boussanni
rboussanni at gmail.com
Mon Apr 20 20:48:08 CEST 2026
Resolve a FIXME in mlx5_dev_infos_get() by dynamically checking the
hardware lro_cap flag instead of unconditionally advertising
MLX5_MAX_LRO_SIZE. Retains the standard 32-byte fallback for
min_rx_bufsize.
Signed-off-by: Rayane Boussanni <rboussanni at gmail.com>
---
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..fb51de031b 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->cdev->config.hca_attr.lro_cap ?
+ MLX5_MAX_LRO_SIZE : 0;
/*
* Since we need one CQ per QP, the limit is the minimum number
* between the two values.
--
2.34.1
More information about the dev
mailing list