On Tue, Sep 08, 2015 at 09:41:51AM +0300, Gal Sagie wrote: > for example: priority 100 match 10.0.0.0/24 go to controller > priority 100 match 10.0.0.1 go to next table
That's a bad idea: these flows overlap so they should have different priorities. > I am sending a generated packet using ovs-appctl with destination IP that > doesnt match > any subnet or specific IP in table 2 : > > ovs-appctl ofproto/trace br-int > in_port=2,dl_src=00:00:00:00:00:01,dl_dst=fa:16:3e:e2:16:63,eth_type=0x800,nw_dst=8.8.8.8,nw_src=192.1.1.1 > -generate > > The installed megaflow i see is this: > Megaflow: recirc_id=0,ip,in_port=2,dl_dst=fa:16:3e:e2:16:63,nw_dst= > 0.0.0.0/2.0.0.0,nw_frag=no > > The question is how does the nw_dst is calculated in this megaflow ? > is it finding a mask that doesnt fit any IP or subnet in table 2 and > calculate it? (it seems > like a hard task, especially with combined IP's and subnets matchers). Yes, that's what it's doing, see "Prefix Tracking" in classifier.h as well as the more formal description in our NSDI 2015 paper at http://openvswitch.org/support/papers/nsdi2015.pdf. It's not all that expensive, don't worry about it. > If i add a learning flow to this table with nw_dst of 8.8.8.8 (for example > do learning for every miss in table 2) is it going to be more efficient > performance wise? (because the megaflow would then be able to have nw_dst > of 8.8.8.8) Adding a flow for every actual nw_dst is going to be much much more expensive unless there are very few actual nw_dst. _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev