summaryrefslogtreecommitdiff
path: root/virt/lib
diff options
context:
space:
mode:
authorAmit Cohen <amitc@mellanox.com>2019-11-18 10:50:00 +0300
committerDavid S. Miller <davem@davemloft.net>2019-11-19 04:11:54 +0300
commit646cf7ed9abba7cc1a45f70243cd94808d4c8b6b (patch)
treee9a07168ff42a6a90f8479521206ee924c63d514 /virt/lib
parentb22b0b0b10aa16bfe020f0ce506ab78a4d8a5fd4 (diff)
downloadlinux-646cf7ed9abba7cc1a45f70243cd94808d4c8b6b.tar.xz
selftests: forwarding: Add ethtool_lib.sh
Functions: 1. speeds_arr_get The function returns an array of speed values from /usr/include/linux/ethtool.h The array looks as follows: [10baseT/Half] = 0, [10baseT/Full] = 1, ... 2. ethtool_set: params: cmd The function runs ethtool by cmd (ethtool -s cmd) and checks if there was an error in configuration 3. dev_speeds_get: params: dev, with_mode (0 or 1), adver (0 or 1) return value: Array of supported/Advertised link modes with/without mode * Example 1: speeds_get swp1 0 0 return: 1000 10000 40000 * Example 2: speeds_get swp1 1 1 return: 1000baseKX/Full 10000baseKR/Full 40000baseCR4/Full 4. common_speeds_get: params: dev1, dev2, with_mode (0 or 1), adver (0 or 1) return value: Array of common speeds of dev1 and dev2 * Example: common_speeds_get swp1 swp2 0 0 return: 1000 10000 Assuming that swp1 supports 1000 10000 40000 and swp2 supports 1000 10000 Signed-off-by: Amit Cohen <amitc@mellanox.com> Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'virt/lib')
0 files changed, 0 insertions, 0 deletions