OpenVisualCloud / Media-Transport-Library

A real-time media transport(DPDK, AF_XDP, RDMA) stack for both raw and compressed video based on COTS hardware.
BSD 3-Clause "New" or "Revised" License
161 stars 51 forks source link

Link status is not correclty updated for E810 NIC on Windows #181

Open EricHouet opened 1 year ago

EricHouet commented 1 year ago

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 :

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:


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. :)

frankdjx commented 1 year ago

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.

EricHouet commented 1 year ago

We finally had the time to test on Linux.

This issue is not present on Linux...

frankdjx commented 1 year ago

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 commented 1 year ago

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

qiaoliu78 commented 1 year ago

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

EricHouet commented 1 year ago

@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.

qiaoliu78 commented 1 year ago

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

EricHouet commented 1 year ago

@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.

frankdjx commented 1 year ago

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 commented 1 year ago

@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.