Detect when a device is rxe (soft RoCE) #316
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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: