@@ -43,6 +43,15 @@ _devlink_direct_complete()
value=$(devlink -j dev param show 2>/dev/null \
| jq ".param[\"$dev\"][].name")
;;
+ port_param_name)
+ dev=${words[4]}
+ # dev could be a port or a netdev so find the port
+ portdev=$(devlink -j port show dev $dev 2>/dev/null \
+ | jq '.port as $ports | $ports | keys[] as $keys | keys[0] ')
+
+ value=$(devlink -j port param show 2>/dev/null \
+ | jq ".param[$portdev][].name")
+ ;;
port)
value=$(devlink -j port show 2>/dev/null \
| jq '.port as $ports | $ports | keys[] as $key
@@ -401,7 +410,7 @@ _devlink_port_param()
return
;;
6)
- _devlink_direct_complete "param_name"
+ _devlink_direct_complete "port_param_name"
return
;;
esac