@@ -44,6 +44,15 @@ typedef enum _sai_trusted_vni_entry_action_t
4444
4545} sai_trusted_vni_entry_action_t ;
4646
47+ /**
48+ * @brief Attribute data for #SAI_GLOBAL_TRUSTED_VNI_ENTRY_ATTR_ACTION
49+ */
50+ typedef enum _sai_global_trusted_vni_entry_action_t
51+ {
52+ SAI_GLOBAL_TRUSTED_VNI_ENTRY_ACTION_PERMIT ,
53+
54+ } sai_global_trusted_vni_entry_action_t ;
55+
4756/**
4857 * @brief Entry for trusted_vni_entry
4958 */
@@ -102,6 +111,57 @@ typedef enum _sai_trusted_vni_entry_attr_t
102111
103112} sai_trusted_vni_entry_attr_t ;
104113
114+ /**
115+ * @brief Entry for global_trusted_vni_entry
116+ */
117+ typedef struct _sai_global_trusted_vni_entry_t
118+ {
119+ /**
120+ * @brief Switch ID
121+ *
122+ * @objects SAI_OBJECT_TYPE_SWITCH
123+ */
124+ sai_object_id_t switch_id ;
125+
126+ /**
127+ * @brief Range matched key vni_range
128+ */
129+ sai_u32_range_t vni_range ;
130+
131+ } sai_global_trusted_vni_entry_t ;
132+
133+ /**
134+ * @brief Attribute ID for global trusted VNI entry
135+ */
136+ typedef enum _sai_global_trusted_vni_entry_attr_t
137+ {
138+ /**
139+ * @brief Start of attributes
140+ */
141+ SAI_GLOBAL_TRUSTED_VNI_ENTRY_ATTR_START ,
142+
143+ /**
144+ * @brief Action
145+ *
146+ * @type sai_global_trusted_vni_entry_action_t
147+ * @flags CREATE_AND_SET
148+ * @default SAI_GLOBAL_TRUSTED_VNI_ENTRY_ACTION_PERMIT
149+ */
150+ SAI_GLOBAL_TRUSTED_VNI_ENTRY_ATTR_ACTION = SAI_GLOBAL_TRUSTED_VNI_ENTRY_ATTR_START ,
151+
152+ /**
153+ * @brief End of attributes
154+ */
155+ SAI_GLOBAL_TRUSTED_VNI_ENTRY_ATTR_END ,
156+
157+ /** Custom range base value */
158+ SAI_GLOBAL_TRUSTED_VNI_ENTRY_ATTR_CUSTOM_RANGE_START = 0x10000000 ,
159+
160+ /** End of custom range base */
161+ SAI_GLOBAL_TRUSTED_VNI_ENTRY_ATTR_CUSTOM_RANGE_END ,
162+
163+ } sai_global_trusted_vni_entry_attr_t ;
164+
105165/**
106166 * @brief Create trusted VNI entry
107167 *
@@ -197,14 +257,116 @@ typedef sai_status_t (*sai_bulk_remove_trusted_vni_entry_fn)(
197257 _In_ sai_bulk_op_error_mode_t mode ,
198258 _Out_ sai_status_t * object_statuses );
199259
260+ /**
261+ * @brief Create global trusted VNI entry
262+ *
263+ * @param[in] global_trusted_vni_entry Entry
264+ * @param[in] attr_count Number of attributes
265+ * @param[in] attr_list Array of attributes
266+ *
267+ * @return #SAI_STATUS_SUCCESS on success Failure status code on error
268+ */
269+ typedef sai_status_t (* sai_create_global_trusted_vni_entry_fn )(
270+ _In_ const sai_global_trusted_vni_entry_t * global_trusted_vni_entry ,
271+ _In_ uint32_t attr_count ,
272+ _In_ const sai_attribute_t * attr_list );
273+
274+ /**
275+ * @brief Remove global trusted VNI entry
276+ *
277+ * @param[in] global_trusted_vni_entry Entry
278+ *
279+ * @return #SAI_STATUS_SUCCESS on success Failure status code on error
280+ */
281+ typedef sai_status_t (* sai_remove_global_trusted_vni_entry_fn )(
282+ _In_ const sai_global_trusted_vni_entry_t * global_trusted_vni_entry );
283+
284+ /**
285+ * @brief Set attribute for global trusted VNI entry
286+ *
287+ * @param[in] global_trusted_vni_entry Entry
288+ * @param[in] attr Attribute
289+ *
290+ * @return #SAI_STATUS_SUCCESS on success Failure status code on error
291+ */
292+ typedef sai_status_t (* sai_set_global_trusted_vni_entry_attribute_fn )(
293+ _In_ const sai_global_trusted_vni_entry_t * global_trusted_vni_entry ,
294+ _In_ const sai_attribute_t * attr );
295+
296+ /**
297+ * @brief Get attribute for global trusted VNI entry
298+ *
299+ * @param[in] global_trusted_vni_entry Entry
300+ * @param[in] attr_count Number of attributes
301+ * @param[inout] attr_list Array of attributes
302+ *
303+ * @return #SAI_STATUS_SUCCESS on success Failure status code on error
304+ */
305+ typedef sai_status_t (* sai_get_global_trusted_vni_entry_attribute_fn )(
306+ _In_ const sai_global_trusted_vni_entry_t * global_trusted_vni_entry ,
307+ _In_ uint32_t attr_count ,
308+ _Inout_ sai_attribute_t * attr_list );
309+
310+ /**
311+ * @brief Bulk create global trusted VNI entry
312+ *
313+ * @param[in] object_count Number of objects to create
314+ * @param[in] global_trusted_vni_entry List of object to create
315+ * @param[in] attr_count List of attr_count. Caller passes the number
316+ * of attribute for each object to create.
317+ * @param[in] attr_list List of attributes for every object.
318+ * @param[in] mode Bulk operation error handling mode.
319+ * @param[out] object_statuses List of status for every object. Caller needs to
320+ * allocate the buffer
321+ *
322+ * @return #SAI_STATUS_SUCCESS on success when all objects are created or
323+ * #SAI_STATUS_FAILURE when any of the objects fails to create. When there is
324+ * failure, Caller is expected to go through the list of returned statuses to
325+ * find out which fails and which succeeds.
326+ */
327+ typedef sai_status_t (* sai_bulk_create_global_trusted_vni_entry_fn )(
328+ _In_ uint32_t object_count ,
329+ _In_ const sai_global_trusted_vni_entry_t * global_trusted_vni_entry ,
330+ _In_ const uint32_t * attr_count ,
331+ _In_ const sai_attribute_t * * attr_list ,
332+ _In_ sai_bulk_op_error_mode_t mode ,
333+ _Out_ sai_status_t * object_statuses );
334+
335+ /**
336+ * @brief Bulk remove global trusted VNI entry
337+ *
338+ * @param[in] object_count Number of objects to remove
339+ * @param[in] global_trusted_vni_entry List of objects to remove
340+ * @param[in] mode Bulk operation error handling mode.
341+ * @param[out] object_statuses List of status for every object. Caller needs to
342+ * allocate the buffer
343+ *
344+ * @return #SAI_STATUS_SUCCESS on success when all objects are removed or
345+ * #SAI_STATUS_FAILURE when any of the objects fails to remove. When there is
346+ * failure, Caller is expected to go through the list of returned statuses to
347+ * find out which fails and which succeeds.
348+ */
349+ typedef sai_status_t (* sai_bulk_remove_global_trusted_vni_entry_fn )(
350+ _In_ uint32_t object_count ,
351+ _In_ const sai_global_trusted_vni_entry_t * global_trusted_vni_entry ,
352+ _In_ sai_bulk_op_error_mode_t mode ,
353+ _Out_ sai_status_t * object_statuses );
354+
200355typedef struct _sai_dash_trusted_vni_api_t
201356{
202- sai_create_trusted_vni_entry_fn create_trusted_vni_entry ;
203- sai_remove_trusted_vni_entry_fn remove_trusted_vni_entry ;
204- sai_set_trusted_vni_entry_attribute_fn set_trusted_vni_entry_attribute ;
205- sai_get_trusted_vni_entry_attribute_fn get_trusted_vni_entry_attribute ;
206- sai_bulk_create_trusted_vni_entry_fn create_trusted_vni_entries ;
207- sai_bulk_remove_trusted_vni_entry_fn remove_trusted_vni_entries ;
357+ sai_create_trusted_vni_entry_fn create_trusted_vni_entry ;
358+ sai_remove_trusted_vni_entry_fn remove_trusted_vni_entry ;
359+ sai_set_trusted_vni_entry_attribute_fn set_trusted_vni_entry_attribute ;
360+ sai_get_trusted_vni_entry_attribute_fn get_trusted_vni_entry_attribute ;
361+ sai_bulk_create_trusted_vni_entry_fn create_trusted_vni_entries ;
362+ sai_bulk_remove_trusted_vni_entry_fn remove_trusted_vni_entries ;
363+
364+ sai_create_global_trusted_vni_entry_fn create_global_trusted_vni_entry ;
365+ sai_remove_global_trusted_vni_entry_fn remove_global_trusted_vni_entry ;
366+ sai_set_global_trusted_vni_entry_attribute_fn set_global_trusted_vni_entry_attribute ;
367+ sai_get_global_trusted_vni_entry_attribute_fn get_global_trusted_vni_entry_attribute ;
368+ sai_bulk_create_global_trusted_vni_entry_fn create_global_trusted_vni_entries ;
369+ sai_bulk_remove_global_trusted_vni_entry_fn remove_global_trusted_vni_entries ;
208370
209371} sai_dash_trusted_vni_api_t ;
210372
0 commit comments