forked from sonic-net/sonic-buildimage
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make virtual switch use metadata (sonic-net#77)
- Loading branch information
Showing
35 changed files
with
2,032 additions
and
3,799 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#ifndef __SAI_VS_STATE__ | ||
#define __SAI_VS_STATE__ | ||
|
||
#include <unordered_map> | ||
#include <string> | ||
|
||
#include "sai_meta.h" | ||
|
||
#include "saiserialize.h" | ||
#include "saiattributelist.h" | ||
|
||
typedef std::unordered_map<std::string, std::string> AttrHash; | ||
typedef std::unordered_map<std::string, AttrHash> ObjectHash; | ||
|
||
// first key is serialized object ID (object id, vlan, route, neighbor, fdb, trap) | ||
// value is hash containing attributes | ||
// second key is serialized attribute ID for given object | ||
// value is serialized attribute value | ||
extern ObjectHash g_objectHash; | ||
|
||
extern void reset_id_counter(); | ||
|
||
extern sai_object_id_t switch_object_id; | ||
|
||
extern sai_status_t init_switch(); | ||
|
||
#endif // __SAI_VS_STATE__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.