From nobody Sat Mar 15 04:45:04 2025 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 4ZF7vN5cg2z5rKnJ; Sat, 15 Mar 2025 04:45:04 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZF7vN4RQlz47wH; Sat, 15 Mar 2025 04:45:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742013904; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tC04kHGsmrRKz11m7TQH/I0FzclomJ2c/cmbQz3J7Lg=; b=f/mBYTORNT/WVY85kZdi8AJXKPjwASHlHyHKGztTOTfHn+miNzqYApTACI9OK9roClhZK7 OzURqbj9uspR3L8s70Pu8YhLpWhjl219NEQ8lxu8tmM85VZZsgkq8YxYXoakjZEk9Q4fjL w1TT3Gy/yLcF+xNeW5gGOHl9HHQVGYe+QbXVJQl3dZxNBiEnWBgtKYWDRuR4L0kIBnBrLp 4CSTdtRQRLWOQ3r2JyESFCzbo89ljGWwdk7WtRLQGgtg7lpezldpHLGXFq1O6E1rnfleuI k9fAZu1+5g/t0CWhP37J/i5j9alDBu7JJPZfq4BMrFcuc0l2DL157MOFGsTt1w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742013904; a=rsa-sha256; cv=none; b=BFNEHd3EksLZVXYXf2UrBUfjo+13a9isvsZl5Btr53KFhkINu51oVwxvLT2YTzOnMhqFb1 V7+yoUJT3rF0xcFfPjG6vTOgCgvskNr4FkEA781NXqmo4qlB74PKqzh/Nixn6VCkb/r1vK F1YidkV1tdFd3UiECAuMus2ciizUQslmkYIZn4DDKsy4/eciVFBzWXVRIqyLznsEhVyDMQ g11BDav1JIeKyqSSpOUqtk37L9DFkno8S3tYyx2LR6HqBsrVq29+8bfP2urKIibzuoaEoG QkDi1dWDqFQtv4NECJdi/9mFHE8NVWV9hQW5niWKmLlYxYepQ7NbEwct27kJyw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742013904; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tC04kHGsmrRKz11m7TQH/I0FzclomJ2c/cmbQz3J7Lg=; b=BPq9DDgNdmNamo5j/gjh7h2UHoL8ClEO49YDStVSdzgtpVRXRQagZG8eI9nDC2rHjiMDO3 Cy1ZeQs7QmX8Ii8dfX6e7sWvDBt2jdgfyopW1KMW9DGhoOm4Pv+Z8DDiNN1E37277TZQld 1gwmzlyhoeLULuAq2QNDBrTSYC1/L2kYx8jix/xOq4aZ3UoZpS8JwbloonbF2bH5hH6iFs X2xk+WxEs+S6wOSLohsOddaoaEJTYljC0PO7Yn0u9eTXaAZWj0/FvOLKOAKbVWia5HLisS v1WeY0LQ84jXYWZdIoicblVsWN0xw5x7Xj13T6fY7wACT8Q7wIyvd5D13liZFA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZF7vN3g6vz1F5H; Sat, 15 Mar 2025 04:45:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 52F4j4PE079528; Sat, 15 Mar 2025 04:45:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52F4j4Gp079525; Sat, 15 Mar 2025 04:45:04 GMT (envelope-from git) Date: Sat, 15 Mar 2025 04:45:04 GMT Message-Id: <202503150445.52F4j4Gp079525@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 5963423232e8 - main - libibverbs: Extend support of NDR rates 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 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: 5963423232e869b8dbe8e9a65134e92735dfb521 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=5963423232e869b8dbe8e9a65134e92735dfb521 commit 5963423232e869b8dbe8e9a65134e92735dfb521 Author: Slava Shwartsman AuthorDate: 2025-03-12 08:49:37 +0000 Commit: Konstantin Belousov CommitDate: 2025-03-15 04:44:07 +0000 libibverbs: Extend support of NDR rates NDR(106.25 Gbps) support exposed new data rates: 800 Gbps - NDR 8x. 1200 Gbps - NDR 12x. Utility methods were updated to support the new rates mentioned above: 1) Rate to mult - Convert the IB rate enum to a multiple of 2.5 Gbps. 2) Rate to mbps - Convert IB rate enum to the mbps value. In addition, speed_str() of ibv_devinfo was updated to consider the new NDR rate. Reference: IB Spec Release 1.5 PR: 285305 MFC after: 1 week Sponsored by: NVidia networking Change-Id: I77541e406f700585fbfeddc162d5a0e7b79a1c11 Signed-off-by: Slava Shwartsman --- contrib/ofed/libibverbs/examples/devinfo.c | 1 + contrib/ofed/libibverbs/verbs.c | 8 ++++++++ contrib/ofed/libibverbs/verbs.h | 2 ++ 3 files changed, 11 insertions(+) diff --git a/contrib/ofed/libibverbs/examples/devinfo.c b/contrib/ofed/libibverbs/examples/devinfo.c index 7693cb30739d..866d82718f7d 100644 --- a/contrib/ofed/libibverbs/examples/devinfo.c +++ b/contrib/ofed/libibverbs/examples/devinfo.c @@ -145,6 +145,7 @@ static const char *speed_str(uint8_t speed) case 16: return "14.0 Gbps"; case 32: return "25.0 Gbps"; case 64: return "50.0 Gbps"; + case 128: return "100.0 Gbps"; default: return "invalid speed"; } } diff --git a/contrib/ofed/libibverbs/verbs.c b/contrib/ofed/libibverbs/verbs.c index 5c23406e69e7..c24a29926c22 100644 --- a/contrib/ofed/libibverbs/verbs.c +++ b/contrib/ofed/libibverbs/verbs.c @@ -115,6 +115,8 @@ int __attribute__((const)) ibv_rate_to_mult(enum ibv_rate rate) case IBV_RATE_50_GBPS: return 20; case IBV_RATE_400_GBPS: return 160; case IBV_RATE_600_GBPS: return 240; + case IBV_RATE_800_GBPS: return 320; + case IBV_RATE_1200_GBPS: return 480; default: return -1; } } @@ -135,6 +137,8 @@ enum ibv_rate __attribute__((const)) mult_to_ibv_rate(int mult) case 20: return IBV_RATE_50_GBPS; case 160: return IBV_RATE_400_GBPS; case 240: return IBV_RATE_600_GBPS; + case 320: return IBV_RATE_800_GBPS; + case 480: return IBV_RATE_1200_GBPS; default: return IBV_RATE_MAX; } } @@ -163,6 +167,8 @@ int __attribute__((const)) ibv_rate_to_mbps(enum ibv_rate rate) case IBV_RATE_50_GBPS: return 53125; case IBV_RATE_400_GBPS: return 425000; case IBV_RATE_600_GBPS: return 637500; + case IBV_RATE_800_GBPS: return 850000; + case IBV_RATE_1200_GBPS: return 1275000; default: return -1; } } @@ -191,6 +197,8 @@ enum ibv_rate __attribute__((const)) mbps_to_ibv_rate(int mbps) case 53125: return IBV_RATE_50_GBPS; case 425000: return IBV_RATE_400_GBPS; case 637500: return IBV_RATE_600_GBPS; + case 850000: return IBV_RATE_800_GBPS; + case 1275000: return IBV_RATE_1200_GBPS; default: return IBV_RATE_MAX; } } diff --git a/contrib/ofed/libibverbs/verbs.h b/contrib/ofed/libibverbs/verbs.h index bea817e36fc9..63a9ddbb1538 100644 --- a/contrib/ofed/libibverbs/verbs.h +++ b/contrib/ofed/libibverbs/verbs.h @@ -595,6 +595,8 @@ enum ibv_rate { IBV_RATE_50_GBPS = 20, IBV_RATE_400_GBPS = 21, IBV_RATE_600_GBPS = 22, + IBV_RATE_800_GBPS = 23, + IBV_RATE_1200_GBPS = 24, }; /**