This guide and the accompanying doxygen documentation are targetted at developpers that wish to design their own switch model using the building blocks exposed by bmv2. We have not documented every single method in doxygen; instead only the public methods which can help you design and implement your own model have been documented and are visible here.
If you are not yet familiar with bmv2 (if you have never used bmv2 before), you should be starting with the [bmv2 README] (https://github.com/p4lang/behavioral-model).
The bmv2 code already comes with 3 example targets: [simple_router] (https://github.com/p4lang/behavioral-model/tree/master/targets/simple_router), [l2_switch] (https://github.com/p4lang/behavioral-model/tree/master/targets/l2_switch) and [simple_switch] (https://github.com/p4lang/behavioral-model/tree/master/targets/simple_switch). simple_router is the smallest and simplest one, and I suggest starting with it. l2_switch introduces some additional complexity by including a packet replication engine (to support multicast). simple_switch is the standard P4 target and although it includes a lot of functionality, the code is still relatively small and straightforward.
As the bmv2 code becomes more stable, we intend to improve this documentation and include a step-by-step guide on how to design and implement your target using bmv2. I believe that a step-by-step guide recreating the implementation of the l2_switch target would be most useful.
TODO
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。