From nobody Wed Sep 16 14:13:28 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4hlLTP2D0kz6rXVK for ; Wed, 16 Sep 2026 14:13:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "YR2" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4hlLTP0Ts1z3Nbb for ; Wed, 16 Sep 2026 14:13:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1789568009; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GDN/LWeCX+L2MnQZtpqS2nhhLBmRidfurPFNASYrm5E=; b=jIUDilwLAvo3Zo+OGyrlGyyirVtV9vZnVZIGDsjQyQ+oq2/JK3EDZ4whwcP0nsECtPBU5e E/8FqRTQ0vqRjJUth8DSfsUlJodAC1T/0mdRX6TdP6FGboVAnpapU76JZP+/0/ZWziPk3B S3kYTOD657CDOOpW3fxEw6u8kwVCOcoE0h3WFYtKJzOd5eN3hlUrKSkyFjAsRrO2tg8suZ 9xkx5qUaNUlthLrgd9pRAWT+hb5rPAl+gajaaoWjAF8Vy+PFX9f3O6vb+V2p/ZwJOGP3AU bHbcNv12nHY2QRjQF6ZpT0JlxKCgSTBmmDNZIYKHtlTLqLw0nJzgHGOKbnSaMw== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1789568009; b=Z/e4cY8j8beLRheemznnFCJdusFkop3B0s2jCmlGWZsUDf5gp+lYooMjVfh1zc7XpVlsI2 gQ2yNg8ER073Qe4dDeQSDRgykikdH98U9+G2xi0UUrzM22m55mJKUaKgzYTfDl7jEzj5Gc yweWjtZxXdPvArbndGZbr3lJvvsTIkuTzTNbsFbbiKOstGJOh4fmRiYQGVWGCcWlzcqBbr VxmCyWzK5g21pGE/AD0nvSUlh1PPchPwNPNiESe7yDG4gvpq3nhIOZ92bjN6IUw4yhtR4m 7v+su4dU9Qn4wrQR9c/pIed+4u0RJ3F+iR3tAaYAfWY87USLK8JukDv3DO6g4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1789568009; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GDN/LWeCX+L2MnQZtpqS2nhhLBmRidfurPFNASYrm5E=; b=dhmnfhM9IlUZgfWzn2HEtMnLh46dF5Ia8JKsp0loUmv0C/0WXj/KpcSoX3b/L9bDxEGiW1 BtQllOH+KuvIZkjpWJE3uGbXe7UuE8aPhZ3YsK7XR/2qW12nbqilrgO4KQJBvCmK5+R8FG jckeZKjuU3q6jf+0rm798UY1nlFUwF81ql9lC+1NL0BzJZsp96F0rkjhxQUf3J0RsIjfqW qPEhqMqMNy5g3m9CMPK5GLIcIukzyrahihZf9DL4PcV26BT+BFM0Lg8tjGh0DFk8UrZcWV 8EuTJ6O7g1B90zlKHFu8NoUP+DYOxSFJvjp9iUfadSYcaTb0Mx67incVW0EzwA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hlLTN6g9Mzr5D for ; Wed, 16 Sep 2026 14:13:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 35fdc by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 16 Sep 2026 14:13:28 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Ariel Ehrenberg From: Konstantin Belousov Subject: git: 966d4c21b186 - main - fixup! IB/mlx5: Expose GRE flow spec to user-kernel ABI header List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 966d4c21b186dfafda58d3d586fbe7f02299fb5e Auto-Submitted: auto-generated Date: Wed, 16 Sep 2026 14:13:28 +0000 Message-Id: <6aaaa408.35fdc.49134488@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=966d4c21b186dfafda58d3d586fbe7f02299fb5e commit 966d4c21b186dfafda58d3d586fbe7f02299fb5e Author: Ariel Ehrenberg AuthorDate: 2026-07-28 12:02:55 +0000 Commit: Konstantin Belousov CommitDate: 2026-09-16 14:12:10 +0000 fixup! IB/mlx5: Expose GRE flow spec to user-kernel ABI header Import Linux upstream commit a93b632c4531 ("IB/mlx5: Fix GRE flow specification"). Honour the user-supplied GRE protocol mask instead of hard-coding 0xffff, so wildcard and partial masks work. Also give flow_spec_data[] 8-byte alignment, so this userspace copy of struct ib_uverbs_flow_spec_hdr matches the kernel UAPI on 32-bit builds. The kernel header has always used __aligned_u64 here and only our copy diverged, so there is no upstream commit for that half. The attribute is spelled out instead of introducing an __aligned_u64 macro, which does not provide and which libbnxtre already defines for itself. Sponsored by: NVidia networking MFC after: 1 month --- contrib/ofed/libibverbs/kern-abi.h | 2 +- sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/ofed/libibverbs/kern-abi.h b/contrib/ofed/libibverbs/kern-abi.h index 74cf407840e9..d5ed405d08c7 100644 --- a/contrib/ofed/libibverbs/kern-abi.h +++ b/contrib/ofed/libibverbs/kern-abi.h @@ -960,7 +960,7 @@ struct __ib_uverbs_flow_spec_hdr { __u16 size; __u16 reserved; /* followed by flow_spec */ - __u64 flow_spec_data[0]; + __u64 __attribute__((aligned(8))) flow_spec_data[0]; }; /* Define in rdma/ib_user_verbs.h after refactoring OFED - start */ diff --git a/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c b/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c index f9c2c2a1b310..306116a7eee7 100644 --- a/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c +++ b/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c @@ -2209,7 +2209,7 @@ static int parse_flow_attr(u32 *match_c, u32 *match_v, IPPROTO_GRE); MLX5_SET(fte_match_set_misc, misc_params_c, gre_protocol, - 0xffff); + ntohs(ib_spec->gre.mask.protocol)); MLX5_SET(fte_match_set_misc, misc_params_v, gre_protocol, ntohs(ib_spec->gre.val.protocol));