Re: [PATCH net 0/3] net: add support for flex_array_resize in flex_array

2018-12-05 Thread Neil Horman
On Wed, Dec 05, 2018 at 02:49:39PM +0800, Xin Long wrote: > Without the support for the total_nr_elements's growing or shrinking > dynamically, flex_array is not that 'flexible'. Like when users want > to change the size, they have to redo flex_array_alloc and copy all > the elements from the old

[PATCH net 0/3] net: add support for flex_array_resize in flex_array

2018-12-04 Thread Xin Long
Without the support for the total_nr_elements's growing or shrinking dynamically, flex_array is not that 'flexible'. Like when users want to change the size, they have to redo flex_array_alloc and copy all the elements from the old to the new one. The worse thing is every element's memory gets