diff --git a/dash-pipeline/SAI/sai_api_gen.py b/dash-pipeline/SAI/sai_api_gen.py index d5e2a79a0..cd672dac0 100755 --- a/dash-pipeline/SAI/sai_api_gen.py +++ b/dash-pipeline/SAI/sai_api_gen.py @@ -411,7 +411,7 @@ def __init__(self): self.bitwidth = 0 self.default = None self.ip_is_v6_field_id = 0 - self.paramActions = [] + self.param_actions = [] def parse_p4rt(self, p4rt_table_action_param, sai_enums, ip_is_v6_param_ids): ''' @@ -566,11 +566,11 @@ def __merge_action_params_to_table_params(self, action): for table_action_param in self.action_params: # Already have this param in the table. if table_action_param.name == action_param.name: - table_action_param.paramActions.append(action.name) + table_action_param.param_actions.append(action.name) break else: # New param is found, add it to the table. - action_param.paramActions = [action.name] + action_param.param_actions = [action.name] self.action_params.append(action_param) diff --git a/dash-pipeline/SAI/templates/saiapi.h.j2 b/dash-pipeline/SAI/templates/saiapi.h.j2 index 15dd5ad08..a5006ae7f 100644 --- a/dash-pipeline/SAI/templates/saiapi.h.j2 +++ b/dash-pipeline/SAI/templates/saiapi.h.j2 @@ -159,7 +159,7 @@ typedef enum _sai_{{ table.name }}_attr_t {% if param.skipattr == 'true' %} {% else %} /** - * @brief Action {% for action in param.paramActions %}{{ action }}{{ ", " if not loop.last else "" }}{% endfor %} parameter {{ param.name | upper }} + * @brief Action {% for action in param.param_actions %}{{ action }}{{ ", " if not loop.last else "" }}{% endfor %} parameter {{ param.name | upper }} * * @type {{ param.type }} {% if param.isreadonly == 'true' %} @@ -192,8 +192,8 @@ typedef enum _sai_{{ table.name }}_attr_t {% endif %} {% endif %} {% if table.actions | length > 1 %} -{% if param.paramActions | length > 0 %} - * @validonly {% for action in param.paramActions %}SAI_{{ table.name | upper }}_ATTR_ACTION == SAI_{{ table.name | upper }}_ACTION_{{ action | upper }}{{ " or " if not loop.last else "" }}{% endfor %} +{% if param.param_actions | length > 0 %} + * @validonly {% for action in param.param_actions %}SAI_{{ table.name | upper }}_ATTR_ACTION == SAI_{{ table.name | upper }}_ACTION_{{ action | upper }}{{ " or " if not loop.last else "" }}{% endfor %} {% endif %} {% endif %}