From mboxrd@z Thu Jan 1 00:00:00 1970 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) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga103.jf.intel.com with ESMTP; 13 May 2015 02:03:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,420,1427785200"; d="scan'208";a="709470202" Received: from bricha3-mobl3.ger.corp.intel.com ([10.237.220.50]) by fmsmga001.fm.intel.com with SMTP; 13 May 2015 02:03:54 -0700 Received: by (sSMTP sendmail emulation); Wed, 13 May 2015 10:03:53 +0025 Date: Wed, 13 May 2015 10:03:53 +0100 From: Bruce Richardson To: Ravi Kerur 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 Content-Disposition: inline In-Reply-To: Organization: Intel Shannon Ltd. User-Agent: Mutt/1.5.23 (2014-03-12) Cc: "dev@dpdk.org" , Don Provan Subject: Re: [dpdk-dev] [PATCH v2] Implement memcmp using AVX/SSE instructions. X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 May 2015 09:04:17 -0000 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