Skip to content
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
140 changes: 140 additions & 0 deletions doc/custom-headers/saiaclcustom.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
/**
* Copyright (c) 2018 Microsoft Open Technologies, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT
* LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS
* FOR A PARTICULAR PURPOSE, MERCHANTABILITY OR NON-INFRINGEMENT.
*
* See the Apache Version 2.0 License for specific language governing
* permissions and limitations under the License.
*
* Microsoft would like to thank the following companies for their review and
* assistance with these files: Intel Corporation, Mellanox Technologies Ltd,
* Dell Products, L.P., Facebook, Inc., Marvell International Ltd.
*
* @file saiaclcustom.h
*
* @brief This module defines ACL custom of the Switch Abstraction Interface (SAI)
*/

#ifndef __SAIACLCUSTOM_H_
#define __SAIACLCUSTOM_H_

#include <saiacl.h>

/**
* @brief Custom ACL Action Type
*
* @flags free
*/
typedef enum _sai_acl_action_type_custom_t {
/** Start of custom action type. */
SAI_ACL_ACTION_TYPE_CUSTOM_RANGE_START = SAI_ACL_ACTION_TYPE_CUSTOM_RANGE_BASE,
/**
* @brief ACTION TYPE 1
*/
SAI_ACL_ACTION_TYPE_1 = SAI_ACL_ACTION_TYPE_CUSTOM_RANGE_START,

/** End of custom action type. */
SAI_ACL_ACTION_TYPE_CUSTOM_RANGE_END
} sai_acl_action_type_custom_t;

/**
* @brief SAI ACL table attribute custom
*
* @flags free
*/
typedef enum _sai_acl_table_attr_custom_t {
/**
* @brief Start of ACL table custom attributes
*/
SAI_ACL_TABLE_ATTR_CUSTOM_RANGE_START = SAI_ACL_TABLE_ATTR_CUSTOM_RANGE_BASE,
/**
* @brief Custom 1
*
* @type bool
* @flags CREATE_ONLY
* @default false
*/
SAI_ACL_TABLE_ATTR_1 = SAI_ACL_TABLE_ATTR_CUSTOM_RANGE_START,

SAI_ACL_TABLE_ATTR_CUSTOM_RANGE_END,

/**
* @brief Start of ACL table custom field attributes
*/
SAI_ACL_TABLE_ATTR_FIELD_CUSTOM_RANGE_START = SAI_ACL_TABLE_ATTR_FIELD_CUSTOM_RANGE_BASE,
/**
* @brief Custom 1
*
* @type bool
* @flags CREATE_ONLY
* @default false
*/
SAI_ACL_TABLE_ATTR_FIELD_1 = SAI_ACL_TABLE_ATTR_FIELD_CUSTOM_RANGE_START,
/**
* @brief Custom 2
*
* @type bool
* @flags CREATE_ONLY
* @default false
*/
SAI_ACL_TABLE_ATTR_FIELD_2,

/** End of custom range base */
SAI_ACL_TABLE_ATTR_FIELD_CUSTOM_RANGE_END
} sai_acl_table_attr_custom_t;

/**
* @brief SAI ACL entry attribute custom,
*
* @flags free
*/
typedef enum _sai_acl_entry_attr_custom_t {
/**
* @brief Start of ACL entry custom field attributes
*/
SAI_ACL_ENTRY_ATTR_FIELD_CUSTOM_RANGE_START = SAI_ACL_ENTRY_ATTR_FIELD_CUSTOM_RANGE_BASE,
/**
* @brief Custom 1
*
* @type bool
* @flags CREATE_ONLY
* @default false
*/
SAI_ACL_ENTRY_ATTR_FIELD_1 = SAI_ACL_ENTRY_ATTR_FIELD_CUSTOM_RANGE_START,
/**
* @brief Custom 2
*
* @type bool
* @flags CREATE_ONLY
* @default false
*/
SAI_ACL_ENTRY_ATTR_FIELD_2,

/** End of custom range base */
SAI_ACL_ENTRY_ATTR_FIELD_CUSTOM_RANGE_END,

/**
* @brief Start of ACL entry custom action attributes
*/
SAI_ACL_ENTRY_ATTR_ACTION_CUSTOM_RANGE_START = SAI_ACL_ENTRY_ATTR_ACTION_CUSTOM_RANGE_BASE,
/**
* @brief Custom 1
*
* @type bool
* @flags CREATE_ONLY
* @default false
*/
SAI_ACL_ENTRY_ATTR_ACTION_1 = SAI_ACL_ENTRY_ATTR_ACTION_CUSTOM_RANGE_START,

/** End of ACL entry custom action attributes */
SAI_ACL_ENTRY_ATTR_ACTION_CUSTOM_RANGE_END
} sai_acl_entry_attr_custom_t;

#endif /* __SAIACLCUSTOM_H_ */
3 changes: 3 additions & 0 deletions doc/custom-headers/saiportcustom.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
*/
typedef enum _sai_port_attr_custom_t
{
SAI_PORT_ATTR_CUSTOM_RANGE_START = SAI_PORT_ATTR_CUSTOM_RANGE_BASE,
/**
* @brief Custom 1
*
Expand All @@ -43,6 +44,8 @@ typedef enum _sai_port_attr_custom_t
*/
SAI_PORT_ATTR_CUSTOM1 = SAI_PORT_ATTR_CUSTOM_RANGE_START,

SAI_PORT_ATTR_CUSTOM_RANGE_END

/* Add new csutom port attributes above this line */

} sai_port_attr_custom_t;
Expand Down
65 changes: 28 additions & 37 deletions inc/saiacl.h
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,9 @@ typedef enum _sai_acl_action_type_t
/** Bind a TAM object */
SAI_ACL_ACTION_TYPE_TAM_OBJECT = 0x0000003d,

/** Custom range base of ACL action type */
SAI_ACL_ACTION_TYPE_CUSTOM_RANGE_BASE = 0x10000000

} sai_acl_action_type_t;

/**
Expand Down Expand Up @@ -408,14 +411,9 @@ typedef enum _sai_acl_table_group_attr_t
SAI_ACL_TABLE_GROUP_ATTR_END,

/**
* @brief Custom range base value start
* @brief Custom range base value
*/
SAI_ACL_TABLE_GROUP_ATTR_CUSTOM_RANGE_START = 0x10000000,

/**
* @brief End of Custom range base
*/
SAI_ACL_TABLE_GROUP_ATTR_CUSTOM_RANGE_END
SAI_ACL_TABLE_GROUP_ATTR_CUSTOM_RANGE_BASE = 0x10000000

} sai_acl_table_group_attr_t;

Expand Down Expand Up @@ -467,14 +465,9 @@ typedef enum _sai_acl_table_chain_group_attr_t
SAI_ACL_TABLE_CHAIN_GROUP_ATTR_END,

/**
* @brief Custom range base value start
*/
SAI_ACL_TABLE_CHAIN_GROUP_ATTR_CUSTOM_RANGE_START = 0x10000000,

/**
* @brief End of Custom range base
* @brief Custom range base value
*/
SAI_ACL_TABLE_CHAIN_GROUP_ATTR_CUSTOM_RANGE_END
SAI_ACL_TABLE_CHAIN_GROUP_ATTR_CUSTOM_RANGE_BASE = 0x10000000

} sai_acl_table_chain_group_attr_t;

Expand Down Expand Up @@ -553,14 +546,9 @@ typedef enum _sai_acl_table_group_member_attr_t
SAI_ACL_TABLE_GROUP_MEMBER_ATTR_END,

/**
* @brief Custom range base value start
*/
SAI_ACL_TABLE_GROUP_MEMBER_ATTR_CUSTOM_RANGE_START = 0x10000000,

/**
* @brief End of Custom range base
* @brief Custom range base value
*/
SAI_ACL_TABLE_GROUP_MEMBER_ATTR_CUSTOM_RANGE_END
SAI_ACL_TABLE_GROUP_MEMBER_ATTR_CUSTOM_RANGE_BASE = 0x10000000

} sai_acl_table_group_member_attr_t;

Expand Down Expand Up @@ -1699,14 +1687,14 @@ typedef enum _sai_acl_table_attr_t
SAI_ACL_TABLE_ATTR_END,

/**
* @brief Custom range base value start
* @brief Custom range base value
*/
SAI_ACL_TABLE_ATTR_CUSTOM_RANGE_START = 0x10000000,
SAI_ACL_TABLE_ATTR_CUSTOM_RANGE_BASE = 0x10000000,

/**
* @brief End of Custom range base
* @brief Custom field attribute range base value
*/
SAI_ACL_TABLE_ATTR_CUSTOM_RANGE_END
SAI_ACL_TABLE_ATTR_FIELD_CUSTOM_RANGE_BASE = SAI_ACL_TABLE_ATTR_CUSTOM_RANGE_BASE + 0x00001000

} sai_acl_table_attr_t;

Expand Down Expand Up @@ -3387,11 +3375,20 @@ typedef enum _sai_acl_entry_attr_t
*/
SAI_ACL_ENTRY_ATTR_END,

/** Custom range base value */
SAI_ACL_ENTRY_ATTR_CUSTOM_RANGE_START = 0x10000000,
/**
* @brief Custom range base value
*/
SAI_ACL_ENTRY_ATTR_CUSTOM_RANGE_BASE = 0x10000000,

/**
* @brief Base value of custom ACL_ENTRY_ATTR_FIELD
*/
SAI_ACL_ENTRY_ATTR_FIELD_CUSTOM_RANGE_BASE = SAI_ACL_ENTRY_ATTR_CUSTOM_RANGE_BASE + 0x00001000,

/** End of custom range base */
SAI_ACL_ENTRY_ATTR_CUSTOM_RANGE_END
/**
* @brief Base value of custom ACL_ENTRY_ATTR_ACTION
*/
SAI_ACL_ENTRY_ATTR_ACTION_CUSTOM_RANGE_BASE = SAI_ACL_ENTRY_ATTR_CUSTOM_RANGE_BASE + 0x00002000

} sai_acl_entry_attr_t;

Expand Down Expand Up @@ -3473,10 +3470,7 @@ typedef enum _sai_acl_counter_attr_t
SAI_ACL_COUNTER_ATTR_END,

/** Custom range base value */
SAI_ACL_COUNTER_ATTR_CUSTOM_RANGE_START = 0x10000000,

/** End of custom range base */
SAI_ACL_COUNTER_ATTR_CUSTOM_RANGE_END
SAI_ACL_COUNTER_ATTR_CUSTOM_RANGE_BASE = 0x10000000

} sai_acl_counter_attr_t;

Expand Down Expand Up @@ -3541,10 +3535,7 @@ typedef enum _sai_acl_range_attr_t
SAI_ACL_RANGE_ATTR_END,

/** Custom range base value */
SAI_ACL_RANGE_ATTR_CUSTOM_RANGE_START = 0x10000000,

/** End of custom range base */
SAI_ACL_RANGE_ATTR_CUSTOM_RANGE_END
SAI_ACL_RANGE_ATTR_CUSTOM_RANGE_BASE = 0x10000000

} sai_acl_range_attr_t;

Expand Down
5 changes: 1 addition & 4 deletions inc/saiars.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,7 @@ typedef enum _sai_ars_attr_t
SAI_ARS_ATTR_END,

/** Custom range base value */
SAI_ARS_ATTR_CUSTOM_RANGE_START = 0x10000000,

/** End of custom range base */
SAI_ARS_ATTR_CUSTOM_RANGE_END
SAI_ARS_ATTR_CUSTOM_RANGE_BASE = 0x10000000,

} sai_ars_attr_t;

Expand Down
5 changes: 1 addition & 4 deletions inc/saiarsprofile.h
Original file line number Diff line number Diff line change
Expand Up @@ -467,10 +467,7 @@ typedef enum _sai_ars_profile_attr_t
SAI_ARS_PROFILE_ATTR_END,

/** Custom range base value */
SAI_ARS_PROFILE_ATTR_CUSTOM_RANGE_START = 0x10000000,

/** End of custom range base */
SAI_ARS_PROFILE_ATTR_CUSTOM_RANGE_END
SAI_ARS_PROFILE_ATTR_CUSTOM_RANGE_BASE = 0x10000000

} sai_ars_profile_attr_t;

Expand Down
5 changes: 1 addition & 4 deletions inc/saibfd.h
Original file line number Diff line number Diff line change
Expand Up @@ -549,10 +549,7 @@ typedef enum _sai_bfd_session_attr_t
SAI_BFD_SESSION_ATTR_END,

/** Custom range base value */
SAI_BFD_SESSION_ATTR_CUSTOM_RANGE_START = 0x10000000,

/** End of custom range base */
SAI_BFD_SESSION_ATTR_CUSTOM_RANGE_END
SAI_BFD_SESSION_ATTR_CUSTOM_RANGE_BASE = 0x10000000

} sai_bfd_session_attr_t;

Expand Down
18 changes: 8 additions & 10 deletions inc/saibridge.h
Original file line number Diff line number Diff line change
Expand Up @@ -359,11 +359,10 @@ typedef enum _sai_bridge_port_attr_t
*/
SAI_BRIDGE_PORT_ATTR_END,

/** Custom range base value */
SAI_BRIDGE_PORT_ATTR_CUSTOM_RANGE_START = 0x10000000,

/** End of custom range base */
SAI_BRIDGE_PORT_ATTR_CUSTOM_RANGE_END
/**
* @brief Custom range base value
*/
SAI_BRIDGE_PORT_ATTR_CUSTOM_RANGE_BASE = 0x10000000

} sai_bridge_port_attr_t;

Expand Down Expand Up @@ -685,11 +684,10 @@ typedef enum _sai_bridge_attr_t
*/
SAI_BRIDGE_ATTR_END,

/** Custom range base value */
SAI_BRIDGE_ATTR_CUSTOM_RANGE_START = 0x10000000,

/** End of custom range base */
SAI_BRIDGE_ATTR_CUSTOM_RANGE_END
/**
* @brief Custom range base value
*/
SAI_BRIDGE_ATTR_CUSTOM_RANGE_BASE = 0x10000000

} sai_bridge_attr_t;

Expand Down
Loading