Status: working. Tested on real hardware with Windows 11 24H2 and a test-signed driver: two NDIS adapters, DHCP, ping and internet through the card. The port link follows the card's SFP+ link bit, so a port with no peer stays "Disconnected". Not benchmarked on Windows yet.
This is the Windows page of the Cavium
CN6640-SNIC10E docs. The overview, the FAQ and the list of reference documents are on
the general page. The driver is octnic.sys, an NDIS 6.20 miniport that speaks the
same BAR2 shared-memory protocol as the Linux driver. Windows 10/11 x64 is the target;
Windows 11 24H2 is the only version tested so far.
Requirements
- Windows 10/11 x64, with the card in a PCIe slot.
- Secure Boot off: the driver is test-signed, and test-signing cannot be enabled with Secure Boot on.
- The card image, which the boot task downloads once from the latest release into
C:\ProgramData\octnic. - A USB-serial (FT232) adapter for the one-time u-boot provisioning, unless you do that step from Linux (see Limitations).
Install
Download install_windows.bat (and octnic-windows-x64.zip) from the
latest release and double-click it. It asks for
Administrator rights and then:
- trusts the bundled test certificate, so there is no "install this driver?" popup;
- enables test-signing if it is off (
bcdedit /set testsigning on), reboots once and resumes by itself; - installs the driver, creates the second port and names the NICs
oct0andoct1; - registers the boot task
octnic-boot(SYSTEM, at every Windows start) that boots the card, see Card boot.
From a clone of the repository, install.bat at the root runs the same guided
flow as the other OSes (card present, driver, card provisioned, boot task), described on
the general page. Verify with:
Get-NetAdapter oct0, oct1
To uninstall: pnputil /enum-drivers, then
pnputil /delete-driver oemNN.inf /uninstall, then
Unregister-ScheduledTask octnic-boot.
How it works
The datapath is the Linux one. TX: the host writes frames straight into the BAR2 TX buffer using write-combining memory, claiming slots with compare-and-swap so several TX queues can run in parallel. RX: the card's DPI engine DMA-writes received frames into host RAM, with the descriptors also in host RAM so there is no per-frame PCIe read, and several busy-poll threads drain the ring in parallel.
Two NICs from one PCI function
One PCI function can bind only one NDIS adapter. So port 0 is the PCI device
itself (PCI\VEN_177D&DEV_0092), which owns the BAR2 mapping and the host DMA
memory, and port 1 is a root-enumerated companion device
(ROOT\OCTNIC_PORT1, created by octnic-addport.ps1) that shares them.
Both are served by the same octnic.sys, and both show up in Device Manager and
under Network Connections.
Card boot from Windows
The card's OpenWrt runs from RAM and must be pushed by the host after power-on.
octboot.ps1 does what the Linux octboot does, through the driver's
control device \\.\octnic (Administrators and SYSTEM only): it waits for the BAR2
window, pushes the image with verification, starts the card and waits for its heartbeat. If
that fails it falls back to a secondary bus reset and retries.
It does nothing when the card OS is already up, so it never fights Linux on a
dual-boot machine or after a warm reboot. The boot task runs octnic-start.ps1 at
every Windows start: it waits for the adapters, names them and runs
octboot.ps1 -Download.
Logs: C:\ProgramData\octnic\start.log and octboot.log; driver log:
C:\Windows\octnic.log. By hand, as Administrator:
.\octboot.ps1 [-ImagePath file.bin] [-Force] [-Download]. -Probe
prints the card state, and -SbrOnly resets the card.
Limitations
- Test-signed, not Microsoft-signed. That is why Secure Boot has to be off.
Production signing needs an EV code-signing certificate and a Windows Hardware Dev Center
account (attestation signing).
make-submission.ps1builds the package for upload, but that path is untested. - No Windows benchmarks yet. The throughput on the Linux page is measured on Linux only.
- The serial provisioning step is untested on Windows.
octnic-provision.ps1is a port of the Linux script and has not been run on real Windows hardware. If you have a Linux machine, do that one-time step there; after it, the card boots without a serial cable from either OS. - Only Windows 11 24H2 was tested.
- Linux known issues carry over. The card can wedge under sustained dual-port traffic, and recovery is a host reboot.
Usage
Get-NetAdapter oct0, oct1 # both NICs
New-NetIPAddress -InterfaceAlias oct0 -IPAddress 10.9.9.1 -PrefixLength 24
Set-NetIPInterface -InterfaceAlias oct1 -Dhcp Enabled
The driver has a watchdog on the card's heartbeat, its temperatures, the PCIe memory decode
and the SFP+ link, and logs alerts to the Windows Event Log under
Application and Services Logs, octnic. Tunables (RX threads, poll interval, TX
queues and so on) are registry values under
HKLM\SYSTEM\CurrentControlSet\Services\octnic\Parameters; the full list is in
winmod/README.
Build from source
build_local.bat (Visual Studio Build Tools and WDK 10.0.26100) produces
out\octnic.sys, and package.ps1 produces the test-signed
dist\ package. CI builds on every push that touches winmod/ and
attaches octnic-windows-x64.zip and install_windows.bat to every
release.
Questions, or testing on your own board?
Open an issue or a discussion on the repository, or email me@nicologiuliani.site. Results from other boards are especially welcome: everything here was developed against a single card.