|
| 1 | +/** |
| 2 | + * Copyright (c) 2014 Microsoft Open Technologies, Inc. |
| 3 | + * |
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); you may |
| 5 | + * not use this file except in compliance with the License. You may obtain |
| 6 | + * a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 |
| 7 | + * |
| 8 | + * THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR |
| 9 | + * CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT |
| 10 | + * LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS |
| 11 | + * FOR A PARTICULAR PURPOSE, MERCHANTABILITY OR NON-INFRINGEMENT. |
| 12 | + * |
| 13 | + * See the Apache Version 2.0 License for specific language governing |
| 14 | + * permissions and limitations under the License. |
| 15 | + * |
| 16 | + * Microsoft would like to thank the following companies for their review and |
| 17 | + * assistance with these files: Intel Corporation, Mellanox Technologies Ltd, |
| 18 | + * Dell Products, L.P., Facebook, Inc., Marvell International Ltd. |
| 19 | + * |
| 20 | + * @file saiexperimentaldashappliance.h |
| 21 | + * |
| 22 | + * @brief This module defines SAI extensions for DASH appliance |
| 23 | + * |
| 24 | + * @warning This module is a SAI experimental module |
| 25 | + */ |
| 26 | + |
| 27 | +#if !defined (__SAIEXPERIMENTALDASHAPPLIANCE_H_) |
| 28 | +#define __SAIEXPERIMENTALDASHAPPLIANCE_H_ |
| 29 | + |
| 30 | +#include <saitypesextensions.h> |
| 31 | + |
| 32 | +/** |
| 33 | + * @defgroup SAIEXPERIMENTALDASHAPPLIANCE SAI - Experimental: DASH appliance specific API definitions |
| 34 | + * |
| 35 | + * @{ |
| 36 | + */ |
| 37 | + |
| 38 | +/** |
| 39 | + * @brief Attribute ID for DASH appliance |
| 40 | + */ |
| 41 | +typedef enum _sai_dash_appliance_attr_t |
| 42 | +{ |
| 43 | + /** |
| 44 | + * @brief Start of attributes |
| 45 | + */ |
| 46 | + SAI_DASH_APPLIANCE_ATTR_START, |
| 47 | + |
| 48 | + /** |
| 49 | + * @brief Action parameter local region id |
| 50 | + * |
| 51 | + * @type sai_uint8_t |
| 52 | + * @flags CREATE_AND_SET |
| 53 | + * @default 0 |
| 54 | + */ |
| 55 | + SAI_DASH_APPLIANCE_ATTR_LOCAL_REGION_ID = SAI_DASH_APPLIANCE_ATTR_START, |
| 56 | + |
| 57 | + /** |
| 58 | + * @brief End of attributes |
| 59 | + */ |
| 60 | + SAI_DASH_APPLIANCE_ATTR_END, |
| 61 | + |
| 62 | + /** Custom range base value */ |
| 63 | + SAI_DASH_APPLIANCE_ATTR_CUSTOM_RANGE_START = 0x10000000, |
| 64 | + |
| 65 | + /** End of custom range base */ |
| 66 | + SAI_DASH_APPLIANCE_ATTR_CUSTOM_RANGE_END, |
| 67 | + |
| 68 | +} sai_dash_appliance_attr_t; |
| 69 | + |
| 70 | +/** |
| 71 | + * @brief Create DASH appliance |
| 72 | + * |
| 73 | + * @param[out] dash_appliance_id Entry id |
| 74 | + * @param[in] switch_id Switch id |
| 75 | + * @param[in] attr_count Number of attributes |
| 76 | + * @param[in] attr_list Array of attributes |
| 77 | + * |
| 78 | + * @return #SAI_STATUS_SUCCESS on success Failure status code on error |
| 79 | + */ |
| 80 | +typedef sai_status_t (*sai_create_dash_appliance_fn)( |
| 81 | + _Out_ sai_object_id_t *dash_appliance_id, |
| 82 | + _In_ sai_object_id_t switch_id, |
| 83 | + _In_ uint32_t attr_count, |
| 84 | + _In_ const sai_attribute_t *attr_list); |
| 85 | + |
| 86 | +/** |
| 87 | + * @brief Remove DASH appliance |
| 88 | + * |
| 89 | + * @param[in] dash_appliance_id Entry id |
| 90 | + * |
| 91 | + * @return #SAI_STATUS_SUCCESS on success Failure status code on error |
| 92 | + */ |
| 93 | +typedef sai_status_t (*sai_remove_dash_appliance_fn)( |
| 94 | + _In_ sai_object_id_t dash_appliance_id); |
| 95 | + |
| 96 | +/** |
| 97 | + * @brief Set attribute for DASH appliance |
| 98 | + * |
| 99 | + * @param[in] dash_appliance_id Entry id |
| 100 | + * @param[in] attr Attribute |
| 101 | + * |
| 102 | + * @return #SAI_STATUS_SUCCESS on success Failure status code on error |
| 103 | + */ |
| 104 | +typedef sai_status_t (*sai_set_dash_appliance_attribute_fn)( |
| 105 | + _In_ sai_object_id_t dash_appliance_id, |
| 106 | + _In_ const sai_attribute_t *attr); |
| 107 | + |
| 108 | +/** |
| 109 | + * @brief Get attribute for DASH appliance |
| 110 | + * |
| 111 | + * @param[in] dash_appliance_id Entry id |
| 112 | + * @param[in] attr_count Number of attributes |
| 113 | + * @param[inout] attr_list Array of attributes |
| 114 | + * |
| 115 | + * @return #SAI_STATUS_SUCCESS on success Failure status code on error |
| 116 | + */ |
| 117 | +typedef sai_status_t (*sai_get_dash_appliance_attribute_fn)( |
| 118 | + _In_ sai_object_id_t dash_appliance_id, |
| 119 | + _In_ uint32_t attr_count, |
| 120 | + _Inout_ sai_attribute_t *attr_list); |
| 121 | + |
| 122 | +typedef struct _sai_dash_appliance_api_t |
| 123 | +{ |
| 124 | + sai_create_dash_appliance_fn create_dash_appliance; |
| 125 | + sai_remove_dash_appliance_fn remove_dash_appliance; |
| 126 | + sai_set_dash_appliance_attribute_fn set_dash_appliance_attribute; |
| 127 | + sai_get_dash_appliance_attribute_fn get_dash_appliance_attribute; |
| 128 | + sai_bulk_object_create_fn create_dash_appliances; |
| 129 | + sai_bulk_object_remove_fn remove_dash_appliances; |
| 130 | + |
| 131 | +} sai_dash_appliance_api_t; |
| 132 | + |
| 133 | +/** |
| 134 | + * @} |
| 135 | + */ |
| 136 | +#endif /** __SAIEXPERIMENTALDASHAPPLIANCE_H_ */ |
0 commit comments