Hi Matan, I am a bit concerned with the forceful rte_errno reset within fs_err, I think it would have been safer to only do this when rte_errno is modified by the eth_dev ops (either in rte_flow or another library).
This means that the eth_dev API will be slightly different whether the ethdev is a fail-safe or a bare device, which might throw off some users. One could read the eth_dev source and not see any rte_errno change, and wonder why it is modified on some specific ports. But this is pretty minor, and if problem arises it will be easy to pinpoint and fix, so I won't bother you further on this patch. Thanks for the good work. On Wed, Jan 10, 2018 at 12:31:05PM +0000, Matan Azrad wrote: > 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 <ma...@mellanox.com> Acked-by: Gaetan Rivet <gaetan.ri...@6wind.com> > --- > drivers/net/failsafe/failsafe_flow.c | 18 ++++++++++------- > drivers/net/failsafe/failsafe_ops.c | 35 > ++++++++++++++++++++++----------- > drivers/net/failsafe/failsafe_private.h | 11 +++++++++++ > 3 files changed, 46 insertions(+), 18 deletions(-) > -- Gaëtan Rivet 6WIND