From nobody Wed Sep 16 14:13:06 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 4hlLSz0j5rz6rXC6 for ; Wed, 16 Sep 2026 14:13:07 +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 4hlLSy6TYLz3MM2 for ; Wed, 16 Sep 2026 14:13:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1789567986; 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=V3uFF1G2JYVQyh1eZyAbllIgNduJHngQXFuwZcdUBNI=; b=yoL3oasnnUn3m9GIyscF44o1rdVcew6Leac1EbwU41esepzKXpjKS6wS4McPaOzIBxnXTO oV4K4d4aqG+hre+ztsmYRPpfXjfpf21xXG6TpM7SSiLgegwZFDzCqr3vS/f8TT5duJ+My1 xiv2eGqWH8lHHOvfQtc8L/5PwjiF/o1AKe8+y+N1x9F5Mw9EGGMZEdIVyNeAgNW7WMV51P iDjcDO5bIo2HD3Y3H7Rv01Lk5LN9g+7you1Deh78C4rgW+OTwntb3X2shJzh6w55hIMN5s k1hbPaTdgMU7oxs/V49XYYodpT6861fi56pBdcePOyGMzb2NklNAy2Q6sPxgCQ== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1789567987; b=dvDfuO5007pQaIh1gSmMqIqygnIY955kKfMBoR5jjIP+elfRTf4pHmyTcd4e+FGycZVU37 Jo9niH/5ug7wL875uJ5NCaGhCUgcxsSozzJ8N+rUhRdAa6Z/CHiO1Jf3jWaCu3NdMRe0tx mm0ZZl1forz2B5lbZ/Xgje1UqtWQSqbQZTBnOBLu0w4uM4zr/UNd0WdcApIcTUMAILdLG0 itEEbQru5txGxMx5z4nUc+PDfaPlGvH1aql8uHFlWeN5hrTM+5f7SekU6l8Sdt8Xxt83/R 6QD119YcmT++Av6sbY1ZhQDWJV8Vp308DC3nYchNql5V0Kk7Sfd5Fsj95dKrzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1789567987; 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=V3uFF1G2JYVQyh1eZyAbllIgNduJHngQXFuwZcdUBNI=; b=AR3duX2+eDkZK0ZTNeCgwkRHorxIQdQlH/5VMMW6UZHfKUdzOUromB8fPBVvXyBfcT8+6+ Y57bV4tCLapen37YeMWhgDwodi/U395Vwn9ffS59OsrxnZ4Bl+L5da8RTuZp4RdnUccRnn n4GVLp07/CYKC/YQXYlWR4fUZZvuM7jVcO+uz8O9JsiZkjjJwQ8VBZDXumM+sFN6zt2Pnz rb++PlZZgTXLjUQhF1RG8lVAqLMAkU8BiBqhyiiE3CZBw4k793OB+4nDQ8VCxGiSQsU3ly gzDwZPSUDxPgkrAbUfwaB/lmF0tbCL7G/EdJS6Nz78lOLp+5rXnSviZ0/OThnw== 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 4hlLSy5WrSzr4w for ; Wed, 16 Sep 2026 14:13:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 37336 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 16 Sep 2026 14:13:06 +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: 43767135124c - main - fixup! libmlx5: Fix ABI break from revising the UAR pointer 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: 43767135124c9f4c2c0308aaa787135c699a8370 Auto-Submitted: auto-generated Date: Wed, 16 Sep 2026 14:13:06 +0000 Message-Id: <6aaaa3f2.37336.386838bc@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=43767135124c9f4c2c0308aaa787135c699a8370 commit 43767135124c9f4c2c0308aaa787135c699a8370 Author: Ariel Ehrenberg AuthorDate: 2026-07-28 10:39:02 +0000 Commit: Konstantin Belousov CommitDate: 2026-09-16 14:12:08 +0000 fixup! libmlx5: Fix ABI break from revising the UAR pointer Actually provide the two ABI versions this commit describes: export mlx5dv_init_obj@@MLX5_1.2 with the current behaviour and a compat mlx5dv_init_obj@MLX5_1.0 that restores the historical 'void **' value, and list the symbol under both versions in libmlx5.map. Binaries linked against the old version keep resolving. Sponsored by: NVidia networking MFC after: 1 month --- contrib/ofed/libmlx5/libmlx5.map | 1 + contrib/ofed/libmlx5/mlx5.c | 32 +++++++++++++++++++++++++++++++- 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/contrib/ofed/libmlx5/libmlx5.map b/contrib/ofed/libmlx5/libmlx5.map index 976b8cf35849..e7fe9f416970 100644 --- a/contrib/ofed/libmlx5/libmlx5.map +++ b/contrib/ofed/libmlx5/libmlx5.map @@ -3,6 +3,7 @@ MLX5_1.0 { global: mlx5dv_query_device; + mlx5dv_init_obj; local: *; }; diff --git a/contrib/ofed/libmlx5/mlx5.c b/contrib/ofed/libmlx5/mlx5.c index ef6c833c5a31..b3eba331d89f 100644 --- a/contrib/ofed/libmlx5/mlx5.c +++ b/contrib/ofed/libmlx5/mlx5.c @@ -750,7 +750,7 @@ static int mlx5dv_get_srq(struct ibv_srq *srq_in, return 0; } -int mlx5dv_init_obj(struct mlx5dv_obj *obj, uint64_t obj_type) +static int _mlx5dv_init_obj(struct mlx5dv_obj *obj, uint64_t obj_type) { int ret = 0; @@ -766,6 +766,36 @@ int mlx5dv_init_obj(struct mlx5dv_obj *obj, uint64_t obj_type) return ret; } +/* + * mlx5dv_init_obj is exported with two ABI versions so that binaries linked + * against the historical symbol keep working after the mlx5dv_cq UAR field was + * revised. The current implementation (MLX5_1.2) leaves mlx5dv_cq.cq_uar set + * to the CQ's UAR register (a 'void *'). The MLX5_1.0 compat wrapper restores + * the historical 'void **' value at that location. + */ +int mlx5dv_init_obj_1_2(struct mlx5dv_obj *obj, uint64_t obj_type); +int mlx5dv_init_obj_1_0(struct mlx5dv_obj *obj, uint64_t obj_type); + +int mlx5dv_init_obj_1_2(struct mlx5dv_obj *obj, uint64_t obj_type) +{ + return _mlx5dv_init_obj(obj, obj_type); +} + +int mlx5dv_init_obj_1_0(struct mlx5dv_obj *obj, uint64_t obj_type) +{ + int ret; + + ret = _mlx5dv_init_obj(obj, obj_type); + if (!ret && (obj_type & MLX5DV_OBJ_CQ)) { + /* ABI version 1.0 returns the 'void **' at this location. */ + obj->cq.out->cq_uar = to_mctx(obj->cq.in->context)->uar; + } + return ret; +} + +__asm__(".symver mlx5dv_init_obj_1_2, mlx5dv_init_obj@@MLX5_1.2"); +__asm__(".symver mlx5dv_init_obj_1_0, mlx5dv_init_obj@MLX5_1.0"); + static void adjust_uar_info(struct mlx5_device *mdev, struct mlx5_context *context, struct mlx5_alloc_ucontext_resp resp)