[P4-dev] How do P4 tables decide which actions are executed?
robert.halstead at xilinx.com
Mon Jun 22 15:12:59 EDT 2015
I'm having trouble understanding how the control flow executes, and just wanted to ask some clarifying questions. They will all pertain to the basic_routing example under the p4-factory repository.
First, how is an action chosen when a table has multiple actions available? For example the ipv4_fib and ipv4_fib_lpm tables both have two actions; on_miss & fib_hit_nexthop. Are both actions executed, or is the first/last action that gets executed, or is it dependent on the statements under control ingress?
I think my issue is with the following statement. I'm not sure how to read it, and I just can't get it to gel in my head.
The first way I'm reading it is: "apply table ipv4_fib" only executing "action on_miss" then "apply table ipv4_fib_lpm" executing "actions on_miss & fib_nexthop". This interpretation doesn't make too much sense to me because the on_miss action does nothing, and the statement would be equivalent to apply(ipv4_fib_lpm).
Another way I'm reading it is: "apply table ipv4_fib" but after completing "action on_miss" "apply table ipv4_fib_lpm". However, this interpretation means the action fib_nexthop is executed twice.
I don't think they are, but are either of these interpretations correct? If not what is the correct way to read the statement?
This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the P4-dev