[ovs-dev] [PATCH 1/3] [bug 2462] flex-array: Flex arrays-cleanup.

Jesse Gross jesse at nicira.com
Fri Feb 3 03:05:31 UTC 2012


On Thu, Feb 2, 2012 at 6:58 AM, Pravin B Shelar <pshelar at nicira.com> wrote:
> cleanups:
>        - removes flex_array_shrink() as there is no caller.
>        - add flex_array_init()
>        - Add few 'const's.
>
> Signed-off-by: Pravin B Shelar <pshelar at nicira.com>

Since we're going to propose these changes for upstream and we're
going to need to break them apart into individual changes we should
just do that now.

It's not clear to me that flex_array_init() is that big of a win.
struct flex_array stores the base array inside of it, so it is defined
to be PAGE_SIZE.  Since it is so large, storing that inside of another
struct as you do in the third patch isn't necessarily a great idea.
We already allocate the port array separately, so it's not clear why
this is different.



More information about the dev mailing list