Skip to content

Commit

Permalink
Update DASH SAI API comments (opencomputeproject#2050)
Browse files Browse the repository at this point in the history
This PR is intended to update the current comments of DASH SAI APIs.

Previously, all DASH SAI API comments are generated from P4 code using very simple rule, such as all words to upper case to pass the SAI checks. Now, we switched to python for better comment generation, which makes the comment more meaningful and readable.
  • Loading branch information
r12f authored Jul 15, 2024
1 parent 8e74c55 commit dff0e34
Show file tree
Hide file tree
Showing 12 changed files with 246 additions and 248 deletions.
32 changes: 16 additions & 16 deletions experimental/saiexperimentaldashacl.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,17 @@
* @file saiexperimentaldashacl.h
*
* @brief This module defines SAI extensions for DASH ACL
*
* @warning This module is a SAI experimental module
*/

#if !defined (__SAIEXPERIMENTALDASHACL_H_)
#define __SAIEXPERIMENTALDASHACL_H_

#include <saitypes.h>
#include <saitypesextensions.h>

/**
* @defgroup SAIEXPERIMENTALDASH_ACL SAI - Experimental: DASH ACL specific API definitions
* @defgroup SAIEXPERIMENTALDASHACL SAI - Experimental: DASH ACL specific API definitions
*
* @{
*/
Expand All @@ -49,7 +51,7 @@ typedef enum _sai_dash_acl_rule_action_t
} sai_dash_acl_rule_action_t;

/**
* @brief Attribute ID for dash_acl_dash_acl_group
* @brief Attribute ID for DASH ACL group
*/
typedef enum _sai_dash_acl_group_attr_t
{
Expand All @@ -59,7 +61,7 @@ typedef enum _sai_dash_acl_group_attr_t
SAI_DASH_ACL_GROUP_ATTR_START,

/**
* @brief Action set_acl_group_attrs parameter IP_ADDR_FAMILY
* @brief Action parameter IP address family
*
* @type sai_ip_addr_family_t
* @flags CREATE_AND_SET
Expand All @@ -82,7 +84,7 @@ typedef enum _sai_dash_acl_group_attr_t
} sai_dash_acl_group_attr_t;

/**
* @brief Attribute ID for dash_acl_dash_acl_rule
* @brief Attribute ID for DASH ACL rule
*/
typedef enum _sai_dash_acl_rule_attr_t
{
Expand Down Expand Up @@ -151,9 +153,7 @@ typedef enum _sai_dash_acl_rule_attr_t
SAI_DASH_ACL_RULE_ATTR_DST_PORT,

/**
* @brief Attach a counter
*
* When it is empty, then packet hits won't be counted
* @brief Attach a counter. When it is empty, then packet hits won't be counted.
*
* @type sai_object_id_t
* @flags CREATE_AND_SET
Expand Down Expand Up @@ -194,7 +194,7 @@ typedef enum _sai_dash_acl_rule_attr_t
} sai_dash_acl_rule_attr_t;

/**
* @brief Create dash_acl_dash_acl_group
* @brief Create DASH ACL group
*
* @param[out] dash_acl_group_id Entry id
* @param[in] switch_id Switch id
Expand All @@ -210,7 +210,7 @@ typedef sai_status_t (*sai_create_dash_acl_group_fn)(
_In_ const sai_attribute_t *attr_list);

/**
* @brief Remove dash_acl_dash_acl_group
* @brief Remove DASH ACL group
*
* @param[in] dash_acl_group_id Entry id
*
Expand All @@ -220,7 +220,7 @@ typedef sai_status_t (*sai_remove_dash_acl_group_fn)(
_In_ sai_object_id_t dash_acl_group_id);

/**
* @brief Set attribute for dash_acl_dash_acl_group
* @brief Set attribute for DASH ACL group
*
* @param[in] dash_acl_group_id Entry id
* @param[in] attr Attribute
Expand All @@ -232,7 +232,7 @@ typedef sai_status_t (*sai_set_dash_acl_group_attribute_fn)(
_In_ const sai_attribute_t *attr);

/**
* @brief Get attribute for dash_acl_dash_acl_group
* @brief Get attribute for DASH ACL group
*
* @param[in] dash_acl_group_id Entry id
* @param[in] attr_count Number of attributes
Expand All @@ -246,7 +246,7 @@ typedef sai_status_t (*sai_get_dash_acl_group_attribute_fn)(
_Inout_ sai_attribute_t *attr_list);

/**
* @brief Create dash_acl_dash_acl_rule
* @brief Create DASH ACL rule
*
* @param[out] dash_acl_rule_id Entry id
* @param[in] switch_id Switch id
Expand All @@ -262,7 +262,7 @@ typedef sai_status_t (*sai_create_dash_acl_rule_fn)(
_In_ const sai_attribute_t *attr_list);

/**
* @brief Remove dash_acl_dash_acl_rule
* @brief Remove DASH ACL rule
*
* @param[in] dash_acl_rule_id Entry id
*
Expand All @@ -272,7 +272,7 @@ typedef sai_status_t (*sai_remove_dash_acl_rule_fn)(
_In_ sai_object_id_t dash_acl_rule_id);

/**
* @brief Set attribute for dash_acl_dash_acl_rule
* @brief Set attribute for DASH ACL rule
*
* @param[in] dash_acl_rule_id Entry id
* @param[in] attr Attribute
Expand All @@ -284,7 +284,7 @@ typedef sai_status_t (*sai_set_dash_acl_rule_attribute_fn)(
_In_ const sai_attribute_t *attr);

/**
* @brief Get attribute for dash_acl_dash_acl_rule
* @brief Get attribute for DASH ACL rule
*
* @param[in] dash_acl_rule_id Entry id
* @param[in] attr_count Number of attributes
Expand Down
18 changes: 9 additions & 9 deletions experimental/saiexperimentaldashdirectionlookup.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
#if !defined (__SAIEXPERIMENTALDASHDIRECTIONLOOKUP_H_)
#define __SAIEXPERIMENTALDASHDIRECTIONLOOKUP_H_

#include <saitypes.h>
#include <saitypesextensions.h>

/**
* @defgroup SAIEXPERIMENTALDASH_DIRECTION_LOOKUP SAI - Experimental: DASH direction lookup specific API definitions
* @defgroup SAIEXPERIMENTALDASHDIRECTIONLOOKUP SAI - Experimental: DASH direction lookup specific API definitions
*
* @{
*/
Expand Down Expand Up @@ -64,7 +64,7 @@ typedef struct _sai_direction_lookup_entry_t
} sai_direction_lookup_entry_t;

/**
* @brief Attribute ID for dash_direction_lookup_direction_lookup_entry
* @brief Attribute ID for direction lookup entry
*/
typedef enum _sai_direction_lookup_entry_attr_t
{
Expand Down Expand Up @@ -96,7 +96,7 @@ typedef enum _sai_direction_lookup_entry_attr_t
} sai_direction_lookup_entry_attr_t;

/**
* @brief Create dash_direction_lookup_direction_lookup_entry
* @brief Create direction lookup entry
*
* @param[in] direction_lookup_entry Entry
* @param[in] attr_count Number of attributes
Expand All @@ -110,7 +110,7 @@ typedef sai_status_t (*sai_create_direction_lookup_entry_fn)(
_In_ const sai_attribute_t *attr_list);

/**
* @brief Remove dash_direction_lookup_direction_lookup_entry
* @brief Remove direction lookup entry
*
* @param[in] direction_lookup_entry Entry
*
Expand All @@ -120,7 +120,7 @@ typedef sai_status_t (*sai_remove_direction_lookup_entry_fn)(
_In_ const sai_direction_lookup_entry_t *direction_lookup_entry);

/**
* @brief Set attribute for dash_direction_lookup_direction_lookup_entry
* @brief Set attribute for direction lookup entry
*
* @param[in] direction_lookup_entry Entry
* @param[in] attr Attribute
Expand All @@ -132,7 +132,7 @@ typedef sai_status_t (*sai_set_direction_lookup_entry_attribute_fn)(
_In_ const sai_attribute_t *attr);

/**
* @brief Get attribute for dash_direction_lookup_direction_lookup_entry
* @brief Get attribute for direction lookup entry
*
* @param[in] direction_lookup_entry Entry
* @param[in] attr_count Number of attributes
Expand All @@ -146,7 +146,7 @@ typedef sai_status_t (*sai_get_direction_lookup_entry_attribute_fn)(
_Inout_ sai_attribute_t *attr_list);

/**
* @brief Bulk create dash_direction_lookup_direction_lookup_entry
* @brief Bulk create direction lookup entry
*
* @param[in] object_count Number of objects to create
* @param[in] direction_lookup_entry List of object to create
Expand All @@ -171,7 +171,7 @@ typedef sai_status_t (*sai_bulk_create_direction_lookup_entry_fn)(
_Out_ sai_status_t *object_statuses);

/**
* @brief Bulk remove dash_direction_lookup_direction_lookup_entry
* @brief Bulk remove direction lookup entry
*
* @param[in] object_count Number of objects to remove
* @param[in] direction_lookup_entry List of objects to remove
Expand Down
Loading

0 comments on commit dff0e34

Please sign in to comment.