netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH ethtool] ethtool: Add extended compliance codes parsing to sfp modules
@ 2017-11-19 12:49 Gal Pressman
  2017-12-06 15:49 ` [ethtool] " John W. Linville
  0 siblings, 1 reply; 2+ messages in thread
From: Gal Pressman @ 2017-11-19 12:49 UTC (permalink / raw)
  To: David S. Miller, netdev, John W. Linville
  Cc: Saeed Mahameed, Eran Ben Elisha, Ariel Almog, Zvi Rechtman,
	Gal Pressman

Update parsing according to SFP28 spec with extended compliance codes.
SFF-8472, SFF-8024 specify the description of module capability present
in the 36th byte.

Signed-off-by: Gal Pressman <galp@mellanox.com>
Reviewed-by: Eran Ben Elisha <eranbe@mellanox.com>
---
 sfpid.c | 25 +++++++++++++++++++++++--
 1 file changed, 23 insertions(+), 2 deletions(-)

diff --git a/sfpid.c b/sfpid.c
index 1732e5e..a1753d3 100644
--- a/sfpid.c
+++ b/sfpid.c
@@ -40,10 +40,10 @@ static void sff8079_show_transceiver(const __u8 *id)
 		"\tTransceiver type                          :";
 
 	printf("\t%-41s : 0x%02x 0x%02x 0x%02x " \
-	       "0x%02x 0x%02x 0x%02x 0x%02x 0x%02x\n",
+	       "0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x\n",
 		   "Transceiver codes",
 	       id[3], id[4], id[5], id[6],
-	       id[7], id[8], id[9], id[10]);
+	       id[7], id[8], id[9], id[10], id[36]);
 	/* 10G Ethernet Compliance Codes */
 	if (id[3] & (1 << 7))
 		printf("%s 10G Ethernet: 10G Base-ER" \
@@ -168,6 +168,27 @@ static void sff8079_show_transceiver(const __u8 *id)
 		printf("%s FC: 200 MBytes/sec\n", pfx);
 	if (id[10] & (1 << 0))
 		printf("%s FC: 100 MBytes/sec\n", pfx);
+	/* Extended Specification Compliance Codes from SFF-8024 */
+	if (id[36] == 0x1)
+		printf("%s Extended: 100G AOC or 25GAUI C2M AOC with worst BER of 5x10^(-5)\n", pfx);
+	if (id[36] == 0x2)
+		printf("%s Extended: 100G Base-SR4 or 25GBase-SR\n", pfx);
+	if (id[36] == 0x3)
+		printf("%s Extended: 100G Base-LR4 or 25GBase-LR\n", pfx);
+	if (id[36] == 0x4)
+		printf("%s Extended: 100G Base-ER4 or 25GBase-ER\n", pfx);
+	if (id[36] == 0x8)
+		printf("%s Extended: 100G ACC or 25GAUI C2M ACC with worst BER of 5x10^(-5)\n", pfx);
+	if (id[36] == 0xb)
+		printf("%s Extended: 100G Base-CR4 or 25G Base-CR CA-L\n", pfx);
+	if (id[36] == 0xc)
+		printf("%s Extended: 25G Base-CR CA-S\n", pfx);
+	if (id[36] == 0xd)
+		printf("%s Extended: 25G Base-CR CA-N\n", pfx);
+	if (id[36] == 0x18)
+		printf("%s Extended: 100G AOC or 25GAUI C2M AOC with worst BER of 10^(-12)\n", pfx);
+	if (id[36] == 0x19)
+		printf("%s Extended: 100G ACC or 25GAUI C2M ACC with worst BER of 10^(-12)\n", pfx);
 }
 
 static void sff8079_show_encoding(const __u8 *id)
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [ethtool] ethtool: Add extended compliance codes parsing to sfp modules
  2017-11-19 12:49 [PATCH ethtool] ethtool: Add extended compliance codes parsing to sfp modules Gal Pressman
@ 2017-12-06 15:49 ` John W. Linville
  0 siblings, 0 replies; 2+ messages in thread
From: John W. Linville @ 2017-12-06 15:49 UTC (permalink / raw)
  To: Gal Pressman
  Cc: David S. Miller, netdev, Saeed Mahameed, Eran Ben Elisha,
	Ariel Almog, Zvi Rechtman

On Sun, Nov 19, 2017 at 02:49:27PM +0200, Gal Pressman wrote:
> Update parsing according to SFP28 spec with extended compliance codes.
> SFF-8472, SFF-8024 specify the description of module capability present
> in the 36th byte.
> 
> Signed-off-by: Gal Pressman <galp@mellanox.com>
> Reviewed-by: Eran Ben Elisha <eranbe@mellanox.com>

Applied -- sorry for the delay!

John
-- 
John W. Linville		Someday the world will need a hero, and you
linville@tuxdriver.com			might be all we have.  Be ready.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-12-06 16:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-19 12:49 [PATCH ethtool] ethtool: Add extended compliance codes parsing to sfp modules Gal Pressman
2017-12-06 15:49 ` [ethtool] " John W. Linville

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).