CAN interface support#1858
Open
hundeboll wants to merge 6 commits intolabgrid-project:masterfrom
Open
Conversation
Add a new "canpipe" verb to the ``labgrid-raw-interface`` helper script, that configures a can interface according to its arguments, opens and binds a raw can socket to the interface, and starts the ``labgrid-tap-fwd`` script to pipe frames between the interface and stdin/stdout. This allows a client to create a corresponding pipe on its own end to pipe the frames to/from a local virtual can interface. Signed-off-by: Martin Hundebøll <martin@geanix.com>
To be able to pipe CAN frames to/from a remote agent, the network namespace agent should support creating a virtual CAN interface. This allows creating the pipe unprivileged, which is a prerequisite for testing remote CAN interfaces with labgrid. Signed-off-by: Martin Hundebøll <martin@geanix.com>
589a334 to
7a736c1
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1858 +/- ##
========================================
- Coverage 45.8% 45.7% -0.1%
========================================
Files 182 183 +1
Lines 14718 14895 +177
========================================
+ Hits 6743 6817 +74
- Misses 7975 8078 +103
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
2340232 to
566427c
Compare
Add a driver that utilizes the CAN pipe support added in the previous commits. The driver is primarily intended to used to send and receive frames through its ``recv()`` and ``send()`` methods, but it also provides CAN interface access to "external" programs using the ``namespace_prefix`` property. Signed-off-by: Martin Hundebøll <martin@geanix.com>
Since the unshare method doesn't create a mount namespace, the nsenter method shouldn't try to enter a mount namespace. Signed-off-by: Martin Hundebøll <martin@geanix.com>
Signed-off-by: Martin Hundebøll <martin@geanix.com>
The tests require the `vcan` kernel module to be available, and a `vcan0` module must ve created manually before running the tests. The `vcan` kernel module is not available in the Github Runner (azure) images, but a request has been submitted to enable it in the Azure kernel packages: actions/runner-images#13991 Signed-off-by: Martin Hundebøll <martin@geanix.com>
Contributor
Author
|
Let me know if there's anything I can do to get this moving. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Add a driver for CAN interfaces. Local CAN interfaces are "just" opened. Remote (exporter) interfaces are piped through SSH similar to the recently added raw network interface pipe support.
The driver has been tested both on a local CAN interface (with and without privileges), and on a remote/exported CAN interface.
Checklist
Fixes #1289
Replaces #1719