p4runtime icon indicating copy to clipboard operation
p4runtime copied to clipboard

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

Open loalan opened this issue 2 years ago • 5 comments

The goal of these changes are:

  • provide the primitive operations to allow the user to create a P4 service chain
  • support adding, removing and reconfiguring of multiple P4 pipelines to a single device
  • allow for dynamic pipeline changes at runtime (update)

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

loalan avatar Aug 09 '23 20:08 loalan

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

saynb avatar Aug 10 '23 00:08 saynb

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 avatar Aug 10 '23 16:08 chrispsommers

Somewhat related to #316 ?

Good point. It also raises another question in my mind - when specifying the id field in PipelineId, 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?

chrispsommers avatar Aug 10 '23 16:08 chrispsommers

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.

loalan avatar Aug 10 '23 16:08 loalan

@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?

smolkaj avatar Aug 11 '23 16:08 smolkaj