Skip to content

Commit

Permalink
Introduce FDB Source User Meta for ACL Table
Browse files Browse the repository at this point in the history
Assign values to sai_fdb_entry_attr_t enum fields

This patch:

opencomputeproject#1259 introduced
explicit numbering to enum fields to avoid breaking warmboot across SAI
spec enhancements while maintaining readability. It fixed saiacl.h and
saihash.h.

Introduce similar explicit numbering for enum sai_fdb_entry_attr_t.
Subsequent stacked commit needs to insert a new enum field in the
middle.

Signed-off-by: Shrikrishna Khare <skhare@fb.com>
  • Loading branch information
shri-khare committed Jan 18, 2022
1 parent 765d524 commit 5480fcd
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions inc/saifdb.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ typedef enum _sai_fdb_entry_attr_t
/**
* @brief Start of attributes
*/
SAI_FDB_ENTRY_ATTR_START,
SAI_FDB_ENTRY_ATTR_START = 0x00000000,

/**
* @brief FDB entry type
Expand All @@ -114,7 +114,7 @@ typedef enum _sai_fdb_entry_attr_t
* @flags CREATE_AND_SET
* @default SAI_PACKET_ACTION_FORWARD
*/
SAI_FDB_ENTRY_ATTR_PACKET_ACTION,
SAI_FDB_ENTRY_ATTR_PACKET_ACTION = SAI_FDB_ENTRY_ATTR_START + 0x1,

/**
* @brief Generate User Defined Trap ID for trap/log actions
Expand All @@ -127,7 +127,7 @@ typedef enum _sai_fdb_entry_attr_t
* @allownull true
* @default SAI_NULL_OBJECT_ID
*/
SAI_FDB_ENTRY_ATTR_USER_TRAP_ID,
SAI_FDB_ENTRY_ATTR_USER_TRAP_ID = SAI_FDB_ENTRY_ATTR_START + 0x2,

/**
* @brief FDB entry bridge port id
Expand All @@ -143,7 +143,7 @@ typedef enum _sai_fdb_entry_attr_t
* @allownull true
* @default SAI_NULL_OBJECT_ID
*/
SAI_FDB_ENTRY_ATTR_BRIDGE_PORT_ID,
SAI_FDB_ENTRY_ATTR_BRIDGE_PORT_ID = SAI_FDB_ENTRY_ATTR_START + 0x3,

/**
* @brief User based Meta Data
Expand All @@ -154,7 +154,7 @@ typedef enum _sai_fdb_entry_attr_t
* @flags CREATE_AND_SET
* @default 0
*/
SAI_FDB_ENTRY_ATTR_META_DATA,
SAI_FDB_ENTRY_ATTR_META_DATA = SAI_FDB_ENTRY_ATTR_START + 0x4,

/**
* @brief Tunnel Endpoint IP. valid for SAI_BRIDGE_PORT_TYPE_TUNNEL
Expand All @@ -163,7 +163,7 @@ typedef enum _sai_fdb_entry_attr_t
* @flags CREATE_AND_SET
* @default 0.0.0.0
*/
SAI_FDB_ENTRY_ATTR_ENDPOINT_IP,
SAI_FDB_ENTRY_ATTR_ENDPOINT_IP = SAI_FDB_ENTRY_ATTR_START + 0x5,

/**
* @brief Attach a counter
Expand All @@ -176,7 +176,7 @@ typedef enum _sai_fdb_entry_attr_t
* @allownull true
* @default SAI_NULL_OBJECT_ID
*/
SAI_FDB_ENTRY_ATTR_COUNTER_ID,
SAI_FDB_ENTRY_ATTR_COUNTER_ID = SAI_FDB_ENTRY_ATTR_START + 0x6,

/**
* @brief Specifies whether a MAC move is allowed
Expand All @@ -188,12 +188,12 @@ typedef enum _sai_fdb_entry_attr_t
* @default false
* @validonly SAI_FDB_ENTRY_ATTR_TYPE == SAI_FDB_ENTRY_TYPE_STATIC
*/
SAI_FDB_ENTRY_ATTR_ALLOW_MAC_MOVE,
SAI_FDB_ENTRY_ATTR_ALLOW_MAC_MOVE = SAI_FDB_ENTRY_ATTR_START + 0x7,

/**
* @brief End of attributes
*/
SAI_FDB_ENTRY_ATTR_END,
SAI_FDB_ENTRY_ATTR_END = SAI_FDB_ENTRY_ATTR_ALLOW_MAC_MOVE,

/** Start of custom range base value */
SAI_FDB_ENTRY_ATTR_CUSTOM_RANGE_START = 0x10000000,
Expand Down

0 comments on commit 5480fcd

Please sign in to comment.