From nobody Wed Sep 16 14:13:00 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 4hlLSr6dCvz6rWwG for ; Wed, 16 Sep 2026 14:13:00 +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 4hlLSr49KMz3M5y for ; Wed, 16 Sep 2026 14:13:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1789567980; 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=WS6pk9ZyiFzzCZarBI6BbWvLoe/lD5cpbGXyrRdfcPY=; b=Wkl76laaND82TkYXmTN1pVKpmf09RMAkT7khxWNM03xJedXMb2jTBMB2mV7ZIjLOvhiejj YRgS48d2uZj5XgR0UxsKVK8Ns82mL+ZzLmzWqfk6VZW9Q9S3BezDVJMUDeFhqNMvcE7VRT Iu0PiKAWaOosMgIX3DatGuyGbJKsn3uec706+aJFY4r/szFvRJXNsTXZWl/SM5HzaR/Qxk 5W6Qgtj/YHgyAQo8654aWGDM6xWf1QyXr8HdrWdINIKL7eT3rQnVteOX8Ypx2VjdOpwDPA M5hg5Tq1+4scweFAJKzdOKrER6ivDrnO6D6XmHlJYX/u83Gpt5cveidelxs91w== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1789567980; b=xXaD8LfX2fVYZU7Dn+XjIwayTwq1P3LUN+OEuTaXU/y4TT/+osdLDK/zb3UCIQCU6uXf9A 1T6iR+L9unfcgkEUI9nYrfWRWWrLECIcM3HFAO5FRQmlYr82m5OIcAVpjOb8o1iS58ZRgC SRcAK2YFOKYTA4VofKEF5rY5seVEVC8+GGXvN7zbrRWDKTllyqB+RCMNS4A7KEJdyM10rh wdc3Q+e1E+xrDUAWjfIXOy9E0LJIO15E8cXiZfsLmijOBmvUCE0Pn2UfRiJ9p9Xok72WfU 8nP0taDJxz34L5LCle/lw9CW5E5yMPtTcUBnB0S3ibJpvz1LTCAWw2jC1hBnFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1789567980; 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=WS6pk9ZyiFzzCZarBI6BbWvLoe/lD5cpbGXyrRdfcPY=; b=td2IK3uz7nVi5RKT5T3tu8EDx3+0/AZJie1BK5wL44PyiXLcd3epJewPomn7d5Fogfx+YX YHqz70qaLBWXpbBa4olPjmp0tlXJ1EN8OKobVpKc+3+zx53Gw0LsIdlH7vcyncePsbfQ6X QCpquWDjMEGNQOAXE5RZV+xYlH47bU4Ji3+rSSm7a4RRL2KDX2zJ7q4Lw197kYTW5GNKVW EmEm4cAfDK7hFDtMdY4lqHYq/3qTMa1xmyVmyz20rej716SJD5SIfn9Wnf/vQFWvqREzHv MDZ9+QsclkMmkgactTnVlJiQGqBrx4DCZwY11PGrp5jrEg3+H+nlZvwIKpOkLg== 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 4hlLSr0scLzr4p for ; Wed, 16 Sep 2026 14:13:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3718c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 16 Sep 2026 14:13:00 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Vag Singh From: Konstantin Belousov Subject: git: 18e57db978d6 - main - IB/mlx5: Report mlx5 packet pacing capabilities when querying device 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: 18e57db978d6a13afe316523210d3e8091efe1f9 Auto-Submitted: auto-generated Date: Wed, 16 Sep 2026 14:13:00 +0000 Message-Id: <6aaaa3ec.3718c.1d488168@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=18e57db978d6a13afe316523210d3e8091efe1f9 commit 18e57db978d6a13afe316523210d3e8091efe1f9 Author: Vag Singh AuthorDate: 2025-08-14 06:29:02 +0000 Commit: Konstantin Belousov CommitDate: 2026-09-16 14:12:08 +0000 IB/mlx5: Report mlx5 packet pacing capabilities when querying device [PATCH 15/31] FreeBSD OFED support for DPDK MLX5 PMD Enable mlx5 based hardware to report packet pacing capabilities from kernel to user space. Packet pacing allows to limit the rate to any number between the maximum and minimum, based on user settings. The capabilities are exposed to user space through query_device by uhw. The following capabilities are reported: - The maximum and minimum rate limit in kbps supported by packet pacing. - Bitmap showing which QP types are supported by packet pacing operation. Differential revision: https://reviews.freebsd.org/D32189 MFC after: 1 month --- sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c | 13 +++++++++++++ sys/ofed/include/uapi/rdma/mlx5-abi.h | 13 +++++++++++++ 2 files changed, 26 insertions(+) diff --git a/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c b/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c index 658bbd1a39ff..019780c2ed02 100644 --- a/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c +++ b/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c @@ -859,6 +859,19 @@ static int mlx5_ib_query_device(struct ib_device *ibdev, } } + if (field_avail(typeof(resp), packet_pacing_caps, uhw->outlen)) { + if (MLX5_CAP_QOS(mdev, packet_pacing) && + MLX5_CAP_GEN(mdev, qos)) { + resp.packet_pacing_caps.qp_rate_limit_max = + MLX5_CAP_QOS(mdev, packet_pacing_max_rate); + resp.packet_pacing_caps.qp_rate_limit_min = + MLX5_CAP_QOS(mdev, packet_pacing_min_rate); + resp.packet_pacing_caps.supported_qpts |= + 1 << IB_QPT_RAW_PACKET; + } + resp.response_length += sizeof(resp.packet_pacing_caps); + } + if (field_avail(typeof(resp), mlx5_ib_support_multi_pkt_send_wqes, uhw->outlen)) { resp.mlx5_ib_support_multi_pkt_send_wqes = diff --git a/sys/ofed/include/uapi/rdma/mlx5-abi.h b/sys/ofed/include/uapi/rdma/mlx5-abi.h index daa233cfcb58..f755bcd793b3 100644 --- a/sys/ofed/include/uapi/rdma/mlx5-abi.h +++ b/sys/ofed/include/uapi/rdma/mlx5-abi.h @@ -145,6 +145,18 @@ struct mlx5_ib_rss_caps { __u8 reserved[7]; }; +struct mlx5_packet_pacing_caps { + __u32 qp_rate_limit_min; + __u32 qp_rate_limit_max; /* In kpbs */ + + /* Corresponding bit will be set if qp type from + * 'enum ib_qp_type' is supported, e.g. + * supported_qpts |= 1 << IB_QPT_RAW_PACKET + */ + __u32 supported_qpts; + __u32 reserved; +}; + enum mlx5_ib_cqe_comp_res_format { MLX5_IB_CQE_RES_FORMAT_HASH = 1 << 0, MLX5_IB_CQE_RES_FORMAT_CSUM = 1 << 1, @@ -163,6 +175,7 @@ struct mlx5_ib_query_device_resp { struct mlx5_ib_tso_caps tso_caps; struct mlx5_ib_rss_caps rss_caps; struct mlx5_ib_cqe_comp_caps cqe_comp_caps; + struct mlx5_packet_pacing_caps packet_pacing_caps; __u32 mlx5_ib_support_multi_pkt_send_wqes; __u32 reserved; };