[dpdk-dev] [PATCH v2] Implement memcmp using AVX/SSE instructions.

Ravi Kerur rkerur at gmail.com
Wed May 13 22:08:17 CEST 2015


On Wed, May 13, 2015 at 2:03 AM, Bruce Richardson <
bruce.richardson at intel.com> wrote:

> On Tue, May 12, 2015 at 06:16:20PM -0700, Ravi Kerur wrote:
> > On Mon, May 11, 2015 at 3:29 PM, Don Provan <dprovan at bivio.net> 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.
>

I will be implementing complete memcmp itself, so probably I will retain
same name.

>
> /Bruce
>
>


More information about the dev mailing list