DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Rayane Boussanni <rboussanni@gmail.com>
To: dev@dpdk.org
Cc: rasland@nvidia.com, Rayane Boussanni <rboussanni@gmail.com>
Subject: [PATCH] net/mlx5: query hardware capability for max lro size
Date: Mon, 20 Apr 2026 14:48:08 -0400	[thread overview]
Message-ID: <20260420184808.751-1-rboussanni@gmail.com> (raw)

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@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


             reply	other threads:[~2026-04-20 18:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-20 18:48 Rayane Boussanni [this message]
2026-04-24  8:52 ` [PATCH] net/mlx5: query hardware capability for max lro size Dariusz Sosnowski
2026-04-24 14:27   ` [PATCH v2] " Rayane Boussanni
2026-04-24 16:55     ` Dariusz Sosnowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260420184808.751-1-rboussanni@gmail.com \
    --to=rboussanni@gmail.com \
    --cc=dev@dpdk.org \
    --cc=rasland@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox