git: 17a322cae64a - stable/14 - mlx5en: follow PRM for setting the max hw lro segment size
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 20 Mar 2025 03:14:03 UTC
The branch stable/14 has been updated by kib:
URL: https://cgit.FreeBSD.org/src/commit/?id=17a322cae64a152a2c36c58c3af938c50ca5241d
commit 17a322cae64a152a2c36c58c3af938c50ca5241d
Author: Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2025-02-05 03:05:35 +0000
Commit: Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2025-03-20 03:13:37 +0000
mlx5en: follow PRM for setting the max hw lro segment size
(cherry picked from commit c3555174fd97ce12682e5ed1e2d2586016962a8f)
---
sys/dev/mlx5/mlx5_en/mlx5_en_main.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c
index 99554526bb28..191a48039a22 100644
--- a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c
+++ b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c
@@ -2942,10 +2942,8 @@ mlx5e_get_rss_key(void *key_ptr)
static void
mlx5e_hw_lro_set_tir_ctx_lro_max_msg_sz(struct mlx5e_priv *priv, u32 *tirc)
{
-#define ROUGH_MAX_L2_L3_HDR_SZ 256
-
- MLX5_SET(tirc, tirc, lro_max_msg_sz, (priv->params.lro_wqe_sz -
- ROUGH_MAX_L2_L3_HDR_SZ) >> 8);
+ MLX5_SET(tirc, tirc, lro_max_msg_sz, (priv->params.lro_wqe_sz >> 8) -
+ (MLX5_CAP_ETH(priv->mdev, lro_max_msg_sz_mode) == 0 ? 1 : 0));
}
static void