Skip to content

Detect when a device is rxe (soft RoCE) #316

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

tzafrir-mellanox
Copy link

Added a heuristic to detect when a device is rxe (rdma-core soft-RoCE driver).

First patch is the required change. Second patch is mostly added as a motivator and I'm not sure I want to keep it here.

Motivation: I wanted to add some self checks to the package I include in Debian. Debian uses a packages testing framework called autopkgtest. The only device I can get to work on a generic machine is rxe. I created a test for it.

Tests ran generally OK (with no errors. I'm not completely sure if I could have better monitoring of results. I still mark them as "superficial"). But some spit an line to standard error about "Device not recognized to implement inline feature. Disabling it", and autopkgtest's default logic is that output to stderr means an error. So I wanted to avoid that to catch real errors.

** Running the test: **
The second commit has the script. By default it runs everything (including "setup" and "shutdown" operations that create and destroy a rxe interface, accordingly. I have not tested it on a machine with a real interface.

If you actually want to test autopkgtest:

sudo apt install autopkgtest   # maybe also need to install mmdebootstrap
sudo autopkgtest-build-qemu unstable /var/cache/autopkgtest/vm/unstable.img
# In the top-level directory of this repository:
autopkgtest . -- qemu /var/cache/autopkgtest/vm/unstable.img

Tzafrir Cohen and others added 2 commits February 27, 2025 10:03
The rxe provider does not set its own vendor ID. Use an alternative that
relies on the default naming scheme for rxe interfaces.

Avoids an ugly warning and thus allowed me to get through loopback
tests with a clean standard error.
if (context->device == NULL) {
return false;
}
return ! strncmp("rxe", context->device->name, 3);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any soft roce device will have 'rxe' as prefix?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants