Skip to content

Support for Next Hop Meta Data #2181

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 23 additions & 2 deletions inc/saiacl.h
Original file line number Diff line number Diff line change
Expand Up @@ -1579,10 +1579,19 @@ typedef enum _sai_acl_table_attr_t
*/
SAI_ACL_TABLE_ATTR_FIELD_DST_PREFIX_META = SAI_ACL_TABLE_ATTR_FIELD_START + 0x161,

/**
* @brief Nexthop DST User metadata
*
* @type bool
* @flags CREATE_ONLY
* @default false
*/
SAI_ACL_TABLE_ATTR_FIELD_NEXT_HOP_USER_META = SAI_ACL_TABLE_ATTR_FIELD_START + 0x162,

/**
* @brief End of ACL Table Match Field
*/
SAI_ACL_TABLE_ATTR_FIELD_END = SAI_ACL_TABLE_ATTR_FIELD_DST_PREFIX_META,
SAI_ACL_TABLE_ATTR_FIELD_END = SAI_ACL_TABLE_ATTR_FIELD_NEXT_HOP_USER_META,

/**
* @brief ACL table entries associated with this table.
Expand Down Expand Up @@ -2707,10 +2716,22 @@ typedef enum _sai_acl_entry_attr_t
*/
SAI_ACL_ENTRY_ATTR_FIELD_DST_PREFIX_META = SAI_ACL_ENTRY_ATTR_FIELD_START + 0x161,

/**
* @brief Match user meta data in Next Hop Table
*
* Value must be in the range defined in
* #SAI_SWITCH_ATTR_NEXT_HOP_USER_META_DATA_RANGE
*
* @type sai_acl_field_data_t sai_uint32_t
* @flags CREATE_AND_SET
* @default disabled
*/
SAI_ACL_ENTRY_ATTR_FIELD_NEXT_HOP_USER_META = SAI_ACL_ENTRY_ATTR_FIELD_START + 0x162,

/**
* @brief End of Rule Match Fields
*/
SAI_ACL_ENTRY_ATTR_FIELD_END = SAI_ACL_ENTRY_ATTR_FIELD_DST_PREFIX_META,
SAI_ACL_ENTRY_ATTR_FIELD_END = SAI_ACL_ENTRY_ATTR_FIELD_NEXT_HOP_USER_META,

/*
* Actions [sai_acl_action_data_t]
Expand Down
11 changes: 11 additions & 0 deletions inc/sainexthop.h
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,17 @@ typedef enum _sai_next_hop_attr_t
*/
SAI_NEXT_HOP_ATTR_DISABLE_VLAN_REWRITE,

/**
* @brief User based Meta Data
*
* Value Range #SAI_SWITCH_ATTR_NEXT_HOP_USER_META_DATA_RANGE
*
* @type sai_uint32_t
* @flags CREATE_AND_SET
* @default 0
*/
SAI_NEXT_HOP_ATTR_META_DATA,

/**
* @brief End of attributes
*/
Expand Down
8 changes: 8 additions & 0 deletions inc/saiswitch.h
Original file line number Diff line number Diff line change
Expand Up @@ -3460,6 +3460,14 @@ typedef enum _sai_switch_attr_t
*/
SAI_SWITCH_ATTR_DEFAULT_CPU_EGRESS_BUFFER_POOL,

/**
* @brief Nexthop DST Table user-based meta data range
*
* @type sai_u32_range_t
* @flags READ_ONLY
*/
SAI_SWITCH_ATTR_NEXT_HOP_USER_META_DATA_RANGE,

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