Media-Transport-Library icon indicating copy to clipboard operation
Media-Transport-Library copied to clipboard

Link status is not correclty updated for E810 NIC on Windows

Open EricHouet opened this issue 1 year ago • 10 comments

Hello,

I have an issue regarding the link status when using a Intel E810 NIC with DPDK.

I have a simple sample which simply loops, call rte_eth_link_get and prints the result.

When using a E810 NIC, I have the following behaviour :

  • At the start of the test, the cable is plugged in;
  • I launch the sample, the link is reported as up (as expected)
  • I unplug the cable
  • The link is still reported as up in the sample (not expected).
  • I stop the sample and relaunch it
  • The link is reported as down by the sample (as expected)
  • I replug the cable
  • The link is still reported as down by the sample (not expected).

I looks like, once DPDK is started, the link status of the device is not correctly updated.

When trying this with an XXV710, i have no issue.

According to the Overview of Networking Drivers, the ice driver is compatible "Link Status" and "Link Status Event" functionalities.


Setup:

  • DPDK v22.11.1
  • DDPD : ice-1.3.30.0.pkg.

I am not sure that this is the right place to post this issue, but I did not know where to post it.

If there is a better way to report this issue, you can ignore this and point me to the right direction. :)

EricHouet avatar Feb 24 '23 11:02 EricHouet

Sounds like one issue in the E810 PMD drive in dpdk, maybe you can paste and ask help on https://bugs.dpdk.org/

Do you know if same issue can be found in Linux also since most guys are running DPDK from Linux.

frankdjx avatar Feb 27 '23 02:02 frankdjx

We finally had the time to test on Linux.

This issue is not present on Linux...

EricHouet avatar Mar 23 '23 10:03 EricHouet

Maybe it is caused by the IRQ is not working on Windows. But is this issue critical to your workload? I don't know in which scenario it need plugged in/out cable?

frankdjx avatar Mar 24 '23 01:03 frankdjx

@qiaoliu78 Do you know what's the cause for this issue?

frankdjx avatar Mar 24 '23 01:03 frankdjx

what is the driver you use in linux? pf driver or vf driver?

qiaoliu78 avatar Mar 24 '23 01:03 qiaoliu78

@jianxind The issue is that sometimes, mainly the first try after the system reboot, the link is down at the start of the DPDK process and stays down because of the issue. In that case it is critical as the link status is never correct.

Otherwise it is more a matter of error management. If a cable was unplugged, it should be possible for the user to see that he can not use the related NIC anymore.

@qiaoliu78 On linux, we use pf driver.

EricHouet avatar Mar 24 '23 08:03 EricHouet

if the link is down at the start, I think DPDK can not start correctly

qiaoliu78 avatar Mar 28 '23 01:03 qiaoliu78

@qiaoliu78 That does not seem to be the case. DPDK starts, even if the link is down at the start.

The issue here is that the link status is never updated, once DPDK is started.

EricHouet avatar Mar 28 '23 07:03 EricHouet

We has a link status check in the start routine. See https://github.com/OpenVisualCloud/Media-Transport-Library/blob/10a962465a54de7b56745beca6894f692568f76d/lib/src/mt_dev.c#L1990

frankdjx avatar Mar 28 '23 08:03 frankdjx

@ricmli Seems this issue is exactly the same to the one(IRQ not working with UIO) we get on IAVF with UIO(https://github.com/OpenVisualCloud/Media-Transport-Library/blob/main/patches/dpdk/22.11/windows/0013-Use-alarm-to-workaround-vf-uio-no-intr-issue.patch).

Maybe we can use similar polling code to workaround the IRQ problem.

frankdjx avatar May 10 '23 03:05 frankdjx