Hi, all

I wonder why the installed megaflow is the one bellow:


> 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
Can  'nw_dst=0.0.0.0/2.0.0.0' matches any flow of which the prefix is 
'network address: xxxxxx0x.xxxxxxxx.xxxxxxxx.xxxxxxxx
'network mask: 00000010.00000000.00000000.00000000' ?


If so, then why?


Thanks.



At 2015-09-09 04:02:44, "Jarno Rajahalme" <jrajaha...@nicira.com> wrote:
>
>> On Sep 8, 2015, at 9:38 AM, Ben Pfaff <b...@nicira.com> wrote:
>> 
>> 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.
>
>More specifically, assuming you want longest prefix match, you should give 
>higher priorities to longer prefixes. One way to do that is to add the prefix 
>length to the priority, i.e., for 10.0.0.0/24 use priority 124 and for 
>10.0.0.1 use priority 132.
>
>  Jarno
>
>> 
>>> 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
>
>_______________________________________________
>dev mailing list
>dev@openvswitch.org
>http://openvswitch.org/mailman/listinfo/dev
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to