Commit 4b94a2fa authored by Petr Machata's avatar Petr Machata Committed by David S. Miller
Browse files

selftests: mlxsw: qos_lib: Add a wrapper for running mlnx_qos



mlnx_qos is a script for configuration of DCB. Despite the name it is not
actually Mellanox-specific in any way. It is currently the only ad-hoc tool
available (in contrast to a daemon that manages an interface on an ongoing
basis). However, it is very verbose and parsing out error messages is not
really possible. Add a wrapper that makes it easier to use the tool.

Signed-off-by: default avatarPetr Machata <petrm@nvidia.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5b3a53c9
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -82,3 +82,17 @@ bail_on_lldpad()
		fi
	fi
}

__mlnx_qos()
{
	local err

	mlnx_qos "$@" 2>/dev/null
	err=$?

	if ((err)); then
		echo "Error ($err) in mlnx_qos $@" >/dev/stderr
	fi

	return $err
}