[PATCH infiniband-diags 5/6] [perfquery.c ibdiag_common.h]: Add support for HDR RS-FEC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



HDR uses different RS-FEC. Original RS-FEC is RS(528,514) and is
bit 2 in FECMode fields and value 2 in FECModeActive field.
HDR uses RS(544,514) which is bit 4 in HDRFECMode fields and
value 4 in FECModeActive field.

Per MgtWG comments #9367 and #9368

Signed-off-by: Hal Rosenstock <hal@xxxxxxxxxxxx>
---
 include/ibdiag_common.h | 4 ++++
 src/perfquery.c         | 3 ++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/include/ibdiag_common.h b/include/ibdiag_common.h
index b8c5987..ae93ba3 100644
--- a/include/ibdiag_common.h
+++ b/include/ibdiag_common.h
@@ -114,6 +114,10 @@ extern char *ibd_nd_format;
 #define IB_PORT_EXT_LOW_LATENCY_RS_FEC_MODE_ACTIVE (CL_HTON16(0x0003))
 #endif
 
+#ifndef IB_PORT_EXT_RS_FEC2_MODE_ACTIVE
+#define IB_PORT_EXT_RS_FEC2_MODE_ACTIVE (CL_HTON16(0x0004))
+#endif
+
 /* SM PortInfoExtended CapabilityMask Bits */
 #ifndef IB_PORT_EXT_CAP_IS_FEC_MODE_SUPPORTED
 #define IB_PORT_EXT_CAP_IS_FEC_MODE_SUPPORTED (CL_HTON32(0x00000001))
diff --git a/src/perfquery.c b/src/perfquery.c
index 6bc4d9c..19d4273 100644
--- a/src/perfquery.c
+++ b/src/perfquery.c
@@ -571,7 +571,8 @@ static uint8_t is_rsfec_mode_active(ib_portid_t * portid, int port,
 				 &fec_mode_active);
 		if((pie_capmask &
 		    CL_NTOH32(IB_PORT_EXT_CAP_IS_FEC_MODE_SUPPORTED)) &&
-		   (CL_NTOH16(IB_PORT_EXT_RS_FEC_MODE_ACTIVE) == (fec_mode_active & 0xffff)))
+		   ((CL_NTOH16(IB_PORT_EXT_RS_FEC_MODE_ACTIVE) == (fec_mode_active & 0xffff)) ||
+                    (CL_NTOH16(IB_PORT_EXT_RS_FEC2_MODE_ACTIVE) == (fec_mode_active & 0xffff))))
 			return 1;
 	}
 
-- 
2.8.4

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



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux