Commit 4240dbd8 authored by Shalom Toledo's avatar Shalom Toledo Committed by David S. Miller

selftests: mlxsw: Add mlxsw lib

Add mlxsw lib for common defines, helpers etc.
Signed-off-by: default avatarShalom Toledo <shalomt@mellanox.com>
Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9fb74734
#!/bin/bash
# SPDX-License-Identifier: GPL-2.0
##############################################################################
# Defines
if [[ ! -v MLXSW_CHIP ]]; then
MLXSW_CHIP=$(devlink -j dev info $DEVLINK_DEV | jq -r '.[][]["driver"]')
if [ -z "$MLXSW_CHIP" ]; then
echo "SKIP: Device $DEVLINK_DEV doesn't support devlink info command"
exit 1
fi
fi
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment