Skip to content

Commit

Permalink
Enable support for table property default_action for all v1model tabl…
Browse files Browse the repository at this point in the history
…e types

including those with property implementation equal to action_profile or
action_selector.

Historical note: p4c disabled support for default_action on these
kinds of tables in 2016, with a comment that behavioral-model did not
support it at that time.  Support was added to behavioral-model in
2018, but it appears no one has tried to enable it in the p4c bmv2
backend before now.

Signed-off-by: Andy Fingerhut <andy_fingerhut@alum.wustl.edu>
  • Loading branch information
jafingerhut committed Jan 18, 2025
1 parent 80ef07c commit e33b298
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions backends/bmv2/common/control.h
Original file line number Diff line number Diff line change
Expand Up @@ -378,14 +378,6 @@ class ControlConverter : public Inspector {
auto defact =
table->properties->getProperty(IR::TableProperties::defaultActionPropertyName);
if (defact != nullptr) {
if (!simple) {
::P4::warning(
ErrorType::WARN_UNSUPPORTED,
"Target does not support default_action for %1% (due to action profiles)",
table);
return result;
}

if (!defact->value->is<IR::ExpressionValue>()) {
::P4::error(ErrorType::ERR_EXPECTED, "%1%: expected an action", defact);
return result;
Expand Down

0 comments on commit e33b298

Please sign in to comment.