Skip to content

Commit

Permalink
fix v4_or_v6 fields.
Browse files Browse the repository at this point in the history
  • Loading branch information
r12f committed Dec 7, 2023
1 parent 2f912b3 commit 44e07b8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dash-pipeline/SAI/sai_api_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,6 @@ def parse_p4rt(self, p4rt_table, program, all_actions, ignore_tables):

self.__parse_table_keys(p4rt_table)

param_names = []
for p4rt_table_action in p4rt_table[ACTION_REFS_TAG]:
action_id = p4rt_table_action["id"]
if all_actions[action_id].name != NOACTION and not (SCOPE_TAG in p4rt_table_action and p4rt_table_action[SCOPE_TAG] == 'DEFAULT_ONLY'):
Expand Down Expand Up @@ -518,6 +517,9 @@ def __parse_table_keys(self, p4rt_table):
v4_or_v6_key_ids[v4_or_v6_key_name] = p4rt_table_key['id']

for p4rt_table_key in p4rt_table[MATCH_FIELDS_TAG]:
if 'v4_or_v6' in p4rt_table_key[NAME_TAG]:
continue

table_key = SAIAPITableKey.from_p4rt(p4rt_table_key, v4_or_v6_key_ids)
self.keys.append(table_key)

Expand Down

0 comments on commit 44e07b8

Please sign in to comment.