DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Richardson, Bruce" <bruce.richardson@intel.com>
To: Vladimir Medvedkin <medvedkinv@gmail.com>, "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] Add unit test for thash library
Date: Fri, 19 Jun 2015 16:14:48 +0000	[thread overview]
Message-ID: <59AF69C657FD0841A61C55336867B5B03455A867@IRSMSX103.ger.corp.intel.com> (raw)
In-Reply-To: <1434725778-22887-1-git-send-email-medvedkinv@gmail.com>



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Vladimir Medvedkin
> Sent: Friday, June 19, 2015 3:56 PM
> To: dev@dpdk.org
> Subject: [dpdk-dev] [PATCH] Add unit test for thash library
> 
> Add unit test for thash library
> 
Missing sign-off.

> ---
>  app/test/Makefile         |   2 +
>  app/test/autotest_data.py |  13 ++++
>  app/test/test_thash.c     | 164
> ++++++++++++++++++++++++++++++++++++++++++++++
>  3 files changed, 179 insertions(+)
>  create mode 100644 app/test/test_thash.c
> 
> diff --git a/app/test/Makefile b/app/test/Makefile
> index 5cf8296..fc6a247 100644
> --- a/app/test/Makefile
> +++ b/app/test/Makefile
> @@ -85,6 +85,8 @@ SRCS-$(CONFIG_RTE_LIBRTE_HASH) += test_hash.c
>  SRCS-$(CONFIG_RTE_LIBRTE_HASH) += test_hash_perf.c
>  SRCS-$(CONFIG_RTE_LIBRTE_HASH) += test_hash_functions.c
> 
> +SRCS-y += test_thash.c
> +
>  SRCS-$(CONFIG_RTE_LIBRTE_LPM) += test_lpm.c
>  SRCS-$(CONFIG_RTE_LIBRTE_LPM) += test_lpm6.c
> 
> diff --git a/app/test/autotest_data.py b/app/test/autotest_data.py
> index 0c3802b..7653f09 100644
> --- a/app/test/autotest_data.py
> +++ b/app/test/autotest_data.py
> @@ -475,6 +475,19 @@ non_parallel_test_group_list = [
>  		},
>  	]
>  },
> +{
> +	"Prefix" :	"thash",
> +	"Memory" :	"32",
> +	"Tests" :
> +	[
> +		{
> +                 "Name" :       "Thash autotest",
> +                 "Command" :    "thash_autotest",
> +                 "Func" :       default_autotest,
> +                 "Report" :     None,
> +                },
> +	]
> +},
> 
>  #
>  # Please always make sure that ring_perf is the last test!
> diff --git a/app/test/test_thash.c b/app/test/test_thash.c
> new file mode 100644
> index 0000000..4c863cc
> --- /dev/null
> +++ b/app/test/test_thash.c
> @@ -0,0 +1,164 @@
> +/*-
> + *   BSD LICENSE
> + *
> + *   Copyright(c) 2015 Vladimir Medvedkin <medvedkinv@gmail.com>
> + *   All rights reserved.
> + *
> + *   Redistribution and use in source and binary forms, with or without
> + *   modification, are permitted provided that the following conditions
> + *   are met:
> + *
> + *     * Redistributions of source code must retain the above copyright
> + *       notice, this list of conditions and the following disclaimer.
> + *     * Redistributions in binary form must reproduce the above
> copyright
> + *       notice, this list of conditions and the following disclaimer in
> + *       the documentation and/or other materials provided with the
> + *       distribution.
> + *     * Neither the name of Intel Corporation nor the names of its
> + *       contributors may be used to endorse or promote products derived
> + *       from this software without specific prior written permission.
> + *
> + *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
> + *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
> + *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
> FOR
> + *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
> + *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
> INCIDENTAL,
> + *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
> + *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
> USE,
> + *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
> ANY
> + *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
> + *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
> USE
> + *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> + */
> +
> +//#include <stdio.h>
> +//#include <stdint.h>
> +//#include <string.h>
> +#include <stdlib.h>
> +//#include <stdarg.h>
> +//#include <errno.h>

Please just delete the commented out lines, there is no need to keep them.

> +
> +#include <rte_common.h>
> +#include <rte_eal.h>
> +#include <rte_ip.h>
> +
> +#include "test.h"
> +
> +#include <rte_thash.h>
> +
> +struct test_thash_v4 {
> +	uint32_t	dst_ip;
> +	uint32_t	src_ip;
> +	uint16_t	dst_port;
> +	uint16_t	src_port;
> +	uint32_t	hash_l3;
> +	uint32_t	hash_l3l4;
> +};
> +
> +struct test_thash_v6 {
> +	uint8_t		dst_ip[16];
> +	uint8_t		src_ip[16];
> +	uint16_t	dst_port;
> +	uint16_t	src_port;
> +	uint32_t	hash_l3;
> +	uint32_t	hash_l3l4;
> +};
> +
> +/*From 82599 Datasheet p.309 �§7.1.2.8.RSS Verification Suite*/

Strange characters present in the above line (they don't show up for me in mutt though).
I'd also suggest dropping the page number, as that can probably change across different versions of the datasheet. [I have a (very) old copy of the datasheet myself, and it's only on page 248 there. It's obviously time for me to pull down an updated copy :-)).

/Bruce

  parent reply	other threads:[~2015-06-19 16:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-19 14:56 Vladimir Medvedkin
2015-06-19 15:32 ` [dpdk-dev] [PATCH v2] " Vladimir Medvedkin
2015-06-19 16:14 ` Richardson, Bruce [this message]
2015-06-19 16:23   ` [dpdk-dev] [PATCH] " Vladimir Medvedkin

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=59AF69C657FD0841A61C55336867B5B03455A867@IRSMSX103.ger.corp.intel.com \
    --to=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=medvedkinv@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).