Add facility for link-specific role configuration#139
Draft
jk-ozlabs wants to merge 11 commits intoCodeConstruct:mainfrom
Draft
Add facility for link-specific role configuration#139jk-ozlabs wants to merge 11 commits intoCodeConstruct:mainfrom
jk-ozlabs wants to merge 11 commits intoCodeConstruct:mainfrom
Conversation
Rather than explicityly setting ctx->default_role, allow setting any role pointer. We will use this to parse non-default roles in future. Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
Currently, we're flipping between "role" and "mode" for the endpoint / bus-owner settings. Be consistent, so use 'role' everywhere. "mode" is still supported for the config, for backwards compatibility. Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
We added the Unkown state for the dbus interface, but not for the configuration. Add a short paragraph documenting this. Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
Add an 'args' argument for MctpdWrapper, allowing arbitrary arguments to be specified. Use that facility in the main() function to pass sys.argv to mctpd. For example: python3 ./tests/mctpenv/__init__.py obj/test-mctpd -c mctpd.conf -v Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
We'll want to use it for upcoming link configuration. Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
We would like to be able to specify configurations that apply to individual interfaces; mainly for splitting Bus Owner vs. Endpoint roles across a mctpd instance. Add base infrastructure for interface-specific configurations, through a `[[interface]]` table in the configuration toml. These interface sections consists of: * a `match` configuration, defining which interfaces the configuration it applies to * the configuration data itself At this point, the only match type we support is "all" (matching all interfaces), and no configuration data is defined. These will be expanded in upcoming changes. Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
Allow an interface configuration to set the role on matched interfaces. Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
A common use-case is to apply configuration by binding type. For example, having a USB "upstream" link, on which we act as an endpoint, and i2c downstream links, on which we act as a bus owner. Allow interface matches on physical binding types. Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
Look up the sysfs path for a MCTP interface, and store it on the link. We use the ops facility for this, to allow the test infrastructure to set arbitrary sysfs paths for simulated links. Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
Now that we have sysfs path data for links, allow configuration matches on the path (including via globs). This provides a harware-topology-consistent method of specifying individual links. Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
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.
This series adds a per-link configuration syntax, where mctpd role configuration can be applied to specific interfaces.
Interface configuration data consists of:
matchconfiguration, defining which interfaces the configuration it applies toWith these changes, we can set the interface role, and match interfaces on transport type (i2c/serial/usb/etc)