bmv2
Designing your own switch target with bmv2
|
Go to the source code of this file.
Classes | |
class | bm::LookupStructure< K > |
class | bm::LookupStructureFactory |
This file contains 2 classes: bm::LookupStructure and bm::LookupStructureFactory. When implementing your target, you may wish to provide custom implementations of the data structures used to perform matches. This can be done by inheriting from one or more of bm::ExactLookupStructure, bm::LPMMatchStructure, and bm::TernaryMatchStructure. Each of these is a specialization of the bm::LookupStructure template for the corresponding match key type.
Once the implementation of the new lookup structure is complete, you must extend the bm::LookupStructureFactory class to build instances of it. This is relatively simple. An (abridged) example of creating a new bm::Switch using a custom lookup structure is as follows