Skip to content

[UBI] On the fly update of a P4 program

Proposers

  • Georgios P. Katsikas

Description

When a special config_rule is passed, the P4 device driver should be able to replace the current P4 pipeline with a new one:

device_config/config_rules/__firmware__/p4_bin_path = PATH to P4 bin file

device_config/config_rules/__firmware__/p4_info_path = PATH to P4 info file

This should trigger the following call:

self.__manager.CLIENT.set_fwd_pipe_config(p4info_path, p4bin_path)

Demo or definition of done

  • Assumption: Copy both the initial and new P4 programs into the device pod
    • This is a restriction we have because of k8s. Normally, the copy of the new P4 program should be done by the driver on the fly
  • Connect to a P4 switch and load an initial P4
  • Install a test rule into the initial pipeline
  • Pass the firmware rules using SetConfig
  • Verify that the self.__manager.CLIENT.set_fwd_pipe_config
    • This can only fail of the new P4 files are not in the device pod
  • Observe that the pipeline is reloaded
  • Install a new test rule into the new pipeline

Side effects

Try to address potential bug on #76

Acknowledgement

This work is funded by the European Commission through P2CODE - “Programming Platform for intelligent COllaborative DEployments over heterogeneous edge-IoT environments” under GA No. 101093069

Edited by Georgios P. Katsikas