<div dir="ltr">I have recheck definition of PORT_TABLE in OF spec, and yes, spec says that this port can be used only in action list of PACKET_OUT message. So I need to rework this design (despite it works on OVS).<div><br></div><div>My main &quot;issue&quot; is to apply 2 different meters on the packet - the first meter on the whole stream, and second on packets(apr in this case) that cloned and routed into the controller (I can use OF1.3 only, so the meter is applied as instruction, not action and... there is no egress tables).</div><div><br></div><div>Thank you, one more time. I need to rework rules desing.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">чт, 25 июл. 2019 г. в 18:51, Ben Pfaff &lt;<a href="mailto:blp@ovn.org">blp@ovn.org</a>&gt;:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">OpenFlow only describes the effect of OFPP_TABLE in a &quot;packet-out&quot;<br>
message, as follows:<br>
<br>
    The action field is an action list defining how the packet should be<br>
    processed by the switch. It may include packet modification, group<br>
    processing and an output port. The action list of an OFPT_PACKET_OUT<br>
    message can also specify the OFPP_TABLE reserved port as an output<br>
    action to process the packet through the OpenFlow pipeline, starting<br>
    at the first flow table (see 4.5). If OFPP_TABLE is specified, the<br>
    in_port field is used as the ingress port in the flow table lookup.<br>
<br>
OVS generalizes this a bit, but I&#39;ve never heard of anyone using it the<br>
way this flow table does.  It&#39;s not going to be portable to other<br>
OpenFlow switches.<br>
<br>
If you want to go back to table 0, without using the action set, you can<br>
either use a plain &quot;output:TABLE&quot; or &quot;resubmit(,0)&quot;.  The latter is more<br>
common (it is an intended use of &quot;resubmit&quot;).  Neither is portable to<br>
other OpenFlow switches.<br>
<br>
On Thu, Jul 25, 2019 at 12:00:06PM +0300, <a href="mailto:bogun.dmitriy@gmail.com" target="_blank">bogun.dmitriy@gmail.com</a> wrote:<br>
&gt; I thought that &quot;output: TABLE&quot; starts new OF pipeline iteration. But from<br>
&gt; your words it is not true. And output:table ... is some kind of &quot;goto<br>
&gt; table&quot; instruction with only possible destination - table0. As for me it<br>
&gt; weird... At least now I know what wrong with my flows design I know one<br>
&gt; more &quot;limitation&quot; of OF pipeline (at least in ovs).<br>
&gt; <br>
&gt; Thank you.<br>
&gt; <br>
&gt; ср, 24 июл. 2019 г. в 18:41, Ben Pfaff &lt;<a href="mailto:blp@ovn.org" target="_blank">blp@ovn.org</a>&gt;:<br>
&gt; <br>
&gt; &gt; See inline below.<br>
&gt; &gt;<br>
&gt; &gt; On Wed, Jul 24, 2019 at 02:22:23PM +0300, <a href="mailto:bogun.dmitriy@gmail.com" target="_blank">bogun.dmitriy@gmail.com</a> wrote:<br>
&gt; &gt; &gt; I am not sure that I have used correct syntax to &quot;define&quot; 2 vlans on<br>
&gt; &gt; packet<br>
&gt; &gt; &gt; for ofproto/trace... but here what I got for my rules setup:<br>
&gt; &gt;<br>
&gt; &gt; I can see what&#39;s going on.<br>
&gt; &gt;<br>
&gt; &gt; &gt; root@b9b4eb92ef34:/app/lab# ovs-appctl ofproto/trace system<br>
&gt; &gt; &gt;<br>
&gt; &gt; &#39;in_port(6),eth(src=00:11:22:33:44:55,dst=ff:ff:ff:ff:ff:ff),eth_type(0x8100),vlan(vid=127,pcp=0),encap(eth_type(0x8100),vlan(vid=128,pcp=0),encap(eth_type(0x0806)))&#39;<br>
&gt; &gt; &gt; Flow:<br>
&gt; &gt; &gt;<br>
&gt; &gt; arp,in_port=2,dl_vlan=127,dl_vlan_pcp=0,dl_vlan1=128,dl_vlan_pcp1=0,dl_src=00:11:22:33:44:55,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=0.0.0.0,arp_tpa=0.0.0.0,arp_op=0,arp_sha=00:00:00:00:00:00,arp_tha=00:00:00:00:00:00<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; bridge(&quot;A&quot;)<br>
&gt; &gt; &gt; -----------<br>
&gt; &gt;<br>
&gt; &gt; First, table 0 goes to table 1, then in table 1 there&#39;s a write_actions<br>
&gt; &gt; that outputs to TABLE.<br>
&gt; &gt;<br>
&gt; &gt; &gt;  0. priority 0, cookie 0x2140001<br>
&gt; &gt; &gt;     goto_table:1<br>
&gt; &gt; &gt;      1. in_port=2,dl_vlan=127, priority 16384, cookie 0x2160001<br>
&gt; &gt; &gt;             pop_vlan<br>
&gt; &gt; &gt;             write_actions(TABLE)<br>
&gt; &gt; &gt;              -&gt; action set is: TABLE<br>
&gt; &gt; &gt;             write_metadata:0x400000000007f/0x4000000000fff<br>
&gt; &gt;<br>
&gt; &gt; Then we execute the action set:<br>
&gt; &gt;<br>
&gt; &gt; &gt; --. Executing action set:<br>
&gt; &gt; &gt;     TABLE<br>
&gt; &gt; &gt;  0. priority 0, cookie 0x2140001<br>
&gt; &gt; &gt;     goto_table:1<br>
&gt; &gt; &gt;  1. metadata=0x400000000007f/0x4000000000fff,in_port=2,dl_vlan=128,<br>
&gt; &gt; &gt; priority 16394, cookie 0x2160001<br>
&gt; &gt; &gt;     pop_vlan<br>
&gt; &gt; &gt;     write_metadata:0x1000002160001/0x10000ffffffff<br>
&gt; &gt; &gt;     goto_table:2<br>
&gt; &gt; &gt;  2. arp,metadata=0x1000002160001/0x10000ffffffff, priority 16384, cookie<br>
&gt; &gt; &gt; 0x2160001<br>
&gt; &gt; &gt;     TABLE<br>
&gt; &gt; &gt;      0. metadata=0x1000000000000/0x1000000000000, priority 24676, cookie<br>
&gt; &gt; &gt; 0x2140001<br>
&gt; &gt; &gt;             write_metadata:0x2000000000000/0x2000000000000<br>
&gt; &gt; &gt;             goto_table:2<br>
&gt; &gt; &gt;          2. metadata=0x3000002160001/0x30000ffffffff, priority 24576,<br>
&gt; &gt; &gt; cookie 0x2160001<br>
&gt; &gt; &gt;             write_actions(CONTROLLER:0)<br>
&gt; &gt; &gt;              -&gt; action set is: CONTROLLER:0<br>
&gt; &gt; &gt;     goto_table:3<br>
&gt; &gt;<br>
&gt; &gt; At the end of the flow table traversal by the action set, there&#39;s<br>
&gt; &gt; another action set that outputs to port 1:<br>
&gt; &gt;<br>
&gt; &gt; &gt;  3. metadata=0x1000002160001/0x10000ffffffff, priority 16384, cookie<br>
&gt; &gt; &gt; 0x2160001<br>
&gt; &gt; &gt;     push_vlan:0x8100<br>
&gt; &gt; &gt;     set_field:4351-&gt;vlan_vid<br>
&gt; &gt; &gt;     write_actions(output:1)<br>
&gt; &gt; &gt;      -&gt; action set is: output:1<br>
&gt; &gt;<br>
&gt; &gt; However, OVS doesn&#39;t execute action sets in a recursive manner (I don&#39;t<br>
&gt; &gt; believe that&#39;s a reasonable thing to do), so that&#39;s where everything<br>
&gt; &gt; ends.<br>
&gt; &gt;<br>
</blockquote></div>