Closed Benature closed 2 years ago
This seems related to issue: #35
You can not do a table_add
with a keyless table. You can only set the default action.
But default action in P4 cannot make actions' arguments specific for each switch.
You should be able to set the default action with 1 argument no?
Thank you, but using table_set_default
, I still get the Error: Invalid table name (test_tbl)
the p4 code of the table is
action test_action(bit<32> arg) {
meta.test = arg;
}
table test_tbl{
key = {}
actions = {
test_action;
NoAction;
}
default_action = NoAction;
}
Maybe it is a bug, I would have to try it myself.
Can you try to define the table without the line key = {}
OK, I've tried this, there is no difference.
action test_action(bit<32> arg) {
meta.test = arg;
}
table test_tbl{
actions = {
test_action;
NoAction;
}
default_action = NoAction;
}
I have some tables that have no match keys, when I use
controller.table_add
to add table action, it output with