Intel X552 10 GbE Issues

Hello, I have a Supermicro X10SDV-TP8F which has an Intel X552 onboard that I am trying to get working with VyOS. The system recognizes the interfaces and even relabels them (to eth6/eth7) however if I try to assign an IP address or any other settings I get errors when committing. For example, after setting an IP address on the interface I get the following:

Could not set flowcontrol for eth7
[ interfaces ethernet eth7 ]
Could not set flowcontrol for eth7
VyOS had an issue completing a command.

We are sorry that you encountered a problem while using VyOS.
There are a few things you can do to help us (and yourself):
- Contact us using the online help desk if you have a subscription:
  https://support.vyos.io/
- Make sure you are running the latest version of VyOS available at:
  https://vyos.net/get/
- Consult the community forum to see how to handle this issue:
  https://forum.vyos.io
- Join us on Slack where our users exchange help and advice:
  https://vyos.slack.com

When reporting problems, please include as much information as possible:
- do not obfuscate any data (feel free to contact us privately if your 
  business policy requires it)
- and include all the information presented below

Report time:      2023-05-02 18:24:48
Image version:    VyOS 1.4-rolling-202305010317
Release train:    current

Built by:         autobuild@vyos.net
Built on:         Mon 01 May 2023 03:17 UTC
Build UUID:       9d08b14d-b7a9-4275-8b17-db00820bcca9
Build commit ID:  88be901bc103d1

Architecture:     x86_64
Boot via:         installed image
System type:      bare metal

Hardware vendor:  Supermicro
Hardware model:   SYS-5018D-FN8T
Hardware S/N:     
Hardware UUID:    

Traceback (most recent call last):
  File "/usr/libexec/vyos/conf_mode/interfaces-ethernet.py", line 220, in <module>
    apply(c)
  File "/usr/libexec/vyos/conf_mode/interfaces-ethernet.py", line 209, in apply
    e.update(ethernet)
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/ethernet.py", line 374, in update
    self.set_speed_duplex(speed, duplex)
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/ethernet.py", line 172, in set_speed_duplex
    return self._cmd(cmd)
           ^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/control.py", line 52, in _cmd
    return cmd(command, self.debug)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vyos/util.py", line 161, in cmd
    raise OSError(code, feedback)
OSError: [Errno 75] failed to run command: ethtool --change eth7 autoneg on
returned: 
exit code: 75

noteworthy:
cmd 'ethtool --pause eth7 autoneg on tx on rx on'
returned (out):

returned (err):
netlink error: Invalid argument
cmd 'ethtool --change eth7 autoneg on'
returned (out):

returned (err):
netlink error: link settings update failed
netlink error: Invalid argument

[[interfaces ethernet eth7]] failed
Commit failed

If I try to set disable-flow-control on the interface I get a similar message:

[ interfaces ethernet eth7 ]
VyOS had an issue completing a command.

We are sorry that you encountered a problem while using VyOS.
There are a few things you can do to help us (and yourself):
- Contact us using the online help desk if you have a subscription:
  https://support.vyos.io/
- Make sure you are running the latest version of VyOS available at:
  https://vyos.net/get/
- Consult the community forum to see how to handle this issue:
  https://forum.vyos.io
- Join us on Slack where our users exchange help and advice:
  https://vyos.slack.com

When reporting problems, please include as much information as possible:
- do not obfuscate any data (feel free to contact us privately if your 
  business policy requires it)
- and include all the information presented below

Report time:      2023-05-02 18:43:27
Image version:    VyOS 1.4-rolling-202305010317
Release train:    current

Built by:         autobuild@vyos.net
Built on:         Mon 01 May 2023 03:17 UTC
Build UUID:       9d08b14d-b7a9-4275-8b17-db00820bcca9
Build commit ID:  88be901bc103d1

Architecture:     x86_64
Boot via:         installed image
System type:      bare metal

Hardware vendor:  Supermicro
Hardware model:   SYS-5018D-FN8T
Hardware S/N: 
Hardware UUID: 

Traceback (most recent call last):
  File "/usr/libexec/vyos/conf_mode/interfaces-ethernet.py", line 220, in <module>
    apply(c)
  File "/usr/libexec/vyos/conf_mode/interfaces-ethernet.py", line 209, in apply
    e.update(ethernet)
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/ethernet.py", line 374, in update
    self.set_speed_duplex(speed, duplex)
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/ethernet.py", line 172, in set_speed_duplex
    return self._cmd(cmd)
           ^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/control.py", line 52, in _cmd
    return cmd(command, self.debug)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vyos/util.py", line 161, in cmd
    raise OSError(code, feedback)
OSError: [Errno 75] failed to run command: ethtool --change eth7 autoneg on
returned: 
exit code: 75

noteworthy:
cmd 'ethtool --change eth7 autoneg on'
returned (out):

returned (err):
netlink error: link settings update failed
netlink error: Invalid argument

[[interfaces ethernet eth7]] failed
Commit failed

Hopefully some helpful information:

$ ethtool -I eth7
Settings for eth7:
	Supported ports: [ FIBRE ]
	Supported link modes:   10000baseT/Full
	Supported pause frame use: Symmetric
	Supports auto-negotiation: No
	Supported FEC modes: Not reported
	Advertised link modes:  10000baseT/Full
	Advertised pause frame use: Symmetric
	Advertised auto-negotiation: No
	Advertised FEC modes: Not reported
	Speed: 10000Mb/s
	Duplex: Full
	Auto-negotiation: off
	Port: FIBRE
	PHYAD: 0
	Transceiver: internal
	Supports Wake-on: d
	Wake-on: d
        Current message level: 0x00000007 (7)
                               drv probe link
	Link detected: yes
$ lspci | grep Eth
04:00.0 Ethernet controller: Intel Corporation Ethernet Connection X552 10 GbE SFP+
04:00.1 Ethernet controller: Intel Corporation Ethernet Connection X552 10 GbE SFP+
07:00.0 Ethernet controller: Intel Corporation I210 Gigabit Network Connection (rev 03)
08:00.0 Ethernet controller: Intel Corporation I210 Gigabit Network Connection (rev 03)
0b:00.0 Ethernet controller: Intel Corporation I350 Gigabit Network Connection (rev 01)
0b:00.1 Ethernet controller: Intel Corporation I350 Gigabit Network Connection (rev 01)
0b:00.2 Ethernet controller: Intel Corporation I350 Gigabit Network Connection (rev 01)
0b:00.3 Ethernet controller: Intel Corporation I350 Gigabit Network Connection (rev 01)

Anything that I am doing wrong or missing?

Thanks

EDIT: Looks like this might be related to T3891. Anyway I can help further troubleshoot this?

Hello Ipstatic,
i confirm we have this problem too, and not only on Intel NICs but on Chelsio too.

I’m not a dev but i was able to pinpoint the root cause on a wrong logic in /usr/lib/python3/dist-packages/vyos/ifconfig/ethernet.py not considering the possibility of drivers not able to change all settings.
As a workaround i added a catchall except:

+        except:
+            print('Warning: ethtool cannot change this settings!')

after the

except PermissionError: section.

Now i think commit f2ecc97 by @c-po should have fixed this bug.

I suggest you to try to build a new vyos-1x package with the latest git pull.

oTo

Ok this is to confirm bug is NOT solved, or better, now at least changing config produces the correct error message, instead of crashing, but flow control remains on.

vyos@VYOS-TEST# sh interfaces ethernet eth6 | commands
set address '192.168.2.1/24'
set disable-flow-control
set hw-id 'ac:1f:6b:aa:aa:aa'
vyos@VYOS-TEST:~$ ethtool -a eth6
Pause parameters for eth6:
Autonegotiate:  off
RX:             on
TX:             on

Now disabling flow control manually:

vyos@VYOS-TEST:~$ ethtool -A eth6 rx off tx off autoneg off
vyos@VYOS-TEST:~$ ethtool -a eth6
Pause parameters for eth6:
Autonegotiate:  off
RX:             off
TX:             off

oTo

I can confirm that commit fixes my issue.