net/failsafe: fix state synchro cleanup
authorGaetan Rivet <grive@u256.net>
Mon, 12 Oct 2020 14:19:04 +0000 (16:19 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 16 Oct 2020 17:48:17 +0000 (19:48 +0200)
commit352074b3a4b1518f3c1ec70865c407f135d8fa4d
tree71f8a80d808ee955da083b8fea02554cc037196b
parentee7a8fafbaf44cd25af61e86f7a7351111eb64a0
net/failsafe: fix state synchro cleanup

During a hotplug attempt, failsafe will try to bring a subdevice that
just appeared to its internal state. On error, the subdevice is marked
for removal and will be cleaned up.

However failsafe_dev_remove() only remove active devices. Devices that
failed during probe will be stuck in DEV_PARSED state repeatedly.

Consider all devices when doing a removal round, but limit burst control
and stats saving to active devices.

Fixes: 598fb8aec6f6 ("net/failsafe: support device removal")
Cc: stable@dpdk.org
Signed-off-by: Gaetan Rivet <grive@u256.net>
drivers/net/failsafe/failsafe_ether.c