参考:

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

BMv2 运行时切换P4程序

相关演示demo:demo

1.在运行simple_switch时加入--enable-swap参数:

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

2.启动运行时CLI:

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

3.通过两种元语命令切换配置BMv2的json文件:load_new_config_fileswap_configs

  • load_new_config_file: 将新的json配置推送至目标交换机,此时数据平面尚未改变,换句话说,目标交换机仍然按照先前的配置(或P4程序)对来访的数据报进行处理;然而,控制平面需要按照新的配置和P4程序下发控制规则,但这些控制规则目前不会影响数据平面的处理;
  • swap_configs: 在数据平面启用新的json配置。

2018.4

相关文章:

  • 2021-06-10
  • 2021-12-03
  • 2021-10-03
  • 2022-12-23
  • 2021-05-25
  • 2021-07-17
  • 2021-04-12
  • 2021-07-05
猜你喜欢
  • 2022-01-12
  • 2022-12-23
  • 2021-11-25
  • 2021-12-14
  • 2021-11-29
  • 2022-12-23
  • 2021-08-27
相关资源
相似解决方案