Is it possible to match multiple tables at the same time in p4?

The pipelines defined in P4 are executed sequentially. Is it possible to match multiple tables at the same time in Ingress Match-Action?Or is it possible to define multiple pipelines sharing one parser and deparser ? My experiment platform is using a BMV2 software switch.If such an action is not defined in p4,could I expand p4 abilities to make it support in BMV2?

When you say “at the same time” do you mean you want to somehow force the tables to be applied in parallel? Because if that is what you are looking for, the BMv2 implementation does not support that today.

In general, any P4 implementation is free to parallelize any part of the execution of your code, as long as it does not change the behavior from being the same as if it were executed sequentially in your source code.

Note that this is the same for C/C++/etc. language execution on a general purpose CPU. Many of them are able to execute actions you have written in your program sequentially, and execute them in parallel, for higher performance. For example, the assignment statement “a = b + 1;” followed by “c = c - 5;” have no data dependency between them. They will have the same effect if they are executed in that order, the opposite order, or simulteously. Thus you might not even realize whether they are executed in parallel, unless you know a lot about your CPU’s hardware design, and the C compiler’s options and optimizations.

If I defined N tables,and they have no data dependency, could I assume that they are executed in parallel in p4?

You could assume that an implementation is allowed to execute them in parallel.

Whether the implementation actually does do so, depends on factors specific to each implementation.