On 08/26/14 at 12:02pm, Jarno Rajahalme wrote:
> Miniflows can also be dynamically allocated to have more inline space than 
> the default amount. classifier.c makes use of that, but it never calls 
> miniflow_move (even indirectly) so you are not getting an assert fail. The 
> motivation for right-sized miniflows in the classifier is to reduce levels of 
> indirection while not wasting memory.

I even did a grep for additional alloc sites but missed the embedded
miniflow in cls_match. Neat but really non obvious ;-)

The code looked so extremely wrong with dead code branch *plus*
out of bounds access of the array. Sorry for the noise.

> /* Initializes 'dst' with the data in 'src', destroying 'src'.
>  * The caller must eventually free 'dst' with miniflow_destroy().
>  * 'dst' must be regularly sized miniflow, but 'src' can have
>  * larger than default inline values. */

Maybe also adjust this comment a bit. I didn't get that "larger
than default inline values" refers to the *size* of
inline_values.
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to