net/failsafe: fix removed device handling
authorMatan Azrad <matan@mellanox.com>
Sat, 20 Jan 2018 21:12:24 +0000 (21:12 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Sun, 21 Jan 2018 20:09:43 +0000 (21:09 +0100)
commitae80146c5a1ba8ddab686d4bc2e4663e78677457
tree015fe014f67a03607d54cfc167e9a3f9f06d4734
parent2407c4e6e73b28f159fc42cf30dc4fd6a3e50d8b
net/failsafe: fix removed device handling

There is time between the physical removal of the device until
sub-device PMDs get a RMV interrupt. At this time DPDK PMDs and
applications still don't know about the removal and may call sub-device
control operation which should return an error.

In previous code this error is reported to the application contrary to
fail-safe principle that the app should not be aware of device removal.

Add an removal check in each relevant control command error flow and
prevent an error report to application when the sub-device is removed.

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
drivers/net/failsafe/failsafe_flow.c
drivers/net/failsafe/failsafe_ops.c
drivers/net/failsafe/failsafe_private.h