[dpdk-dev] [PATCH v3 1/1] eal/linux: change hugepage sorting to avoid overlapping memcpy

Sergio Gonzalez Monroy sergio.gonzalez.monroy at intel.com
Thu Jan 7 10:51:35 CET 2016


On 07/01/2016 09:33, Sergio Gonzalez Monroy wrote:
> On 05/01/2016 09:37, Ralf Hoffmann wrote:
>> with only one hugepage or already sorted hugepage addresses, the sort
>> function called memcpy with same src and dst pointer. Debugging with
>> valgrind will issue a warning about overlapping area. This patch
>> changes the sort method to qsort to avoid this behavior, according to
>> original patch from Jay Rolette <rolette at infiniteio.com>. The separate
>> sort function is no longer necessary.
>>
>> Signed-off-by: Ralf Hoffmann <ralf.hoffmann at allegro-packets.com>
>> ---
>>
> Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy at intel.com>
Forgot to mention that there is a checkpatch warning:
WARNING:LONG_LINE: line over 90 characters
#113: FILE: lib/librte_eal/linuxapp/eal/eal_memory.c:1167:
+               qsort(&tmp_hp[hp_offset], hpi->num_pages[0], 
sizeof(struct hugepage_file), cmp_physaddr);

Could you fix that Ralf?

Thanks,
Sergio


More information about the dev mailing list