Skip to content

Commit

Permalink
UDT attributes for RIF loopback and Neighbor table miss
Browse files Browse the repository at this point in the history
Allow user to set the User Defined Traps to control packets sent to CPU
when RIF loopback action or  neighbor table miss has Trap action.

Signed-off-by: rck-innovium <rck@marvell.com>
  • Loading branch information
rck-innovium committed Aug 14, 2024
1 parent 4b2e595 commit 2b8a6ea
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
2 changes: 2 additions & 0 deletions inc/saihostif.h
Original file line number Diff line number Diff line change
Expand Up @@ -687,6 +687,8 @@ typedef enum _sai_hostif_user_defined_trap_type_t
* @brief Neighbor table traps
*
* Generated by neighbor table entry hit with action trap/log, or by neighbor table miss
* for a router interface that has SAI_ROUTER_INTERFACE_ATTR_NEIGHBOR_MISS_PACKET_ACTION
* set to SAI_PACKET_ACTION_TRAP
*/
SAI_HOSTIF_USER_DEFINED_TRAP_TYPE_NEIGHBOR,

Expand Down
29 changes: 29 additions & 0 deletions inc/sairouterinterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,35 @@ typedef enum _sai_router_interface_attr_t
*/
SAI_ROUTER_INTERFACE_ATTR_ADMIN_MPLS_STATE,

/**
* @brief Generate User Defined Trap ID for trap/log actions
* Applicable when
* SAI_ROUTER_INTERFACE_ATTR_NEIGHBOR_MISS_PACKET_ACTION
* is trap/log.
*
* @type sai_object_id_t
* @flags CREATE_AND_SET
* @objects SAI_OBJECT_TYPE_HOSTIF_USER_DEFINED_TRAP, SAI_OBJECT_TYPE_HOSTIF_TRAP
* @allownull true
* @default SAI_NULL_OBJECT_ID
*/
SAI_ROUTER_INTERFACE_ATTR_NEIGHBOR_MISS_TRAP_ID,

/**
* @brief Trap to use when a packet ingress and gets routed on the same RIF
*
* Applicable when
* SAI_ROUTER_INTERFACE_ATTR_LOOPBACK_PACKET_ACTION
* is trap/log.
*
* @type sai_object_id_t
* @flags CREATE_AND_SET
* @objects SAI_OBJECT_TYPE_HOSTIF_USER_DEFINED_TRAP, SAI_OBJECT_TYPE_HOSTIF_TRAP
* @allownull true
* @default SAI_NULL_OBJECT_ID
*/
SAI_ROUTER_INTERFACE_ATTR_LOOPBACK_PACKET_TRAP_ID,

/**
* @brief End of attributes
*/
Expand Down

0 comments on commit 2b8a6ea

Please sign in to comment.