On Wed, Jun 15, 2016 at 07:41:36PM +0000, Farhad Sunavala wrote:
> Hi Ben,
> Thanks for your response.
> >The "learn" functionality is meant for setting up flows that do simple
> >things like loading values.  If you want another resubmit, you can
> >always do it after resubmitting to the table that contained the learned
> >flows.
> 
> Let me clarity with a more detailed example:
> This is the original flow with learn actions in table=10
>  ovs-ofctl add-flow br-tun 
> "table=10,actions=learn(table=20,hard_timeout=300,priority=1,cookie=0x8566f3d5b5121f44,NXM_OF_VLAN_TCI[0..11],NXM_OF_ETH_DST[]=NXM_OF_ETH_SRC[],load:0->NXM_OF_VLAN_TCI[],load:NXM_NX_TUN_ID[]->NXM_NX_TUN_ID[],output:NXM_OF_IN_PORT[]),output:1)
> 
> These are the learnt flows in table 20:
>  cookie=0x8566f3d5b5121f44, duration=158251.837s, table=20, n_packets=59571, 
> n_bytes=5725581, idle_age=1, hard_age=65534, 
> priority=2,dl_vlan=2,dl_dst=fa:16:3e:fc:11:39 
> actions=strip_vlan,load:0x2044->NXM_NX_TUN_ID[],output:2 
> cookie=0x8566f3d5b5121f44, duration=236.832s, table=20, n_packets=0, 
> n_bytes=0, hard_timeout=300, idle_age=236, hard_age=0, 
> priority=1,vlan_tci=0x0002/0x0fff,dl_dst=fa:16:3e:fc:11:39 
> actions=load:0->NXM_OF_VLAN_TCI[],load:0x2044->NXM_NX_TUN_ID[],output:2
> This is the added flow which will resubmit packets not matching the learnt 
> flows to table 22.
>  cookie=0x8566f3d5b5121f44, duration=179860.984s, table=20, n_packets=4, 
> n_bytes=316, idle_age=49657, hard_age=65534, priority=0 actions=resubmit(,22)
> 
> What I need is a way to resubmit packets matching the two learnt flows to 
> table 22.If I put the flow with learn action in table=10 as follows (without 
> an output action in the learnt flows)
> ovs-ofctl add-flow br-tun 
> "table=10,actions=learn(table=20,hard_timeout=300,priority=1,cookie=0x8566f3d5b5121f44,NXM_OF_VLAN_TCI[0..11],NXM_OF_ETH_DST[]=NXM_OF_ETH_SRC[],load:0->NXM_OF_VLAN_TCI[],load:NXM_NX_TUN_ID[]->NXM_NX_TUN_ID[]),output:1)

It's already possible to do what you want.  Have the learned flows set a
register to a distinctive value, such as 1, and match on that register
after resubmitting to the table that contains the learned flows.  In the
next table, if the register contains the value, resubmit to table 22,
otherwise don't.
_______________________________________________
discuss mailing list
discuss@openvswitch.org
http://openvswitch.org/mailman/listinfo/discuss

Reply via email to