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 for issue #297 #340

Merged
merged 4 commits into from
Mar 1, 2017
Merged

Fix for issue #297 #340

merged 4 commits into from
Mar 1, 2017

Conversation

mihaibudiu
Copy link
Contributor

that this fix allows action_profile objects to be declared outside tables. As a side-effect, this change will enable the sharing of an action_profile between multiple tables.

Note that this fix does not allow action_selectors to be declared outside tables, just action_profiles.

@antoninbas
Copy link
Member

The produced JSON for the test program you are checking-in is rejected by bmv2:

simple_switch: P4Objects.cpp:1063: int bm::P4Objects::init_objects(std::istream*, bm::LookupStructureFactory*, int, size_t, std::shared_ptr<bm::TransportIface>, const std::set<std::pair<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> > >&, const bm::P4Objects::ForceArith&): Assertion `table_type == "indirect" || table_type == "indirect_ws"' failed.
Aborted (core dumped)

The issue seems to be that your "indirect" table is missing the "type" attribute. However, your "indirect_ws" table does not suffer from this issue.

@mihaibudiu
Copy link
Contributor Author

Hopefully this change fixes the problem @antoninbas pointed out.
I have added an empty stf file, which will cause the test to attempt to load the json into simple_switch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants