From: Bruce Richardson Subject: Re: [PATCH v2] Implement memcmp using AVX/SSE instructions. Date: Wed, 13 May 2015 10:03:53 +0100 Message-ID: <20150513090353.GC12276@bricha3-MOBL3> References: <1431119989-32124-1-git-send-email-rkerur@gmail.com> <2601191342CEEE43887BDE71AB9772582142E106@irsmsx105.ger.corp.intel.com> <2601191342CEEE43887BDE71AB9772582142E44A@irsmsx105.ger.corp.intel.com> <2601191342CEEE43887BDE71AB9772582142E475@irsmsx105.ger.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "dev@dpdk.org" , Don Provan To: Ravi Kerur Return-path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 18BE15A32 for ; Wed, 13 May 2015 11:04:16 +0200 (CEST) Content-Disposition: inline In-Reply-To: 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 Tue, May 12, 2015 at 06:16:20PM -0700, Ravi Kerur wrote: > On Mon, May 11, 2015 at 3:29 PM, Don Provan wrote: > > > I probably shouldn't stick my nose into this, but I can't help myself. > > > > An experienced programmer will tend to ignore the documentation for > > a routine named "blahblah_memcmp" and just assume it functions like > > memcmp. Whether or not there's currently a use case in DPDK is > > completely irrelevant because as soon as there *is* a use case, some > > poor DPDK developer will try to use rte_memcmp for that and may or > > may not have a test case that reveals their mistake. > > > > In general I agree with you. However, comparison is a hit(equal) or > miss(unequal) is generally the case in networking. I haven't seen cases > where "less than" or "greater than" has mattered. > > Agreed that == and != are the common operations. However, if that is what is returned from the function - and given other limitations on parameter sizes - I agree with previous posters that this function needs to have a different name to rte_memcmp so as to avoid confusion. /Bruce