avnu / detd Goto Github PK
View Code? Open in Web Editor NEWProof-of-concept for a developer-friendly system service to handle time-sensitive applications.
License: BSD 3-Clause "New" or "Revised" License
Proof-of-concept for a developer-friendly system service to handle time-sensitive applications.
License: BSD 3-Clause "New" or "Revised" License
Manager's add_talker and add_listener create their own InterfaceManager instances. We should have a single InterfaceManager instance that encapsulates the Tx and Rx resources needed on both directions.
For example, the following items should be considered as "per interface settings" that the unified InterfaceManager would need to control:
remove_listener should:
The script would:
Add a test script that runs a sequence of talker stream configurations on target. This will help to expose issues specific to device capabilities.
The script will take as argument the name of a network interface.
It will then run the following sequence, handling the responses:
For the remaining values like VID, it is fine to re-use the same as in the regular examples for the time being.
After the merge of listener support, we should refactor the protobuf stream request messages.
More details to come in this ticket once the PR is merged. The key ideas are:
Some Alder Lake SKUs include integrated TSN MACs.
The EHL plugin can be used as a reference: https://github.com/Avnu/detd/blob/30aeb789903ae66424d0f1c3ce87406d863a0467/detd/devices/intel_mgbeehl.py
Some suggested changes:
That should be enough for a first round of testing.
We are leaving out aspects like launch time control or ingress optimization until the listener stream support and launch time control support are merged.
Hi,
I just noticed that when the service sends a StreamQosResponse with ok = False
, an empty packet is received on receiver side.
The reason for that is that protobuf messages are allowed to contain null bytes (and a False boolean is encoded as null byte \0
).
Unfortunately, that is also the terminator of a datagram. In the current implementation that probably got unnoticed, because if ok = False
the subsequent fields are ignored anyway. However, I still think we should avoid sending raw protobuf messages via unix datagram sockets.
I am happy to provide a fix, but since there are many different options to solve this, I would appreciate your opinion on this topic:
What do you think?
Some Raptor Lake SKUs include integrated TSN MACs.
The EHL plugin can be used as a reference: https://github.com/Avnu/detd/blob/30aeb789903ae66424d0f1c3ce87406d863a0467/detd/devices/intel_mgbeehl.py
Some suggested changes:
That should be enough for a first round of testing.
We are leaving out aspects like launch time control or ingress optimization until the listener stream support and launch time control support are merged.
Developing and testing QoS configurations involve at least two end-stations connected back-to-back, plus potentially a development host.
This ticket is about adding some helper tools based on ansible, to streamline testing on several target machines, by driving the tests from the development host. The only requirement on the end-stations is to have ansible and ssh available.
Implement listener streams
When the service is stopped, the interface should be returned to its original state, or at least to one close to it. E.g.:
The code currently executes ethtool commands with the Ethtool class:
Line 23 in 30aeb78
In some cases, this leads to problems when two commands are issues consecutively. A workaround is to sleep one second, like in:
detd/detd/devices/intel_i225.py
Line 67 in 30aeb78
This is not optimal, and introduces a delay of 1 second, that accounts for a big chunk of the execution time.
The code should use the SIOCETHTOOL to implement the ethtool operations instead. One suggested implementation could be:
Line 349 in 30aeb78
Related to this PR, specifically to decoupling the backend selection from the implementation:
https://github.com/Avnu/detd/pull/20/files#r1582042749
Please note that detd will still default to the most sensible (e.g. hardware accelerated) setup by default. This class is intended to allow to override that configuration.
This class allows the customization of the specific implementation of the traffic specification and qos provided in the configuration. Based on the hint and the device capabilities, the initialization sequence will instantiate the specific classes to implement it. E.g. it may decide to use specific mappings, taprio modes, etc.
This ticket only contains the changes to provide the info an get that to the InterfaceManager for usage.
The processing of the hint to implement the specific spec/QoS will be described in a separated ticket.
We introduce a new class Hints. This class allows to select how the traffic specifications have to be implemented. It just holds the following attributes, with the described possible values:
We may add a class Hints in the scheduler module. This is a temporary location to enable the merge of the PR:
#20
Each device plugin will provide a default Hints instantiation that will define how the traffic spec / QoS will be implemented if no other Hints are provided by the caller.
It should be possible to calculate the default hints based on the device capabilities, so a method could be added to device fr that. But it should also be possible to override it. Other parameters would depend on the framework as well, like the AF_XDP_ZC or other data path implementations.
Plugin | TxSelection | TxSelectionOffload | DataPath | LaunchTimeControl | Preemption |
---|---|---|---|---|---|
I210 | Qbv | false | AF_PACKET | false | false |
I225 | Qbv | true | AF_PACKET | false | false |
EHL | Qbv | true | AF_PACKET | false | false |
If the Configuration constructor contains a hint, it will be assigned to Configuration.hints
Otherwise, the default value will be None
This hints value will be directly passed through without further processing across Proxy, Service, Manager and up to InterfaceManager. E.g. no change to the hints will be made on its way to InterfaceManager.
The InterfaceManager will have an attribute hints, that will be initialized to the default hints for the device associated to the specific interface.
When a new talker or listener is added:
Diagnostics mode for performance measuring.
For timestamping we could do timestamp in talker -> send to listener, or timestamp in both talker and listener and compare. What do you think/do you have any other ideas?
This PR introduces an ansible playbook, and some scripts to perform testing on target systems:
The code could be reduced by merging:
The above may also have the potential to reduce the size of the ansible playbook.
Currently, we offer an interface to add a single TimeAware stream:
Line 4 in 1a327a1
That is exposed via the InterfaceManager's add_talker method:
https://github.com/Avnu/detd/tree/master?tab=readme-ov-file#current-functionality
This ticket is about adding a new method that allows to add multiple talkers on the same interface simultaneously. E.g.:
add_talkers([config1, config2, ...])
Or with some additional changes:
add_talkers(interface, [config1, config2, ...])
This is specially beneficial in scenarios where the use case configuration involves multiple streams but it is fixed, but the operation of the device prevents to update the streams on the fly.
On top of providing the hints (#21), this issue adds the actual configuration for the interface.
For the initial version, it is enough to use the device hints from the SystemConfigurator to select the right Qdisc variant. Initially, cover just:
In the future, we may add the tx-assisted variant. Another future improvement may be to initialize different configurator objects in the InterfaceManager constructor depending on the backed to use, so there is no selection in runtime.
On top of using the right taprio backend, the mapping also needs to be customized in the InterfaceManager initialization. The reason is, software taprio allows more flexibility than actual hardware, like modifying the traffic classes, and the meaning of the mapping is also different. In order to implement the change:
i210 support is missing and could be useful to add. I'm currently working on an implementation
remove_talker should:
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.