ethdev: fix link status race condition
authorTim Shearer <tim.shearer@overturenetworks.com>
Tue, 27 Oct 2015 21:38:55 +0000 (17:38 -0400)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Wed, 4 Nov 2015 22:06:52 +0000 (23:06 +0100)
commitd5790b03b3c440dbcf1a9951024af8b25916abb0
tree15ffe548d6844b1dbfe18aa939d77032c0f2db8a
parentb375513c118a753c24c7f3d4de288c6914d05099
ethdev: fix link status race condition

Calling the Ethernet driver's link_update function from
rte_eth_dev_start can result in a race condition if the NIC raises
the link interrupt at the same time.
Depending on the interrupt handler implementation, the race can cause
the it to think that it received two consecutive link up interrupts,
and it exits without calling the user callback. Appears to impact
E1000/IGB and virtio drivers only.

Signed-off-by: Tim Shearer <tim.shearer@overturenetworks.com>
lib/librte_ether/rte_ethdev.c