From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sergio Gonzalez Monroy Subject: Re: [PATCH v3 1/1] eal/linux: change hugepage sorting to avoid overlapping memcpy Date: Thu, 7 Jan 2016 10:38:51 +0000 Message-ID: <568E403B.7040002@intel.com> References: <55EEEF99.2000708@intel.com> <1451986625-16645-1-git-send-email-ralf.hoffmann@allegro-packets.com> <1451986625-16645-2-git-send-email-ralf.hoffmann@allegro-packets.com> <568E3103.9060707@intel.com> <568E3527.2080302@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org To: Ralf Hoffmann Return-path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 3D2CD957F for ; Thu, 7 Jan 2016 11:38:54 +0100 (CET) In-Reply-To: <568E3527.2080302@intel.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 07/01/2016 09:51, Sergio Gonzalez Monroy wrote: > 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 . The separate >>> sort function is no longer necessary. >>> >>> Signed-off-by: Ralf Hoffmann >>> --- >>> >> Acked-by: Sergio Gonzalez Monroy > 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 Just FYI, there is a new DPDK Contributors guide: http://dpdk.org/doc/guides/contributing/patches.html Regards, Sergio