All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ravi Kerur <rkerur-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Pawel Wodkowski
	<pawelx.wodkowski-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: "dev-VfR2kkLFssw@public.gmane.org" <dev-VfR2kkLFssw@public.gmane.org>
Subject: Re: [PATCH] Implement memcmp using AVX/SSE instructio
Date: Thu, 23 Apr 2015 06:43:36 -0700	[thread overview]
Message-ID: <CAFb4SLApQDxtpDP5VfRWzJcASJgosCx2PpEMNJCXvE3coh=V8w@mail.gmail.com> (raw)
In-Reply-To: <55389E44.8030603-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>

On Thu, Apr 23, 2015 at 12:24 AM, Pawel Wodkowski <
pawelx.wodkowski-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> 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
>

      parent reply	other threads:[~2015-04-23 13:43 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-22 15:33 [PATCH] Implement rte_memcmp with AVX/SSE instructions Ravi Kerur
     [not found] ` <1429716828-19012-1-git-send-email-rkerur-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-04-22 15:33   ` [PATCH] Implement memcmp using AVX/SSE instructio Ravi Kerur
     [not found]     ` <1429716828-19012-2-git-send-email-rkerur-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-04-23  7:24       ` Pawel Wodkowski
     [not found]         ` <55389E44.8030603-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-04-23  8:11           ` Bruce Richardson
2015-04-23  8:21             ` Luke Gorrie
2015-04-23  9:23             ` Ananyev, Konstantin
     [not found]               ` <2601191342CEEE43887BDE71AB97725821420FC7-pww93C2UFcwu0RiL9chJVbfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-04-23 13:53                 ` Ravi Kerur
     [not found]                   ` <CAFb4SLBvTwvMnFkVM9Lz+DJae0PuQdyVfu1Fn24mYy8qPFGOzQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-04-23 14:00                     ` Bruce Richardson
2015-04-23 22:26                       ` Ravi Kerur
     [not found]                         ` <CAFb4SLCVig628gqwozA-hj9r2SVb1-tEFhxrSWEfKWqQ-D_2xQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-05-05 21:56                           ` Ravi Kerur
2015-04-23 13:43           ` Ravi Kerur [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAFb4SLApQDxtpDP5VfRWzJcASJgosCx2PpEMNJCXvE3coh=V8w@mail.gmail.com' \
    --to=rkerur-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=dev-VfR2kkLFssw@public.gmane.org \
    --cc=pawelx.wodkowski-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.