-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ixgbe: Add 1000BASE-BX support #1518
base: main
Are you sure you want to change the base?
Conversation
CC @kev009 |
I have something similar pending for igb(4). So far been testing 1000Base-BX10 modules so I can test your patch on ix(4). I am planning on picking up 100m, 10g modules. @toreamun I found information on xxBASE-BX10 a little confusing but am under the impression it is available in 100m,1g,10g variants (and maybe theoretically 10mbit). In theory the lower rates might work fine if SGMII is available and I would be surprised if the 10g rate doesn't work natively on ix(4). |
Thanx @kev009. It would be helpful if you could share an SFF-8472 dump (ifconfig -vvv) of tested cards, especially for cards other than
I agree that the information is a bit confusing at this point. It is crystal clear from the datasheet that 1000BASE-BX is supported, so I chose the conservative approach of checking the nominal rate. Support for other rates is not explicit in the datasheet. I will try to review the datasheet once more later today.
It would be great to have this tested before enabling it. It may also require additional media types in |
19a9df0
to
b9353f2
Compare
The Intel datasheet only talks about 1000BASE-BX, never 1000BASE-BX10. This may suggest that the hardware provides support for 1000BASE-BX in general, without limiting it specifically to 10 km (the BX10 variant). It is very likely that the Intel 82599 could support other 1000BASE-BX modules (like 20 km) since range is determined by the optical characteristics of the transceiver, not the controller. I have pushed and update where IFM_1000_BX10 now is changed to IFM_1000_BX. The update also includes a related commit I forgot in the initial push |
I will get my hands on both 100BASE-BX and 10GBASE-BX tranceivers and an extra card in a few weeks, and can then see if I can add support for them. I think that is best done in one or two separate PR and focus on 1000BASE-BX in this PR. |
*/ | ||
} else if ((comp_codes_1g & | ||
IXGBE_SFF_BASEBX10_CAPABLE) && | ||
(bitrate_nominal == 13)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you ok dropping all this machinery around the bitrate check? If you have the right comp_code for 1g I think it is safe to proceed and SFPs tend too often to be miscoded. We can always add it back if there is unforeseen issue.
sys/net/if_media.h
Outdated
@@ -442,6 +443,7 @@ struct ifmedia_description { | |||
{ IFM_1000_SX, "1000baseSX" }, \ | |||
{ IFM_1000_LX, "1000baseLX" }, \ | |||
{ IFM_1000_CX, "1000baseCX" }, \ | |||
{ IFM_1000_BX, "1000baseBX" }, \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with the change to BX, for instance LX can come in 2km or extended distances as well. By convention it seems we use the trailing numbers for lanes.
1000Base-BX uses two wavelengths, commonly 1310nm, 1490nm, 1550nm, or 1590nm, in a Coarse Wavelength Division Multiplexing (CWDM) arrangement so that a single fiber strand may carry both upstream and downstream. It is sometimes referred to as BiDi for bi-directional usage of one fiber. Optics must be paired such that the RX and TX wavelengths cross over, with one side often called U(pstream) and the other D(ownstream). This technology is useful for increasing link density or working around construction issues, and is also frequently used as a last mile delivery technology for FTTx. MFC after: 3 days Sponsored by: BBOX.io (review/commits) Pull Request: #1518
I went ahead and committed the if_media changes. Please rebase and squash on main once you have reviewed. |
b9353f2
to
bf3101f
Compare
I have now done a rebase to get the media commit from main. Do you want me to squash the other commits into fewer or single commit? |
Yeah everything left here should be a single commit |
bf3101f
to
f3be15d
Compare
Done |
- Add BASE-BX10 complicance code bitmask, nominal bitrate offset, and associated ixgbe_sfp_type members. - Initialize 1000BASE-BX as an SX module. - Add detection of 1000BASE-BX by rate and compliance code - Use if speed of 1Gbps when 1000BASE-BX is detected or changes. Signed-off-by: Tore Amundsen <[email protected]>
f3be15d
to
a935831
Compare
@kev009 Automatic kernel cross build and style checker is happy, but the smoke test fails: "Failed to start an instance: FAILED_PRECONDITION: Monthly compute limit exceeded!" |
@toreamun I haven't been in a rush to push this because I want to understand how it might interact with at least 10Gbase-BX. I have some 10GBase-BX optics, and some 100Mbit-BX optics to check.. not sure the later are the SGMII capable so only expecting the later to be relevant. I might have some time this weekend to finish this up. |
Hi @kev009 , I just wanted to kindly follow up on the status of this pull request. Please let me know if there’s anything I can do to help move it forward. Additionally, I’ve realized that supporting 100BASE-BX will require further changes beyond this PR, so it might be best to set that aside for now and focus on the current improvements. I have tested using two 100BaseBX modules, and changes to the link setup and use of AUTOC.LMS flags is probably required if this is even possible. |
Add support for 1000BASE-BX (BiDi) single-mode SFP modules, commonly used for last mile fiber connections to homes and businesses.
BASE-BX10 is bit number 6 in the Ethernet Compliance Codes defined in SFF-8472, section 5.4.
In addition to this bit, the SFP module’s nominal signaling rate must be checked to make sure it
is 1000BASE-BX and not another BASE-BX variant, like 100BASE-BX. The hardware officially
only supports 1000BASE-BX according to the datasheet.
A new media type is also added to /sys/net/if_media.h, and the driver registers for this type when the 1000BASE-BX physical layer is detected.
The change has been tested with Intel X520 82599ES (SFI/SFP+):