Skip to content

Commit

Permalink
Rename paramActions to param_actions.
Browse files Browse the repository at this point in the history
  • Loading branch information
r12f committed Dec 9, 2023
1 parent f6e4783 commit 85ae0e8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions dash-pipeline/SAI/sai_api_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
'''
Expand Down Expand Up @@ -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)


Expand Down
6 changes: 3 additions & 3 deletions dash-pipeline/SAI/templates/saiapi.h.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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' %}
Expand Down Expand Up @@ -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 %}
Expand Down

0 comments on commit 85ae0e8

Please sign in to comment.