p4lang / p4runtime

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

WIP: Reconfiguration APIs to allow multiple P4 pipelines to be chained. #445

Open loalan opened 11 months ago

loalan commented 11 months ago

The goal of these changes are:

These additions should be backwards compatible and include add, remove, enable and disable pipeline operations. Each pipeline has a unique pipeline ID. Entities are referenced per pipeline. SetForwardingPipelineConfig allows the user to specify the placement of a new pipeline relative to the reference/default pipeline in the ForwardingPipelineConfig

See overview at: https://drive.google.com/file/d/1V9mt1BKciCoMlHfIl5IZ65PaKA9jhaev/view?usp=sharing

Background paper: https://www.usenix.org/system/files/nsdi22-paper-xing.pdf

saynb commented 11 months ago

Somewhat related to https://github.com/p4lang/p4runtime/issues/316 ?

chrispsommers commented 11 months ago

My initial impression is that this is a useful, elegant and backwards compatible (!) change worthy of consideration. Thanks for submitting.

BTW, I enabled a CI run out of habit, and noticed the generated code check failed. You can address this when you're ready by following the simple procedure described in https://github.com/p4lang/p4runtime#detailed-processes, see the paragraph beginning with "When updating the Protobuf files...".

chrispsommers commented 11 months ago

Somewhat related to #316 ?

Good point. It also raises another question in my mind - when specifying the id field inPipelineId, what assumptions if any are made about how this is mapped to a particular architecture's physical pipelines, e.g. if an ASIC has four physical pipes, each of which can accept a single ForwardingPipelineConfig, how would this map? And, imagining we carried through with https://github.com/p4lang/p4runtime/issues/316, would a conflict arise with this PR?

loalan commented 11 months ago

Somewhat related to #316 ?

Yes, it seems somewhat related at the protobuf level. However, the use case is quite different. I'll take a look and see if they can be unified somewhat.

smolkaj commented 11 months ago

@loalan we noticed at the WG meeting that the slides are all flipped by 90 degrees. Any chance you could upload a version where things are oriented the usual way?