From owner-svn-src-stable-11@freebsd.org Thu May 16 18:09:36 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3EA9715A2A9C; Thu, 16 May 2019 18:09:36 +0000 (UTC) (envelope-from hselasky@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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D8A746CA13; Thu, 16 May 2019 18:09:35 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B3689246BB; Thu, 16 May 2019 18:09:35 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4GI9ZCo028540; Thu, 16 May 2019 18:09:35 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4GI9ZxH028538; Thu, 16 May 2019 18:09:35 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201905161809.x4GI9ZxH028538@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 16 May 2019 18:09:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r347858 - in stable/11/contrib/ofed/libibverbs: . examples X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/11/contrib/ofed/libibverbs: . examples X-SVN-Commit-Revision: 347858 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D8A746CA13 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.975,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 May 2019 18:09:36 -0000 Author: hselasky Date: Thu May 16 18:09:34 2019 New Revision: 347858 URL: https://svnweb.freebsd.org/changeset/base/347858 Log: MFC r347302: Add support for 200Gbit speeds to libibverbs. Submitted by: slavash@ Sponsored by: Mellanox Technologies Modified: stable/11/contrib/ofed/libibverbs/examples/devinfo.c stable/11/contrib/ofed/libibverbs/verbs.c stable/11/contrib/ofed/libibverbs/verbs.h Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/ofed/libibverbs/examples/devinfo.c ============================================================================== --- stable/11/contrib/ofed/libibverbs/examples/devinfo.c Thu May 16 18:08:33 2019 (r347857) +++ stable/11/contrib/ofed/libibverbs/examples/devinfo.c Thu May 16 18:09:34 2019 (r347858) @@ -128,6 +128,7 @@ static const char *width_str(uint8_t width) case 2: return "4"; case 4: return "8"; case 8: return "12"; + case 16: return "2"; default: return "invalid width"; } } @@ -143,6 +144,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"; default: return "invalid speed"; } } Modified: stable/11/contrib/ofed/libibverbs/verbs.c ============================================================================== --- stable/11/contrib/ofed/libibverbs/verbs.c Thu May 16 18:08:33 2019 (r347857) +++ stable/11/contrib/ofed/libibverbs/verbs.c Thu May 16 18:09:34 2019 (r347858) @@ -111,6 +111,10 @@ int __attribute__((const)) ibv_rate_to_mult(enum ibv_r case IBV_RATE_60_GBPS: return 24; case IBV_RATE_80_GBPS: return 32; case IBV_RATE_120_GBPS: return 48; + case IBV_RATE_28_GBPS: return 11; + case IBV_RATE_50_GBPS: return 20; + case IBV_RATE_400_GBPS: return 160; + case IBV_RATE_600_GBPS: return 240; default: return -1; } } @@ -127,6 +131,10 @@ enum ibv_rate __attribute__((const)) mult_to_ibv_rate( case 24: return IBV_RATE_60_GBPS; case 32: return IBV_RATE_80_GBPS; case 48: return IBV_RATE_120_GBPS; + case 11: return IBV_RATE_28_GBPS; + case 20: return IBV_RATE_50_GBPS; + case 160: return IBV_RATE_400_GBPS; + case 240: return IBV_RATE_600_GBPS; default: return IBV_RATE_MAX; } } @@ -151,6 +159,10 @@ int __attribute__((const)) ibv_rate_to_mbps(enum ibv_ case IBV_RATE_100_GBPS: return 103125; case IBV_RATE_200_GBPS: return 206250; case IBV_RATE_300_GBPS: return 309375; + case IBV_RATE_28_GBPS: return 28125; + case IBV_RATE_50_GBPS: return 53125; + case IBV_RATE_400_GBPS: return 425000; + case IBV_RATE_600_GBPS: return 637500; default: return -1; } } @@ -175,6 +187,10 @@ enum ibv_rate __attribute__((const)) mbps_to_ibv_rate( case 103125: return IBV_RATE_100_GBPS; case 206250: return IBV_RATE_200_GBPS; case 309375: return IBV_RATE_300_GBPS; + case 28125: return IBV_RATE_28_GBPS; + case 53125: return IBV_RATE_50_GBPS; + case 425000: return IBV_RATE_400_GBPS; + case 637500: return IBV_RATE_600_GBPS; default: return IBV_RATE_MAX; } } Modified: stable/11/contrib/ofed/libibverbs/verbs.h ============================================================================== --- stable/11/contrib/ofed/libibverbs/verbs.h Thu May 16 18:08:33 2019 (r347857) +++ stable/11/contrib/ofed/libibverbs/verbs.h Thu May 16 18:09:34 2019 (r347858) @@ -590,7 +590,11 @@ enum ibv_rate { IBV_RATE_25_GBPS = 15, IBV_RATE_100_GBPS = 16, IBV_RATE_200_GBPS = 17, - IBV_RATE_300_GBPS = 18 + IBV_RATE_300_GBPS = 18, + IBV_RATE_28_GBPS = 19, + IBV_RATE_50_GBPS = 20, + IBV_RATE_400_GBPS = 21, + IBV_RATE_600_GBPS = 22, }; /**