p4lang / p4runtime

Specification documents for the P4Runtime control-plane API
Apache License 2.0
142 stars 88 forks source link

Can an arbitration triple be reused after the StreamChannel associated with it is closed? #365

Closed smolkaj closed 2 years ago

smolkaj commented 2 years ago

The specification currently says:

The P4Runtime server only keeps track of the (device_id, role, election_id) of each StreamChannel that has sent a successful MasterArbitrationUpdate message, and maintains the invariant that all such 3-tuples are unique.

But how is the set X of 3-tuples determined? It is clear that we add a tuple to X whenever a master arbitration succeeds. Do we also remove tuples from X when the controller owning the tuple disconnects?

@jonathan-dilorenzo @zhenk14 for visibility.

smolkaj commented 2 years ago

AFAICT, the more sensible thing to do is to remove tuples when a controller disconnects, as it allows the controller to reconnect without a new election ID.

Are there any advantages to not allowing reuse of the same tuple in the above fashion?

smolkaj commented 2 years ago

@rhalstea pointed out the following related ambiguity in the spec: image

smolkaj commented 2 years ago

Quick recap of our discussion during the P4 API WG meeting:

The next step here is for us to make a concrete proposal on how to clarify the spec.

antoninbas commented 2 years ago

Should we close this issue now?

jonathan-dilorenzo commented 2 years ago

Yes. The merged PR should resolve this.