bmv2
Designing your own switch target with bmv2
|
Public Member Functions | |
virtual bool | lookup (const ByteContainer &key_data, internal_handle_t *handle) const =0 |
virtual bool | entry_exists (const K &key) const =0 |
virtual bool | retrieve_handle (const K &key, internal_handle_t *handle) const =0 |
virtual void | add_entry (const K &key, internal_handle_t handle)=0 |
virtual void | delete_entry (const K &key)=0 |
virtual void | clear ()=0 |
Completely remove all entries from the data structure. More... | |
This class defines an interface for all data structures used in Match Units to perform lookups. Custom data strucures can be created by implementing this interface, and creating a LookupStructureFactory subclass which will create them.
|
pure virtual |
Store an entry in the lookup structure. Associates the given handle with the given entry.
|
pure virtual |
Completely remove all entries from the data structure.
|
pure virtual |
Remove a given entry from the structure. Has no effect if the entry does not exist.
|
pure virtual |
Check whether an entry exists. This is distinct from a lookup operation in that this will also match against the prefix length in the case of an LPM structure, and against the mask and priority in the case of a Ternary structure.
|
pure virtual |
Look up a given key in the data structure. Return true and set handle to the found value if there is a match Return false if there is no match (value in handle is undefined)
|
pure virtual |
Retrieve the handle of an entry. Returns true if and only if an entry exists. See entry_exists() for more information about the notion of entry existence.