Skip to content

Comments

Add facility for link-specific role configuration#139

Draft
jk-ozlabs wants to merge 11 commits intoCodeConstruct:mainfrom
jk-ozlabs:dev/link-config-roles
Draft

Add facility for link-specific role configuration#139
jk-ozlabs wants to merge 11 commits intoCodeConstruct:mainfrom
jk-ozlabs:dev/link-config-roles

Conversation

@jk-ozlabs
Copy link
Member

This series adds a per-link configuration syntax, where mctpd role configuration can be applied to specific interfaces.

Interface configuration data consists of:

  • a match configuration, defining which interfaces the configuration it applies to
  • the configuration data itself

With these changes, we can set the interface role, and match interfaces on transport type (i2c/serial/usb/etc)

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant