On Tue, Aug 30, 2016 at 3:22 PM, Ben Pfaff <b...@ovn.org> wrote:
> On Mon, Aug 29, 2016 at 11:58:14AM -0700, Jesse Gross wrote:
>> When flows are read by ovs-ofctl (either from a switch or a file),
>> tunnel metadata space is dynamically allocated since there isn't a
>> preset table. This works well for single flows but doesn't handle
>> groups of flows that must be compared to each other. In this case,
>> each flow will have its own independent allocation making comparisons
>> meaningless.
>>
>> Even worse is that when these matches are later serialized (either
>> for display or in NXM format), the metadata allocation has been
>> stripped off of the matches. The serialization code then attempts to
>> use the global table, which is also not available, leading to a
>> dereference of a NULL pointer.
>>
>> Solving this problem requires building an overall metadata table.
>> Since we don't know the maximum size of a field (particularly for
>> flows read from a file), it's necessary to do this in two passes.
>> The first pass records the maximum size for each field as well as
>> stores the received matches. The second pass creates a metadata
>> table based on the sizes, adjusts the match layout based on the new
>> allocation, and then replays the stored matches for comparison.
>> Later serialization will used the generated table to output the
>> flows.
>>
>> Signed-off-by: Jesse Gross <je...@kernel.org>
>
> Good catch.
>
> Acked-by: Ben Pfaff <b...@ovn.org>

Thanks, I rolled in your suggestions and applied both patches in this
series to master, branch-2.6, and branch-2.5.
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to