Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support reconstruction of
SchedClassifierLink
This is the proposed solution for Step 2 of issue #414 “For cases where you have done program.take_link() to manage ownership of TcLink we need an API similar to PinnedLink::from_pin that can reconstruct a TcLink” As long as a user application continues to run after executing `take_link()`, the `SchedClassifierLink` returned can be used to detach the program. However, if we want to handle cases where the application exits or crashes, we need a way to save and reconstruct the link, and to do that, we also need to know the information required for the reconstruction -- namely, the `interface`, `attach_type`, `priority`, and `handle`. The user knows the first two because they are required to execute `attach()` in the first place; however, the user will not know the others if they let the system choose them. This pr solves the problems by adding an `impl` for `SchedClassifierLink` with an accessor for `tc_options` and a `new()` function. Signed-off-by: Andre Fredette <afredette@redhat.com>
- Loading branch information