git: 4025818a5a32 - main - fixup! IB/mlx5: Expose software parsing for Raw Ethernet QP

From: Konstantin Belousov <kib_at_FreeBSD.org>
Date: Wed, 16 Sep 2026 14:13:04 UTC
The branch main has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=4025818a5a32150c551a46b6a08299288003c6b7

commit 4025818a5a32150c551a46b6a08299288003c6b7
Author:     Ariel Ehrenberg <aehrenberg@nvidia.com>
AuthorDate: 2026-07-28 10:39:01 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2026-09-16 14:12:08 +0000

    fixup! IB/mlx5: Expose software parsing for Raw Ethernet QP
    
    Report sw_parsing_caps using the same condition that enables software
    parsing on the SQ (both eth_net_offloads and swp), so what we advertise
    matches what the driver actually does.
    
    Sponsored by:   NVidia networking
    MFC after:      1 month
---
 sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c b/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c
index 960bc8985700..48ce8a00b66f 100644
--- a/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c
+++ b/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c
@@ -886,7 +886,8 @@ static int mlx5_ib_query_device(struct ib_device *ibdev,
 	if (field_avail(typeof(resp), sw_parsing_caps,
 			uhw->outlen)) {
 		resp.response_length += sizeof(resp.sw_parsing_caps);
-		if (MLX5_CAP_ETH(mdev, swp)) {
+		if (MLX5_CAP_GEN(mdev, eth_net_offloads) &&
+		    MLX5_CAP_ETH(mdev, swp)) {
 			resp.sw_parsing_caps.sw_parsing_offloads |=
 				MLX5_IB_SW_PARSING;