Hi David
Thanks for your reply. Now, I got what you mean and after disabling the flowcache, it works properly.
However, there's one more question about the counter problem.
Say I have two tables like this
table Table1 {
reads {
ipv4.srcaddr;
}
actions {
add_score;
}
}
table Table2 {
reads {
ipv4.dstaddr;
}
actions {
add_score;
}
}
action add_score(score_value) {
add_to_field(score_metadata.score, score_value);
}
I add rules to these two tables using json file, it succeed.
But when I add a counter to table1 like this
counter test_counter {
type: packets;
direct: Table1;
}
In the compiling process, there's a warn:
Note: duplicating action add_score due to 'direct' stateful entities
This time, I try to install the same rules using the same json file. It failed.
error: QUALIFIED: Reload of user config failed: failed to process user configuration
Why I can't attach a direct counter to a table that has a action shared by multiple tables? I'm confused about the counter attachment.
Is the relationship "matching field -- counter" or "action -- counter"? If it's former case, two tables using different matching field, the counter should not be affected. If it's the later case, two tables using the same action, maybe it makes sense.
Above is just my assumption. Looking forward to hearing from you.
Thanks
Xiaochen