Patching Intel’s SFP+ driver for …

Chapter8
Chapter8
Published in
3 min readAug 26, 2021

…well, to make things work, honestly. Not for fun nor profit.

TL;DR: Intel’s ixgbe-driver sees our Finisar 10Gb SPF+ cards as 1Gb, and therefor loading these drivers will fail. But this patch by Crypt0jan will make them work and spare you his headaches, anger and frustration. You’re welcome.

Photo by Elisa Ventur on Unsplash
Tested with:OS: Ubuntu 20.04.02 LTSHPE Ethernet 10Gb 2P 560FLR-SFP+ 665243-B21:   
* https://www.creoserver.com/hp-560flp-da2-dual-port-10gbit
* SFP+ Module: 2x Finisar 10G SFP+ Transceivers FTLF8528P3BNV
HP 560SFP+ 2x 10GBE Adapter PCI-E 669279–001:
* https://www.creoserver.com/hp-560flp-da2-dual-port-10gbit-pcie
* SFP+ Module: 2x Finisar 10G SFP+ Transceivers FTLF8528P3BNV

So, we desperately needed SPF+ 10Gb interfaces for one of our larger assignments. We bought a fat server and all the hardware, but up came this issue: it seems that the Finisar 10G SFP+ adapters are considered 1G instead of 10G by Intel’s driver. This leads to these messages in the kernel:

[ 1561.382364] ixgbe 0000:08:00.1 0000:08:00.1 (uninitialized): ixgbe_check_options: FCoE Offload feature enabled
[ 1561.382366] ixgbe 0000:08:00.1 0000:08:00.1 (uninitialized): allow_unsupported_sfp Enabled
[ 1561.392421] ixgbe 0000:08:00.1: failed to load because an unsupported SFP+ or QSFP module type was detected.
[ 1561.392453] ixgbe 0000:08:00.1: Reload the driver after installing a supported module.

As you can see, we already tried to enable the option allow_unsupported_sfp, but that did not have the desired effect. Now, let's get these to work.

Step 1: Download latest driver from Intel

At the moment of writing this, the latest version is 5.12.5. To be downloaded from here: https://www.intel.com/content/www/us/en/download/14302/14687/intel-network-adapter-driver-for-pcie-intel-10-gigabit-ethernet-network-connections-under-linux.html

Step 2: Patch the driver

After downloading the tarball, unpack it and look for file ixgbe-5.12.5/src/ixgbe_phy.c. Open it with your favorite text editor and go to line 1478. There should be a code block looking like this:

/* Verify supported 1G SFP modules */
if (comp_codes_10g == 0 &&
!(hw->phy.sfp_type == ixgbe_sfp_type_1g_cu_core1 ||
hw->phy.sfp_type == ixgbe_sfp_type_1g_cu_core0 ||
hw->phy.sfp_type == ixgbe_sfp_type_1g_lx_core0 ||
hw->phy.sfp_type == ixgbe_sfp_type_1g_lx_core1 ||
hw->phy.sfp_type == ixgbe_sfp_type_1g_sx_core0 ||
hw->phy.sfp_type == ixgbe_sfp_type_1g_sx_core1)) {
hw->phy.type = ixgbe_phy_sfp_unsupported;
status = IXGBE_ERR_SFP_NOT_SUPPORTED;

goto out;
}

We’re going to change it to become like this:

/* Verify supported 1G SFP modules */
if (comp_codes_10g == 0 &&
!(hw->phy.sfp_type == ixgbe_sfp_type_1g_cu_core1 ||
hw->phy.sfp_type == ixgbe_sfp_type_1g_cu_core0 ||
hw->phy.sfp_type == ixgbe_sfp_type_1g_lx_core0 ||
hw->phy.sfp_type == ixgbe_sfp_type_1g_lx_core1 ||
hw->phy.sfp_type == ixgbe_sfp_type_1g_sx_core0 ||
hw->phy.sfp_type == ixgbe_sfp_type_1g_sx_core1)) {
printk(" -- sfp_type did not match, custom driver patched applied! \n");
hw->phy.type = ixgbe_phy_sfp_intel;
status = IXGBE_SUCCESS;

goto out;
}

Step 3: make install

Run this: $ cd ixgbe-5.12.5/src/; sudo make install. This will create the new module and put it inside the directory: /lib/modules/<KERNEL_VERSION>/updates/drivers/net/ethernet/intel/ixgbe/ixgbe.ko

Then:

  • Unload the old (Ubuntu) module: sudo modprobe -r ixgbe
  • Load your shiny new module: sudo modprobe ixgbe
  • Take a look at dmesg to see if the interfaces show up:
    $ dmesg | grep ixgbe
Great success!

EXTRAS

NETPLAN CONFIG

Need your SFP+ devices in Netplan? Add this under the last interface but before version to /etc/netplan/00-installer-config.yaml (mind the indentation):

    ens1f0:
dhcp4: true
optional: true
ens1f1:
dhcp4: true
optional: true
ens2f0:
dhcp4: true
optional: true
ens2f1:
dhcp4: true
optional: true

--

--