git: 1aa593b90ca9 - main - ibcore: Add support for NDR link speed.

From: Hans Petter Selasky <hselasky_at_FreeBSD.org>
Date: Mon, 21 Feb 2022 08:40:10 UTC
The branch main has been updated by hselasky:

URL: https://cgit.FreeBSD.org/src/commit/?id=1aa593b90ca96acb0d996daef9739ec98538f0db

commit 1aa593b90ca96acb0d996daef9739ec98538f0db
Author:     Hans Petter Selasky <hselasky@FreeBSD.org>
AuthorDate: 2022-02-21 08:25:10 +0000
Commit:     Hans Petter Selasky <hselasky@FreeBSD.org>
CommitDate: 2022-02-21 08:35:19 +0000

    ibcore: Add support for NDR link speed.
    
    Add new IBTA speed NDR, supporting signaling rate of 100Gb.
    
    Linux commit:
    c7adf7717301558e8852949d8e3dc3748d1a4a97
    
    MFC after:      1 week
    Sponsored by:   NVIDIA Networking
---
 sys/ofed/drivers/infiniband/core/ib_sysfs.c | 4 ++++
 sys/ofed/include/rdma/ib_verbs.h            | 3 ++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/sys/ofed/drivers/infiniband/core/ib_sysfs.c b/sys/ofed/drivers/infiniband/core/ib_sysfs.c
index 806f4aba6c76..4cbb69ad899b 100644
--- a/sys/ofed/drivers/infiniband/core/ib_sysfs.c
+++ b/sys/ofed/drivers/infiniband/core/ib_sysfs.c
@@ -277,6 +277,10 @@ static ssize_t rate_show(struct ib_port *p, struct port_attribute *unused,
 		speed = " HDR";
 		rate = 500;
 		break;
+	case IB_SPEED_NDR:
+		speed = " NDR";
+		rate = 1000;
+		break;
 	case IB_SPEED_SDR:
 	default:		/* default to SDR for invalid rates */
 		speed = " SDR";
diff --git a/sys/ofed/include/rdma/ib_verbs.h b/sys/ofed/include/rdma/ib_verbs.h
index 065ff65ab517..c69cc1ab9a07 100644
--- a/sys/ofed/include/rdma/ib_verbs.h
+++ b/sys/ofed/include/rdma/ib_verbs.h
@@ -486,7 +486,8 @@ enum ib_port_speed {
 	IB_SPEED_FDR10	= 8,
 	IB_SPEED_FDR	= 16,
 	IB_SPEED_EDR	= 32,
-	IB_SPEED_HDR	= 64
+	IB_SPEED_HDR	= 64,
+	IB_SPEED_NDR	= 128
 };
 
 /**