Playing with the OCP Open Optical Monitoring

Ronald van der Pol
Mon, Apr 23, 2018 - 653 Words - 4 minutes
Categories: open hardware

Overview

I had a first look at the Open Optical Monitoring (OOM) project of the Open Compute Project (OCP). OOM is a kernel driver that accesses the I2C management interface of SFP and QSFP modules. It can retrieve inventory data like model, serial number, manufacturor, optical power levels, etc.

It is being picked up by NOSes like Cumulus and [SONiC] (https://azure.github.io/SONiC/). I tested on an EdgeCore AS5712-54X [running Open Network Linux] (http://opennetlinux.org/). I used today’s [latest-DEB8-AMD64-installed.installer] (http://opennetlinux.org/binaries/). There are a couple of applications available, e.g.:

~/oom/apps# python inventory.py

Port Name  Vendor           Type          Part #           Serial #

port1                       No Module
port2      Juniper          SFP           FTLX8571D3BCL-J1 AJS1HGXXXX
port3                       No Module
port4                       No Module
port5      OEM              SFP           SFP-SX-S         114440XXXX
port6      OEM              SFP           SFP-SX-S         114440XXXX
port7      OEM              SFP           SFP-SX-S         114440XXXX
port8      OEM              SFP           SFP-SX-S         114440XXXX
port9      OEM              SFP           SFP-SX-S         114440XXXX
port10     OEM              SFP           SFP-SX-S         114440XXXX
port11     OEM              SFP           SFP-SX-S         114440XXXX
port12     OEM              SFP           SFP-SX-S         114440XXXX
port13     OEM              SFP           SFP-SX-S         114440XXXX
port14     OEM              SFP           SFP-SX-S         114440XXXX
port15     OEM              SFP           SFP-SX-S         114440XXXX
port16     OEM              SFP           SFP-SX-S         114440XXXX
port17                      No Module
port18                      No Module
port19     AVAGO            SFP           QFBR-5759AP      AVAGMY50XXXX
port20     FINISAR CORP.    SFP           FTLX1471D3BNL-J1 AN9XXXX
port21     FINISAR CORP.    SFP           FTLX1471D3BNL-J1 AN9XXXX
port22                      No Module
port23     CISCO-AGILENT    SFP           QFBR-5798L       A5002XXXX
port24                      No Module
port25     CISCO-AGILENT    SFP           QFBR-5798L       A5002XXXX
port26     OEM              SFP           SFP-SX-S         11444XXXX
port27                      No Module
port28                      No Module
port29     FINISAR CORP.    SFP           FTLX1471D3BNL-J1 AN8XXXX
port30                      No Module
port31                      No Module
port32     OEM              SFP           XEN-SFP+10G-LR   DCM012XXXX
port33     CIENA-JDS        SFP                            FE0600XXXX
port34                      No Module
<truncated>

There is also a nice demo included with live Digital Optical Monitoring. On your switch you start a Python script:

~/oom/apps# python oomjsonsvr.py

This gives access to the optical data via a JSON REST interface. Somewhere on your network you can start the client by installing the OOM Python code and running the demo script:

~/oom/demo# python gui.py -url <switch IP address>

This show the inventory like above in a window and you can right click on a port and choose DOM from the popup menu. This gives the status like the screen shot below that refreshes every second.

screenshot of DOM

It shows current values and upper and threshold values (upper and lower warnings and alarms).

The SFP and QSFP specifications

The SFP and QSFP specifications are maintained by the Storage Networking Industry Association (SNIA). The relevant specs for OOM are [SFF-8472] (https://ta.snia.org/higherlogic/ws/public/download/294/SFF-8472.PDF) for SFP and SFP+ and [SFF-8436] (https://ta.snia.org/higherlogic/ws/public/download/274/SFF-8436.PDF) for QSFP+ and QSFP28. The electrical and power specifications for SFP+ are described in [SFF-8431] (https://ta.snia.org/higherlogic/ws/public/download/268/SFF-8431.PDF). Some other specifications are:

Specification Description
INF-8074 SFP (Small Formfactor Pluggable) 1 Gb/s Transceiver
SFF-8079 SFP Rate and Application Selection
SFF-8089 SFP Rate and Application Codes
SFF-8431 SFP+ 10 Gb/s and Low Speed Electrical Interface
SFF-8436 QSFP+ 10 Gb/s 4X Pluggable Transceiver
SFF-8472 Diagnostic Monitoring Interface for Optical Transceivers
SFF-8690 Tunable SFP+ Memory Map for ITU Frequencies

They are all on the SNIA website.

The Diagnostic Monitoring Interface for Optical Tranceivers

All these modules (SFP and QSFP) have an I2C management interface. I2C is a 2-wire bus protocol with SCL (Serial CLock) and SDA (Serial DAta) signals. On a QSFP+ module, pin 11 is SCL and pin 12 is SDA. On an SFP+ module, pin 4 is SDA and pin 5 is SCL. The I2C bus provides access to the EEPROM in the optical module.

In my current setup it looks like OOM is accessing the /sys filesystem directly via the as5712_54x_sfp driver. OOM also provides a kernel module (optoe) for the I2C controller and various projects have indicated that they will transition to this driver.

This /sys filesytem looks like this:

root@localhost:~/oom/oom# ls /sys/bus/i2c/drivers/as5712_54x_sfp/
10-0050  14-0050  18-0050  21-0050  25-0050  29-0050  32-0050  36-0050	40-0050  43-0050  47-0050  5-0050   54-0050  8-0050  uevent
11-0050  15-0050  19-0050  22-0050  26-0050  30-0050  33-0050  37-0050	4-0050	 44-0050  48-0050  51-0050  55-0050  9-0050  unbind
12-0050  16-0050  20-0050  23-0050  27-0050  3-0050   34-0050  38-0050	41-0050  45-0050  49-0050  52-0050  6-0050   bind
13-0050  17-0050  2-0050   24-0050  28-0050  31-0050  35-0050  39-0050	42-0050  46-0050  50-0050  53-0050  7-0050   module
root@localhost:~/oom/oom#