[P4-dev] DIfference between on_miss and default

Anandakumar ananth.padfoot at gmail.com
Wed Oct 4 21:01:05 EDT 2017


Hi Everyone,

I’m fairly new to P4 and was looking at this snippet in process_tunnel and
was wondering how the on_miss and default are different?
Can someone please help me in demystifying the following?

   1. How the on_miss and default are different?
   2. Is the on_miss taken only if there’s an on_miss action programmed in
   the table against a specific key?
   3. What’s the behavior expected here, if on_miss is programmed as the
   default_action for the table in the program itself or from the control
   plane via the PD API?
   Would it make missed take the path of process_outer_multicast or the
   default?
   4. What’s the behavior expected here, if say an example action like
   another_action is programmed as the default_action for the table?
   Would it still execute the default block or just the action and nothing
   in this snippet?

What’s the suggested way to easily search the whole mailing list archive so
that I don’t repeat the questions that are already probably answered! :)
Thank you very much.

        /* outer RMAC lookup for tunnel termination */
          apply(outer_rmac) {
              on_miss {
                  process_outer_multicast();
              }
              default {
                  if (valid(ipv4)) {
                      process_ipv4_vtep();
                  } else {
                      if (valid(ipv6)) {
                          process_ipv6_vtep();
                      }
                  }
              }
          }

Thank you very much.
-Anand
​
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.p4.org/pipermail/p4-dev_lists.p4.org/attachments/20171005/438bd602/attachment-0002.html>


More information about the P4-dev mailing list