On Mon, Jan 08, 2018 at 02:00:54PM +0000, Matan Azrad wrote: > Hi Gaetan >
<snip> > > > > Your environment does not include the function, but this is within > > > > fs_flow_destroy (please update to include the context by the way it > > > > helps a lot the review :). Afterward, line 162 ret is directly used as > > > > return > > value. > > > > > > > I don't understand what do you mean. > > > > > > > Also, fs_err() would need to transform rte_errno when relevant > > > > (mostly in failsafe_flow.c I think). > > > > > > > Your suggestion is always to update rte_errno to 0 in case the error is > > because of removal? > > > > > > > If the error is indeed due to the device being absent, then rte_errno should > > be set back to its previous value I think. > So, I think it will require old rte_errno save before each device command... > Why not to set it to 0 in the special case(removal) by the new internal API? > Resetting it to 0 might be sufficient, yes. There might be some old-school devs out-there that would such things as: do_thing_x(); do_thing_y(); do_thing_z(); if (check_for_any_error(errno)) { abort(); } But I'm not too fond of this kind of pattern, so I'm not specifically opposed to code that does not go with this flow. -- Gaëtan Rivet 6WIND