# P4Runtime Role Config Schemas

**URL:** https://forum.p4.org/t/p4runtime-role-config-schemas/515
**Category:** P4 Dev
**Created:** [November 4, 2022, 10:59pm UTC](https://forum.p4.org/t/p4runtime-role-config-schemas/515 "2022-11-04T22:59:31Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![blp](https://avatars.discourse-cdn.com/v4/letter/b/ac8455/32.png) [@blp](https://forum.p4.org/u/blp)
#### Post date: [November 4, 2022, 10:59pm UTC](https://forum.p4.org/t/p4runtime-role-config-schemas/515/1 "2022-11-04T22:59:31Z")

</div>

P4Runtime 1.3.0 section 5.2 Role Config says:

> The `role.config` field in the `MasterArbitrationUpdate` message sent by the controller describes the role configuration, i.e. which operations are in the scope of a given role. In particular, the definition of a role may include the following:
> 
> - A list of P4 entities for which the controller may issue `Write` updates and receive notification messages (e.g. `DigestList` and `IdleTimeoutNotification` ).
> - Whether the controller is able to receive `PacketIn` messages, along with a filtering mechanism based on the values of the `PacketMetadata` fields to select which `PacketIn` messages should be sent to the controller.
> - Whether the controller is able to send `PacketOut` messages, along with a filtering mechanism based on the values of the `PacketMetadata` fields to select which `PacketOut` messages are allowed to be sent by the controller.
> 
> An unset `role.config` implies “full pipeline access” (similar to the default role explained above). In order to support different role definition schemes, `role.config` is defined as an `Any` Protobuf message [[31](https://p4.org/p4-spec/p4runtime/main/P4Runtime-Spec.html#protoany)]. Such schemes are out-of-scope of this document. When partitioning of the control plane is desired, the P4Runtime client(s) and server need to agree on a role definition scheme in an out-of-band fashion.

Have any role definition schemas been defined? I’m writing a P4Runtime server implementation.

---

<div class="post-metadata">

### Author: ![byllyfish](https://avatars.discourse-cdn.com/v4/letter/b/c37758/32.png) [@byllyfish](https://forum.p4.org/u/byllyfish)
#### Post date: [November 5, 2022, 1:59am UTC](https://forum.p4.org/t/p4runtime-role-config-schemas/515/2 "2022-11-05T01:59:31Z")

</div>

Stratum uses this one:

> <https://github.com/stratum/stratum/blob/main/stratum/public/proto/p4_role_config.proto>

-Bill

---

<div class="post-metadata">

### Author: ![blp](https://avatars.discourse-cdn.com/v4/letter/b/ac8455/32.png) [@blp](https://forum.p4.org/u/blp)
#### Post date: [November 8, 2022, 1:46am UTC](https://forum.p4.org/t/p4runtime-role-config-schemas/515/3 "2022-11-08T01:46:35Z")

</div>

Thanks, it’s good to see an example!
