10G Sfp+ Pci Card

Keep fingers crossed that someone from VyOS team picks up on this task among the others who suggest to use the latest out-of-tree drivers for intel nics rather than the in-kernel drivers.

https://vyos.dev/T5619

Edit: Related 10G SFP+ trouble with linking (Intel X553)

So lets hope VyOS-team will switch to the out-of-tree drivers…

1 Like

@huseyintr27 as @Apachez mentioned, @samip537 created a git repo with VyOS 1.4 and 1.5 (or not?) with the out-of-tree ixgbe driver with ISO ready to run from. You may want to give it go just to see if that would solve your issue. VyOS itself don’t hurry into using that solution it seems.

Samip537 github ISO

2 Likes

Do you have an easy how-to compile the kernel for VyOX manually (without having to disect the github workflow)?

There’s a function import missing … but I guess you know that already

/__w/vyos-build/vyos-build/vyos-build/packages/linux-kernel/ixgbe-5.19.9/src/ixgbe_main.c: In function ‘ixgbe_probe’:
/__w/vyos-build/vyos-build/vyos-build/packages/linux-kernel/ixgbe-5.19.9/src/ixgbe_main.c:12707:9: error: implicit declaration of function ‘pci_enable_pcie_error_reporting’ [-Werror=implicit-function-declaration]
12707 |         pci_enable_pcie_error_reporting(pdev);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 Like

I’ll give it a go tomorrow, sorry for the question about the compiling, it does seem the obvious place to look for the how to :slight_smile:

2 Likes

Look I’m not a much of a programmer but usually quite ok with debugging stuff. I don’t understand your remark about the upstream e1000 since that function is part of the kernel.

$ find ./ -type f |xargs fgrep -H 'pci_enable_pcie_error_reporting'                                                                                                                
./linux/drivers/pci/pcie/aer.c:static int pci_enable_pcie_error_reporting(struct pci_dev *dev)
./linux/drivers/pci/pcie/aer.c:         pci_enable_pcie_error_reporting(dev);
1 Like

I couldn’t do it because I didn’t know how to install it to the existing ISO.

Had a look and an internet search after encountering the same error compiling the module manually.

Found the solution: There’s a patch missing removing these two functions which got redundant a year ago:

[PATCH 9/9] ixgbe: Remove redundant pci_enable_pcie_error_reporting()

Add the following patch to custom-patches/patches/linux-kernel/ixgbe/, file ixgbe_main_pci-error-reporting.patch:

--- src/ixgbe_main.c.orig       2024-01-28 23:23:45.524118332 +0100
+++ src/ixgbe_main.c    2024-01-28 23:24:32.276287746 +0100
@@ -12704,8 +12704,6 @@
        if (mac_type == ixgbe_mac_82598EB)
                pci_disable_link_state(pdev, PCIE_LINK_STATE_L0S);

-       pci_enable_pcie_error_reporting(pdev);
-
        pci_set_master(pdev);

 #ifdef HAVE_TX_MQ
@@ -13416,8 +13414,6 @@
        disable_dev = !test_and_set_bit(__IXGBE_DISABLED, &adapter->state);
        free_netdev(netdev);

-       pci_disable_pcie_error_reporting(pdev);
-
        if (disable_dev)
                pci_disable_device(pdev);

and modify build-intel-ixgbe.sh, add line 49 below

 48 cp -v ${CWD}/custom-patches/patches/linux-kernel/ixgbe/common.mk ${DRIVER_DIR}/src
 49 patch ${DRIVER_DIR}/src/ixgbe_main.c ${CWD}/custom-patches/patches/linux-kernel/ixgbe/ixgbe_main_pci-error-reporting.patch
 50 sed -i 's/VXLAN_HEADROOM))/VXLAN_HF_RCO))/g' ${DRIVER_DIR}/src/ixgbe_main.c

With these changes it compiles for me, manually done of course.

Morning @samip537, I saw you tried and the workflow failed anyway because the patch did not apply. I’ll check if there’s a copy/paste error on my part or why it didn’t apply, it’s against the same sources (/me is confused).

Edit: there was an indentation difference of one space, let’s try again. This time the file is attached too, just to make sure: ixgbe_main_pci-error-reporting.patch.txt (537 Bytes)

--- src/ixgbe_main.c.orig	2024-01-29 06:20:32.546484028 +0100
+++ src/ixgbe_main.c	2024-01-29 06:21:14.162630776 +0100
@@ -12704,8 +12704,6 @@
 	if (mac_type == ixgbe_mac_82598EB)
 		pci_disable_link_state(pdev, PCIE_LINK_STATE_L0S);
 
-	pci_enable_pcie_error_reporting(pdev);
-
 	pci_set_master(pdev);
 
 #ifdef HAVE_TX_MQ
@@ -13416,8 +13414,6 @@
 	disable_dev = !test_and_set_bit(__IXGBE_DISABLED, &adapter->state);
 	free_netdev(netdev);
 
-	pci_disable_pcie_error_reporting(pdev);
-
 	if (disable_dev)
 		pci_disable_device(pdev);
 

SM and MM did not see any of the modules. It sees PCI Cards, but it does not see SFP+ Modules. It is important to find the modules it sees. Currently, I have 2 Huawei brand modules, it only saw these. However, it does not see every module of Huawei.

Sorry for dups but for future references:

Both IXGBE out-ot-tree drivers and Huawei kernel NIC drivers have been added yesterday and are available since VyOS 1.5-rolling-202402020022:

https://github.com/vyos/vyos-rolling-nightly-builds/releases/tag/1.5-rolling-202402020022

According to below details it also seems like it have been backported to the 1.4.0-RC:

3 Likes