Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix issue table without match key #39

Merged
merged 1 commit into from
Jun 26, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion p4utils/utils/thrift_API.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,12 @@ def get_json_key(key):
table.key += [(field_name, match_type, bitwidth)]

self.tables[j_table["name"]] = table


# table's action has no match key
if len(j_table["key"]) == 0:
if j_table["name"].startswith(j_pipeline["source_info"]["source_fragment"]+"."):
self.tables[j_table["name"]] = table

for j_meter in get_json_key("meter_arrays"):
meter_array = MeterArray(j_meter["name"], j_meter["id"])
if "is_direct" in j_meter and j_meter["is_direct"]:
Expand Down