Mellanox userland tools and scripts
mellanox / mlnx-tools Goto Github PK
View Code? Open in Web Editor NEWMellanox userland tools and scripts
License: Other
Mellanox userland tools and scripts
License: Other
54a51a7 released 23.07 but this wasn't tagged in the repository
tc_wrap.py is using Popen to execute instructions and the output is in bytes, as no encoding being defined in the argument to Popen.
As the output is in bytes, the regex and split on bytes will fail, this requires the output must be decoded before consumption.
https://github.com/Mellanox/mlnx-tools/blob/mlnx_ofed/python/tc_wrap.py#L153
https://github.com/Mellanox/mlnx-tools/blob/mlnx_ofed/python/tc_wrap.py#L56
see
https://docs.python.org/3.9/whatsnew/3.9.html#removed
"array.array: tostring() and fromstring() methods have been removed. They were aliases to tobytes() and frombytes(), deprecated since Python 3.2."
There's an issue with the udev rules in 82-net-setup-link.rules
, as they result in all network interfaces being renamed, irrespective of the net.ifnames
and biosdevnames
kernel options used to enable or disable consistent network interface device naming.
For instance, on a system with biosdevname=1
and net.ifnames=0
, the expected name for a regular embedded Ethernet interface is em1
.
With the rules in 82-net-setup-link.rules
, the interface is first named em1
as expected, but then because of 82-net-setup-link.rules
, it's renamed a 2nd time to the name that would have been used with net.ifnames=1
(here, it's enp99s0f0
):
# udevadm test --action=add /sys/class/net/em1 |& grep -w NAME
NAME 'em1' /usr/lib/udev/rules.d/71-biosdevname.rules:22
'/etc/infiniband/vf-net-link-name.sh p0 701a77feffe197bc'(out) 'NAME=enp99s0f0'
NAME 'enp99s0f0' /etc/udev/rules.d/82-net-setup-link.rules:3
RUN '/sbin/ethtool -L $env{NAME} combined 4' /etc/udev/rules.d/82-net-setup-link.rules:3
NAME=enp99s0f0
Without those rules, the interface is named correctly:
# rm /etc/udev/rules.d/82-net-setup-link.rules
# udevadm test --action=add /sys/class/net/em1 |& grep -w NAME
NAME 'em1' /usr/lib/udev/rules.d/71-biosdevname.rules:22
I'm not exactly sure what the goal of those udev rules are, but they clearly don't work when consistent network interface device naming is disabled or when the naming rules are changed. And the impact non-Mellanox interfaces too, so maybe they could be restricted with a vendor check or something?
Thanks!
I see that site-packages is used in some places:
if os.path.exists('/usr/lib/python2.7/site-packages'):
sys.path.append('/usr/lib/python2.7/site-packages')
Should not this be 'dist-packages' for debian/ubuntu?
Hi, when distro
is not installed, it uses platform
as distro
, though, platform
does not have an linux_distribution()
method. It will raise an error. A workaround is to either forcibly install distro
or using platform.uname()
as an alternate.
The mlnx_tune
offer so many profile.
I am so curios.
What's the default profile if I just running /usr/sbin/mlnx_tune
command ?
Hi, I installed v5.1.3 on Rocky 9.3 but I get the error:
Your system does not support the Buffers command
Your system does not support the ETS function.
Since it doesn't work, I want to uninstall v5.1.3 to try the latest version v23.07.3, but I don't know how to uninstall v5.1.3?
When running mlx_fs_dump only python 3.9.5, I see the following syntax warnings:
# ./mlx_fs_dump -v
./mlx_fs_dump:294: SyntaxWarning: "is not" with a literal. Did you mean "!="?
if (i % 2) and (cr is not "0"):
./mlx_fs_dump:306: SyntaxWarning: "is not" with a literal. Did you mean "!="?
if node.dst_type is not "0":
./mlx_fs_dump:310: SyntaxWarning: "is not" with a literal. Did you mean "!="?
if node.dst_vhca_id_valid is not 0:
./mlx_fs_dump:319: SyntaxWarning: "is not" with a literal. Did you mean "!="?
if (i % 2) and (cr is not "0"):
./mlx_fs_dump:324: SyntaxWarning: "is" with a literal. Did you mean "=="?
if cr is "IPv4":
./mlx_fs_dump:340: SyntaxWarning: "is not" with a literal. Did you mean "!="?
if index is not -1:
./mlx_fs_dump:351: SyntaxWarning: "is not" with a literal. Did you mean "!="?
if index is not -1:
./mlx_fs_dump:446: SyntaxWarning: "is" with a literal. Did you mean "=="?
if match_enable is "NO_MATCH":
usage: mlx_fs_dump [-h] -d DEVICE [-g GVMI] [-c COLOR] [-f IN_FILE]
mlx_fs_dump: error: the following arguments are required: -d
Solution was to adjust all is not
to !=
and all is
to ==
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.