i40e problem with DAC

I found a strange “workaround” for this issue.
I was pretty sure this was an issue with Mikrotik CHR, but it seems it has nothing to do with it.

Youtube short recording with the issue and “workaround”: https://www.youtube.com/watch?v=Dt97NDDTiU0

Short description of what happens in the video:

Machine was just started.
SSH to Proxmox host and do an ip a to show the interface is there.
Login to Proxmox web.
Start Mikrotik CHR VM.
Open VM’s console and check ethernet for link.
Result: no link.

Reboot machine.
SSH to Proxmox host and issue ethtool enp3s0f0 (with or without watch -n1 does not matter)
Login to Proxmox web.
Start Mikrotik CHR VM.
Open VM’s console and check ethernet for link.
Result: link.

I have repeated this multiple times to make sure it was not just a fluke.

Now, I have absolutely no clue why just issuing ethtool enp3s0f0 before starting the VM fixes this problem.
There is nothing changed on the nic, just displaying some info about it.
Issuing the command after the VM has been started will throw some error that it cannot find the interface and does not fix the issue.


How to automate it until a fix will be available (if ever):

Edit /etc/network/interfaces file and add pre-up /usr/sbin/ethtool like:

auto enp3s0f0
iface enp3s0f0 inet manual
        pre-up /usr/sbin/ethtool enp3s0f0

auto enp3s0f1
iface enp3s0f1 inet manual
        pre-up /usr/sbin/ethtool enp3s0f1

Need auto enp3s0f0 and auto enp3s0f1 or else the pre-up command is not executed.



Maybe anyone more versed can shed a light on this?