BMv2 simple_switch switches P4 programs at runtime

refer to:

[P4-dev] swapping p4 program using load_new_config and swap_configs commands

Switch P4 program when BMv2 is running

--enable-swap1. Add parameters when running simple_switch :

simple_switch [your regular options] <your initial JSON config> -- --enable-swap

2. Start the runtime CLI:

./simple_switch_CLI --thrift-port [the thrift port of your target switch]

3. Switch the json file that configures BMv2 through two primitive commands: load_new_configandswap_configs

  • load_new_config: push the new json configuration to the target switch, the data plane has not changed at this time , in other words, the target switch still processes the incoming datagram according to the previous configuration (or P4 procedure); however, the control plane needs to follow the new Configuration and P4 programs issue control rules, but these control rules currently do not affect the processing of the data plane;
  • swap_configs: Enable the new json configuration on the data plane.

2018.4

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325070871&siteId=291194637