Skip to contentSkip to conversation

ib/core: handle FDR-10 link encoding

RFC PATCH In review Marcel Apfelbaum 2 participants 3 messages Sep 19, 2011 – Sep 20, 2011 2 messages not in the archive InfiniBand

lore
Share & tools
lore
#0 lore raw

RFC PATCH 2/4 ib/core: handle FDR-10 link encoding

Added support for new link encodings beyond the regular 8 to 10 bit encoding. For now only FDR-10 (64 to 66 bit encoding) is implemented.

---
 drivers/infiniband/core/sysfs.c |    2 +-
 include/rdma/ib_verbs.h         |    1 +
 2 files changed, 2 insertions(+), 1 deletion(-)
drivers/infiniband/core/sysfs.c +1 -1
Index: b/drivers/infiniband/core/sysfs.c
===================================================================
@@ -209,7 +209,7 @@ static ssize_t rate_show(struct ib_port
 			speed = " DDR";
 			break;
 		case 4:
-			speed = " QDR";
+			speed = attr.link_encoding == 0 ? " QDR" : " FDR10";
 			break;
 		}
 
include/rdma/ib_verbs.h +1 -0
Index: b/include/rdma/ib_verbs.h
===================================================================
@@ -319,6 +319,7 @@ struct ib_port_attr {
 	u8			active_speed;
 	u8                      phys_state;
 	u8                      ext_active_speed;
+	u8                      link_encoding;
 };
 
 enum ib_device_modify_flags {

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw
In reply to a message not in the archive
Quoted 18 lines

Index: b/drivers/infiniband/core/sysfs.c
===================================================================

drivers/infiniband/core/sysfs.c +1 -1
@@ -209,7 +209,7 @@ static ssize_t rate_show(struct ib_port
 			speed = " DDR";
 			break;
 		case 4:
-			speed = " QDR";
+			speed = attr.link_encoding == 0 ? " QDR" : " FDR10";
 			break;
 		}
 

Index: b/include/rdma/ib_verbs.h
===================================================================

include/rdma/ib_verbs.h struct ib_port_attr { · line 322

Quoted 4 lines
include/rdma/ib_verbs.h +1 -0
@@ -319,6 +319,7 @@ struct ib_port_attr {
 	u8			active_speed;
 	u8                      phys_state;
 	u8                      ext_active_speed;
+	u8                      link_encoding;

This is such a low level detail, that it doesn't make sense to me to expose it above verbs. --
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#4 lore raw
In reply to a message not in the archive

Hi Sean,
Thank you for your review.

In my opinion link_encoding is at the same level as active_speed and active_width, they all help to compute the actual rate.

Marcel

Quoted 13 lines · Sean
Quoted 13 lines

Index: b/drivers/infiniband/core/sysfs.c
===================================================================

drivers/infiniband/core/sysfs.c 2011-09-14 13:50:43.731775900 +0300 renamed from drivers/infiniband/core/sysfs.c 2011-09-14 13:49:58.000000000 +0300 +0 -0
@@ -209,7 +209,7 @@ static ssize_t rate_show(struct ib_port
                       speed = " DDR";
                       break;

              case 4:
-                     speed = " QDR";
+                     speed = attr.link_encoding == 0 ? " QDR" : " FDR10"; break;
              }

Quoted 12 lines

include/rdma/ib_verbs.h 2011-09-14 13:50:43.740777700 +0300 struct ib_port_attr { · line 322

Quoted 9 lines

Index: b/include/rdma/ib_verbs.h
===================================================================

include/rdma/ib_verbs.h 2011-09-14 13:50:43.740777700 +0300 renamed from include/rdma/ib_verbs.h 2011-09-14 13:49:58.000000000 +0300 +1 -0
@@ -319,6 +319,7 @@ struct ib_port_attr {
       u8                      active_speed;
       u8                      phys_state;
       u8                      ext_active_speed;
+     u8                      link_encoding;

This is such a low level detail, that it doesn't make sense to me to expose it above verbs.

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html