From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ob0-f179.google.com (mail-ob0-f179.google.com [209.85.214.179]) by dpdk.org (Postfix) with ESMTP id 763E25A13 for ; Thu, 23 Apr 2015 15:43:37 +0200 (CEST) Received: by oblw8 with SMTP id w8so13649962obl.0 for ; Thu, 23 Apr 2015 06:43:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=VKaA/J+Xs3AIwGAuBSp1fTx5Jjkm9Gs3GGrtzxZb190=; b=iVgc1/9hTRmlR9E+9wR5NnkKgLwt4dTfMXJdamZDae/VBv09jI0Xyb6zPr6jxIseBc q2fBFLjldh1xSLfna5biWZR4OflG3mNMwgvfUsoH8Gxr5q+SxqxccaUnKQ/uqIEY5Kp7 jfy8fEi7GrRONPZB2ByC4b7BYFqPCWpaphYHS4fWwHDiV1HlqEMGnm9dxtZkeaeo4Zwo WZcjenREhYtmyI4yFccuP/05brae7IS5V9Ij6eyWxRE+ZgTST7xui2K8fR+cxbzR19KK FIeyh3MqzRGbERAQjLZ6Mch4g92yamA6sqioTehQvNXQRL2qYyEiwka+byF8R1ZDF9XI wXtA== MIME-Version: 1.0 X-Received: by 10.202.98.193 with SMTP id w184mr2397469oib.96.1429796616832; Thu, 23 Apr 2015 06:43:36 -0700 (PDT) Received: by 10.202.179.195 with HTTP; Thu, 23 Apr 2015 06:43:36 -0700 (PDT) In-Reply-To: <55389E44.8030603@intel.com> References: <1429716828-19012-1-git-send-email-rkerur@gmail.com> <1429716828-19012-2-git-send-email-rkerur@gmail.com> <55389E44.8030603@intel.com> Date: Thu, 23 Apr 2015 06:43:36 -0700 Message-ID: From: Ravi Kerur To: Pawel Wodkowski Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH] Implement memcmp using AVX/SSE instructio 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: Thu, 23 Apr 2015 13:43:37 -0000 On Thu, Apr 23, 2015 at 12:24 AM, Pawel Wodkowski < pawelx.wodkowski@intel.com> wrote: > On 2015-04-22 17:33, Ravi Kerur wrote: > >> +/** >> + * Compare bytes between two locations. The locations must not overlap. >> + * >> + * @note This is implemented as a macro, so it's address should not be >> taken >> + * and care is needed as parameter expressions may be evaluated multiple >> times. >> + * >> + * @param src_1 >> + * Pointer to the first source of the data. >> + * @param src_2 >> + * Pointer to the second source of the data. >> + * @param n >> + * Number of bytes to compare. >> + * @return >> + * true if equal otherwise false. >> + */ >> +static inline bool >> +rte_memcmp(const void *src_1, const void *src, >> + size_t n) __attribute__((always_inline)); >> > You are exposing this as public API, so I think you should follow > description bellow or not call this _memcmp_ > > int memcmp(const void *s1, const void *s2, size_t n); > > The memcmp() function returns an integer less than, equal to, or > greater than > zero if the first n bytes of s1 is found, respectively, to be > less than, to > match, or be greater than the first n bytes of s2. > > This can/will be fixed in future version. Thanks. > -- > Pawel >