Add FreeBSD bxe 2.5G SGMII support for BCM57810
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 505
- Forks
- 202
- PR merge metrics
- No merged PRs in 30d
Description
- [Y ] I have read the contributing guidelines at https://github.com/opnsense/core/blob/master/CONTRIBUTING.md
- [ Y] I am convinced that my issue is new after having checked both open and closed issues at https://github.com/opnsense/core/issues?q=is%3Aissue
- [Y ] AI tools were used to create at least part of the text submitted herewith.
Feature Request: Add FreeBSD bxe 2.5G SGMII support for BCM57810S
Summary
Please consider importing/upstreaming the existing FreeBSD bxe 2.5G SGMII support for the QLogic/Broadcom BCM57810/BCM57810S into the OPNsense src tree.
This would allow BCM57810S SFP+ adapters to negotiate and operate at 2.5 Gbit/s when used with appropriate SFP/GPON/ONT modules.
The relevant FreeBSD change already exists:
FreeBSD Differential D36508 — bxe: Add 2.5G SGMII support (SFP GPON ONT)
https://reviews.freebsd.org/D36508
The patch modifies:
sys/dev/bxe/bxe.hsys/dev/bxe/bxe.csys/dev/bxe/bxe_elink.c
The FreeBSD review explicitly identifies the target hardware as the QLogic NetXtreme II BCM57810 and describes the patch as allowing 2.5 Gbps operation with GPON SFP modules.
Current OPNsense environment
I am currently running:
OPNsense 26.7.2_2 (amd64)
FreeBSD 15.1-RELEASE-p2
stable/26.7-n283717-af063949dfa0
Hardware:
QLogic NetXtreme II BCM57810 10GbE (B0)
BXE v:1.78.91
The interface is:
bxe0
Current behavior
The stock OPNsense bxe driver reports:
bxe0: <QLogic NetXtreme II BCM57810 10GbE (B0) BXE v:1.78.91>
and:
bxe0: ERROR: Invalid NVRAM config link_config=0x00060300 speed_cap_mask=0x00700070
bxe0: Found 10Gb Fiber media.
bxe0: IFMEDIA flags : 20
ifconfig -m bxe0 currently reports only:
supported media:
media autoselect
media 10Gbase-SR mediaopt full-duplex
There is no 2500Base-X/2.5G mode exposed.
The interface eventually links at:
bxe0: NIC Link is Up, 1000 Mbps full duplex
Therefore this is not simply a GUI configuration issue: the current OPNsense bxe driver does not expose the 2.5G mode on this BCM57810S.
Comparison with pfSense
The same BCM57810S hardware works at 2.5 Gbps under current pfSense releases without requiring a custom user-built driver.
This suggests that the required bxe changes have already been incorporated into the pfSense codebase, while they are not currently present in the OPNsense 26.7 bxe driver.
The goal is therefore not to request a proprietary driver or a new hardware-specific implementation, but to incorporate the existing FreeBSD bxe 2.5G SGMII implementation into OPNsense.
Relevant upstream FreeBSD work
The most important reference is:
FreeBSD D36508 — bxe: Add 2.5G SGMII support (SFP GPON ONT)
https://reviews.freebsd.org/D36508
The review states that this is an existing BCM57810S 2.5G patch and that it allows 2.5 Gbps operation on the QLogic NetXtreme II BCM57810.
The proposed change is relatively small and is confined to the existing bxe driver:
sys/dev/bxe/bxe.h
sys/dev/bxe/bxe.c
sys/dev/bxe/bxe_elink.c
Why this would be useful for OPNsense
BCM57810S cards are inexpensive and widely used as SFP+ NICs in firewall/router systems.
They are particularly useful with:
- 2.5G GPON/ONT SFP modules
- 2.5G SGMII Ethernet modules
- 2.5G fiber/SFP deployments
- multi-gigabit WAN connections
At present, OPNsense users with this hardware may need to maintain a custom if_bxe.ko, despite the functionality already existing in the FreeBSD ecosystem.
Having the support in the OPNsense source/kernel would eliminate the need for users to manually replace the kernel module after installation or updates.
Requested change
Please consider one of the following:
- Import the relevant FreeBSD D36508 changes into the OPNsense
srctree if they are not already present. - If the changes are already present in a newer FreeBSD branch, merge the corresponding upstream
bxechanges into the OPNsense stable branch. - If OPNsense intentionally cannot import the complete change, please document why and indicate whether an OPNsense-specific adaptation would be acceptable.
Ideally the result would be that a BCM57810 running the standard OPNsense kernel exposes the appropriate 2.5G media mode, rather than requiring users to compile and install a custom if_bxe.ko.
Additional information
Current interface output:
bxe0: flags=1008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,LOWER_UP>
media: Ethernet autoselect (10Gbase-SR )
status: active
supported media:
media autoselect
media 10Gbase-SR mediaopt full-duplex
Current driver message:
bxe0: ERROR: Invalid NVRAM config link_config=0x00060300 speed_cap_mask=0x00700070
Current link result:
bxe0: NIC Link is Up, 1000 Mbps full duplex
The hardware is:
QLogic NetXtreme II BCM57810 10GbE (B0)
References
-
FreeBSD Differential D36508:
bxe: Add 2.5G SGMII support (SFP GPON ONT)
https://reviews.freebsd.org/D36508 -
Historical BCM57810S 2.5G implementation/reference:
https://www.dslreports.com/forum/r32230041-Internet-Bypassing-the-HH3K-up-to-2-5Gbps-using-a-BCM57810S-NIC -
Example of fix within pfsense
https://redmine.pfsense.org/issues/16321
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing FreeBSD Differential D36508 with sys/dev/bxe/bxe.h, sys/dev/bxe/bxe.c, and sys/dev/bxe/bxe_elink.c in the OPNsense src tree. Build and test the bxe driver on BCM57810S hardware; done means the standard OPNsense kernel exposes the 2.5G media mode and can establish a 2.5 Gbps link.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- networking, operating-systems
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100