Message ID | 20180425091200.GA29940@splinter.mtl.com (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
> > Recently it became possible for listeners of the FIB notification chain > > to veto operations such as addition of routes and rules. > > > > Adjust the mlxsw driver to take advantage of it and return an error for > > unsupported FIB rules and for routes configured after the abort > > mechanism was triggered (due to exceeded resources for example). > > I'll apply this set for now. I had to patch router_scale.sh to prevent > it from failing: > > diff --git a/tools/testing/selftests/drivers/net/mlxsw/router_scale.sh > b/tools/testing/selftests/drivers/net/mlxsw/router_scale.sh > index 12722835129e..2fe0c155f4cc 100755 > --- a/tools/testing/selftests/drivers/net/mlxsw/router_scale.sh > +++ b/tools/testing/selftests/drivers/net/mlxsw/router_scale.sh > @@ -95,8 +95,7 @@ router_routes_create() > done > done > > - ip -b $ROUTE_FILE > - check_err $? "Route insertion failed" > + ip -b $ROUTE_FILE &> /dev/null > } > > router_routes_destroy() > @@ -115,10 +114,6 @@ router_test() > RET=0 > > router_routes_create $route_count > - check_err $? "Route insertaion failed" > - if [[ $RET -ne 0 ]]; then > - return > - fi > > router_offload_validate $route_count > check_err_fail $should_fail $? "Offload of $route_count routes" Reviewed-by: Yuval Mintz <yuvalm@mellanox.com> Although it might make sense to add a comment in router_routes_create() stating we're deliberately not checking for errors since when used for negative testing it might return an error [and rightfully so].
diff --git a/tools/testing/selftests/drivers/net/mlxsw/router_scale.sh b/tools/testing/selftests/drivers/net/mlxsw/router_scale.sh index 12722835129e..2fe0c155f4cc 100755 --- a/tools/testing/selftests/drivers/net/mlxsw/router_scale.sh +++ b/tools/testing/selftests/drivers/net/mlxsw/router_scale.sh @@ -95,8 +95,7 @@ router_routes_create() done done - ip -b $ROUTE_FILE - check_err $? "Route insertion failed" + ip -b $ROUTE_FILE &> /dev/null } router_routes_destroy() @@ -115,10 +114,6 @@ router_test() RET=0 router_routes_create $route_count - check_err $? "Route insertaion failed" - if [[ $RET -ne 0 ]]; then - return - fi router_offload_validate $route_count check_err_fail $should_fail $? "Offload of $route_count routes"