Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 May 2019 10:55:47 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r347301 - in head/sys/ofed: drivers/infiniband/core include/rdma
Message-ID:  <201905081055.x48AtlQ5057464@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Wed May  8 10:55:47 2019
New Revision: 347301
URL: https://svnweb.freebsd.org/changeset/base/347301

Log:
  Add new rates to ibcore.
  
  Add the new rates that were added to the Infiniband specification as part of
  HDR and 2x support.
  
  Submitted by:	slavash@
  MFC after:	3 days
  Sponsored by:	Mellanox Technologies

Modified:
  head/sys/ofed/drivers/infiniband/core/ib_verbs.c
  head/sys/ofed/include/rdma/ib_verbs.h

Modified: head/sys/ofed/drivers/infiniband/core/ib_verbs.c
==============================================================================
--- head/sys/ofed/drivers/infiniband/core/ib_verbs.c	Wed May  8 10:55:15 2019	(r347300)
+++ head/sys/ofed/drivers/infiniband/core/ib_verbs.c	Wed May  8 10:55:47 2019	(r347301)
@@ -136,6 +136,10 @@ __attribute_const__ int ib_rate_to_mult(enum ib_rate r
 	case IB_RATE_60_GBPS:  return 24;
 	case IB_RATE_80_GBPS:  return 32;
 	case IB_RATE_120_GBPS: return 48;
+	case IB_RATE_28_GBPS:  return  11;
+	case IB_RATE_50_GBPS:  return  20;
+	case IB_RATE_400_GBPS: return 160;
+	case IB_RATE_600_GBPS: return 240;
 	default:	       return -1;
 	}
 }
@@ -153,6 +157,18 @@ __attribute_const__ enum ib_rate mult_to_ib_rate(int m
 	case 24: return IB_RATE_60_GBPS;
 	case 32: return IB_RATE_80_GBPS;
 	case 48: return IB_RATE_120_GBPS;
+	case 6:   return IB_RATE_14_GBPS;
+	case 22:  return IB_RATE_56_GBPS;
+	case 45:  return IB_RATE_112_GBPS;
+	case 67:  return IB_RATE_168_GBPS;
+	case 10:  return IB_RATE_25_GBPS;
+	case 40:  return IB_RATE_100_GBPS;
+	case 80:  return IB_RATE_200_GBPS;
+	case 120: return IB_RATE_300_GBPS;
+	case 11:  return IB_RATE_28_GBPS;
+	case 20:  return IB_RATE_50_GBPS;
+	case 160: return IB_RATE_400_GBPS;
+	case 240: return IB_RATE_600_GBPS;
 	default: return IB_RATE_PORT_CURRENT;
 	}
 }
@@ -178,6 +194,10 @@ __attribute_const__ int ib_rate_to_mbps(enum ib_rate r
 	case IB_RATE_100_GBPS: return 103125;
 	case IB_RATE_200_GBPS: return 206250;
 	case IB_RATE_300_GBPS: return 309375;
+	case IB_RATE_28_GBPS:  return 28125;
+	case IB_RATE_50_GBPS:  return 53125;
+	case IB_RATE_400_GBPS: return 425000;
+	case IB_RATE_600_GBPS: return 637500;
 	default:	       return -1;
 	}
 }

Modified: head/sys/ofed/include/rdma/ib_verbs.h
==============================================================================
--- head/sys/ofed/include/rdma/ib_verbs.h	Wed May  8 10:55:15 2019	(r347300)
+++ head/sys/ofed/include/rdma/ib_verbs.h	Wed May  8 10:55:47 2019	(r347301)
@@ -398,6 +398,7 @@ enum ib_port_cap_flags {
 
 enum ib_port_width {
 	IB_WIDTH_1X	= 1,
+	IB_WIDTH_2X	= 16,
 	IB_WIDTH_4X	= 2,
 	IB_WIDTH_8X	= 4,
 	IB_WIDTH_12X	= 8
@@ -407,6 +408,7 @@ static inline int ib_width_enum_to_int(enum ib_port_wi
 {
 	switch (width) {
 	case IB_WIDTH_1X:  return  1;
+	case IB_WIDTH_2X:  return  2;
 	case IB_WIDTH_4X:  return  4;
 	case IB_WIDTH_8X:  return  8;
 	case IB_WIDTH_12X: return 12;
@@ -672,7 +674,11 @@ enum ib_rate {
 	IB_RATE_25_GBPS  = 15,
 	IB_RATE_100_GBPS = 16,
 	IB_RATE_200_GBPS = 17,
-	IB_RATE_300_GBPS = 18
+	IB_RATE_300_GBPS = 18,
+	IB_RATE_28_GBPS  = 19,
+	IB_RATE_50_GBPS  = 20,
+	IB_RATE_400_GBPS = 21,
+	IB_RATE_600_GBPS = 22,
 };
 
 /**



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201905081055.x48AtlQ5057464>