OpenBSD CVS

CVS log for src/sbin/ifconfig/sff.c


[BACK] Up to [local] / src / sbin / ifconfig

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.23 / (download) - annotate - [select for diffs], Thu Oct 24 18:54:10 2019 UTC (4 years, 7 months ago) by bluhm
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, HEAD
Changes since 1.22: +24 -26 lines
Diff to previous 1.22 (colored)

Fix ifconfig(8) compiler warnings regarding variable "name" reuse.
Call the global variable with the name of the interface "ifname".
Do not pass it around, just use it globally.  Do not use "ifname"
for anything else.
OK deraadt@

Revision 1.22 / (download) - annotate - [select for diffs], Thu Oct 17 18:37:38 2019 UTC (4 years, 7 months ago) by bluhm
Branch: MAIN
Changes since 1.21: +22 -20 lines
Diff to previous 1.21 (colored)

Fix some compiler warings in ifconfig(8).  Move all prototypes and
variables used in multiple .c files into common ifconfig.h.  Basically
this renames brconfig.h to ifconfig.h and also uses it for sff.c.
Fix missing prototypes.  Global variable name s is bad as it shadows
local variables.  Call it sock and use it everywhere.
OK deraadt@

Revision 1.21 / (download) - annotate - [select for diffs], Fri Aug 30 03:52:21 2019 UTC (4 years, 9 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.20: +3 -3 lines
Diff to previous 1.20 (colored)

whitespace, found while pondering improvements to sffdump

Revision 1.20 / (download) - annotate - [select for diffs], Thu Aug 29 03:08:50 2019 UTC (4 years, 9 months ago) by dlg
Branch: MAIN
Changes since 1.19: +2 -2 lines
Diff to previous 1.19 (colored)

fix a comparison which generated a warning on sparc64.

found by deraadt@

Revision 1.19 / (download) - annotate - [select for diffs], Thu Aug 29 02:05:58 2019 UTC (4 years, 9 months ago) by dlg
Branch: MAIN
Changes since 1.18: +2 -2 lines
Diff to previous 1.18 (colored)

make the list of OM fibre distances go OM1, OM2, OM3, not OM2, OM1, OM3

Revision 1.18 / (download) - annotate - [select for diffs], Wed Aug 28 01:52:38 2019 UTC (4 years, 9 months ago) by dlg
Branch: MAIN
Changes since 1.17: +2 -2 lines
Diff to previous 1.17 (colored)

s/No separable connector/No connector/

shrinks some QSFP+ DAC output a bit.

Revision 1.17 / (download) - annotate - [select for diffs], Wed Aug 28 01:50:48 2019 UTC (4 years, 9 months ago) by dlg
Branch: MAIN
Changes since 1.16: +1 -4 lines
Diff to previous 1.16 (colored)

remove some cruft

Revision 1.16 / (download) - annotate - [select for diffs], Wed Aug 28 01:47:20 2019 UTC (4 years, 9 months ago) by dlg
Branch: MAIN
Changes since 1.15: +88 -20 lines
Diff to previous 1.15 (colored)

try to factor media information out and use it for qsfp as well as sfp.

qsfp and xfp have remarkably similar layouts, so we can use the
same code to print media for both. sfp and xfp/qsfp generally have
the same fields, just in different register locations and with some
different scales/factors for some values. this change provides a
map of these differences as structs for the sfp and qsfp/xfp layouts.

the big difference between sfp, xfp, and qsfp that still remains
is how they interpret the wavelength field. qsfp stores either optic
wavelength in units of 0.05nm, or a couple of copper cable attenuation
values in dB at different frequencies. sfp stores wavelength in nm
units, but has magic values to blacklist copper cables with. xfp
stores wavelength in 0.05 nm units, so more like like qsfp.  right
now the code uses the sfp behaviour, which means qsfp will show a
weird wavelength for copper cables when it shouldnt. i'm still
trying to figure out the least worst way to handle that, but at
least it looks right for optics now.

Revision 1.15 / (download) - annotate - [select for diffs], Tue Aug 27 23:24:35 2019 UTC (4 years, 9 months ago) by dlg
Branch: MAIN
Changes since 1.14: +16 -3 lines
Diff to previous 1.14 (colored)

print more qsfp temperature information

this shows the maximum case temperature reported by the chip, and
the low and high alarm ranges for temp and vcc when page 3 is
available and working.

this will hopefully give deraadt@ a better idea about how much
headroom one of his 100g optics has.

Revision 1.14 / (download) - annotate - [select for diffs], Tue Aug 27 11:54:42 2019 UTC (4 years, 9 months ago) by dlg
Branch: MAIN
Changes since 1.13: +117 -8 lines
Diff to previous 1.13 (colored)

have a go at printing more monitoring information.

this is a bit rough, but a good start. apart from the media types
and length, qsfp support should be on par with sfp modules now.

Revision 1.13 / (download) - annotate - [select for diffs], Tue Aug 27 00:33:57 2019 UTC (4 years, 9 months ago) by dlg
Branch: MAIN
Changes since 1.12: +65 -1 lines
Diff to previous 1.12 (colored)

make a start at reporting qsfp monitor values.

i have some qsfp DACs and a couple of optics, and they're all
terrible, so this is about as far as i can go for now. at least the
code will be robust in the face of terrible modules though.

the DACs are pretty dumb and basically report that they're DACs
with some strings. this code just prints that they're DACs with
strings now.

modules are supposed to be able to report overall temperature and
voltage, and optics can report tx and rx values for the 4 different
signal lanes they're supposed to provide. interestingly the current
values are always reported in the lower page, but thresholds are
reported in page 3, but not all modules support page switching.
devices are supposed to say whether they can switch pages, but i
have one that does say it can switch but then doesn't. anyway, the
take away is that it is therefore possible for a module to report
values without also
reporting thresholds.

this sets the code up to report the values on their own if we can't
query page 3 for any reason.

if the temp sensor value looks bogus (ie, 0x0000 or 0xffff), assume
the monitor values are bogus and bail early.

hopefully i can find a module soon that supports multiple signal
lanes and actually reports their values and thresholds for them.

Revision 1.12 / (download) - annotate - [select for diffs], Fri Apr 26 15:04:29 2019 UTC (5 years, 1 month ago) by denis
Branch: MAIN
Changes since 1.11: +4 -1 lines
Diff to previous 1.11 (colored)

Fix a missing carriage return.

OK deraadt@

Revision 1.11 / (download) - annotate - [select for diffs], Tue Apr 16 09:32:06 2019 UTC (5 years, 1 month ago) by dlg
Branch: MAIN
Changes since 1.10: +3 -2 lines
Diff to previous 1.10 (colored)

restore some missing error handling

Revision 1.10 / (download) - annotate - [select for diffs], Mon Apr 15 03:41:58 2019 UTC (5 years, 1 month ago) by dlg
Branch: MAIN
Changes since 1.9: +2 -0 lines
Diff to previous 1.9 (colored)

ethtool indicates that QSFP, QSFP+ and QSFP28 are all SFF-8636 compat.

Revision 1.9 / (download) - annotate - [select for diffs], Mon Apr 15 03:39:28 2019 UTC (5 years, 1 month ago) by dlg
Branch: MAIN
Changes since 1.8: +51 -29 lines
Diff to previous 1.8 (colored)

follow the basic xfp support with basic qsfp+ support

qsfp was originally defined in SFF-8436, but the management interface
now seems to be managed in SFF-8636, so this uses sff8636 as a
prefix for qsfp things. the same spec applies to qsfp+ and probably
qsfp28.

XFP and QSFP share a bunch of offsets for where strings are located,
so this factors out the printing of those strings from the xfp code
and uses it from both the xfp and qsfp handling.

i have a qsfp+ to 4x sfp+ cable that looks like this with the new
code:

	transceiver: QSFP+
	model: Amphenol 601110005 rev A
	serial: CN0HVVVFxxxxxxx date: 2013-04-18

if i ever get a pair of optics i can work on the diags

Revision 1.8 / (download) - annotate - [select for diffs], Mon Apr 15 03:12:50 2019 UTC (5 years, 1 month ago) by dlg
Branch: MAIN
Changes since 1.7: +63 -4 lines
Diff to previous 1.7 (colored)

basic support for dumping xfp info

xfp uses a different page layout compared to sfp. xfp uses info in
INF-8077, not SFF-8472, and by default provides the info at page
1, not 0.

myx(4) supports xfp modules, but doesn't support i2c writes so it
cannot change the page the chip is looking at. it appears that myx
defaults to page 1 for xfp, so if the first read of page 0 fails
with ENXIO, try to read page 1 instead.

a 10G-PCIE-8A-R myx with the only xfp module i could find lying
around looks like this:

	transceiver: XFP
	model: Intel Corp TXN181070850X1J rev B3
	serial: USC2048M95 date: 2005-04-13

im not sure if it's worth spending much more time on these though..

Revision 1.7 / (download) - annotate - [select for diffs], Thu Apr 11 12:32:46 2019 UTC (5 years, 1 month ago) by sthen
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.6: +38 -6 lines
Diff to previous 1.6 (colored)

print transceiver supported distances, ok deraadt

Revision 1.6 / (download) - annotate - [select for diffs], Thu Apr 11 11:32:24 2019 UTC (5 years, 1 month ago) by sthen
Branch: MAIN
Changes since 1.5: +18 -19 lines
Diff to previous 1.5 (colored)

print transceiver information inline with standard interface details
(like media/joinlist do) rather than totally separate; this also allows
"ifconfig -a sff" or "ifconfig ix sff".

tweak display format to make it look closer to the standard lines.

ok deraadt

Revision 1.5 / (download) - annotate - [select for diffs], Wed Apr 10 18:02:50 2019 UTC (5 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.4: +3 -3 lines
Diff to previous 1.4 (colored)

use AOC and DAC instead of standard's names "optical / copper pigtail"
because these are the commonly used terminology
ok claudio sthen

Revision 1.4 / (download) - annotate - [select for diffs], Wed Apr 10 16:12:43 2019 UTC (5 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.3: +3 -3 lines
Diff to previous 1.3 (colored)

MPO cable names were swapped

Revision 1.3 / (download) - annotate - [select for diffs], Wed Apr 10 14:15:43 2019 UTC (5 years, 1 month ago) by sthen
Branch: MAIN
Changes since 1.2: +2 -2 lines
Diff to previous 1.2 (colored)

use correct printf format for current dBm values
problem spotted by Hrvoje, thank you!

ok deraadt

Revision 1.2 / (download) - annotate - [select for diffs], Wed Apr 10 10:45:50 2019 UTC (5 years, 1 month ago) by sthen
Branch: MAIN
Changes since 1.1: +123 -49 lines
Diff to previous 1.1 (colored)

Tweak transceiver information printing, adding a bit more information
in less space. Adds wavelength, printing alarm low/high thresholds, and
prints a flag for warning or alarm indications. "i like it" deraadt@

Revision 1.1 / (download) - annotate - [select for diffs], Wed Apr 10 10:14:37 2019 UTC (5 years, 1 month ago) by dlg
Branch: MAIN

add support for fetching and parsing SFF module info and diags

this is very basic, and will get cut up a lot by sthen@ soon, but
it was enough to get us started with. at the moment it shows the
type of module, some vendor and products strings, and detects if
the device supports diag and then shows it. qsfp info is structured
very differently, but i'll let sfp support settle before trying to
make it look the same.

so far only ix(4) and some ixl(4) with up to date firmware implement
the backend ioctl for this. no em(4) yet :(

suggestions from mikeb@
ok deraadt@ sthen@

this was started because of a question from rachel roch

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.