From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f178.google.com (mail-wi0-f178.google.com [209.85.212.178]) by dpdk.org (Postfix) with ESMTP id A08945697 for ; Wed, 13 May 2015 14:21:33 +0200 (CEST) Received: by wizk4 with SMTP id k4so196091081wiz.1 for ; Wed, 13 May 2015 05:21:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=TDgPut4ycZE7blT553OZ59bmXnkklxhN7Bjhxv6i7AM=; b=YHCTTYKC3RFQ7b3kH5KAWWqVkXa7B/qOVRQvSBw/0hGqPlj2pIA4eHqaVNDM+++2s8 eYjIsfx19YqykpldD/lcfdcS1OopC84NDlyzBj+IZCwN0pN0N0cPr2OLNA9KMot/RIXS +pulf0dc62UrwMLUsW4zCkj+oEPwND+XPn+ED45ppNNFLzL88t5qFRfQQshjJ07u+kHk 6aivUCN0BHa5KlJ4TsedCwK5gpKztzr5DEjh0Z6EYc0uFIHJir4RXN0hV62QKnWyyo5g wOoNEX6zbmY+rGzmNEgvwaEK8RYZb9aFVsdmMYAJdFGazP4rCrj021JofmeWm5URqxYU D6HA== X-Gm-Message-State: ALoCoQlVWozPSLj7gfSwe6umKCwgxjO53Le9Ye68LyvcPxaxw9msmoawbuBuwmZVqItfkOatvYmE MIME-Version: 1.0 X-Received: by 10.180.104.4 with SMTP id ga4mr14145677wib.86.1431519693490; Wed, 13 May 2015 05:21:33 -0700 (PDT) Received: by 10.194.36.193 with HTTP; Wed, 13 May 2015 05:21:33 -0700 (PDT) In-Reply-To: References: <1431119946-32078-1-git-send-email-rkerur@gmail.com> <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> Date: Wed, 13 May 2015 07:21:33 -0500 Message-ID: From: Jay Rolette To: Ravi Kerur Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 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 12:21:33 -0000 On Tue, May 12, 2015 at 8:16 PM, 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. > It's useful when you need to make sure packets from both sides of a conversation go to the same processing queue/thread. Instead of hashing the 5-tuple from the packet as src.ip, dst.ip, src.dport, dst.dport, etc., you can use lesser.ip, higher.ip, lesser.sport, higher.dport, etc. Very common when you are doing deep packet inspection. Jay