DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: dev@dpdk.org
Subject: Re: [dpdk-dev] [RFC PATCH 3/4] test: change lpm test to use routes as resource
Date: Fri, 6 May 2016 14:02:30 +0100	[thread overview]
Message-ID: <20160506130229.GA9864@bricha3-MOBL3> (raw)
In-Reply-To: <1462539092-24389-4-git-send-email-bruce.richardson@intel.com>

On Fri, May 06, 2016 at 01:51:31PM +0100, Bruce Richardson wrote:
> Change the lpm autotest to use the routes data from the resource data
> stored in the binary rather than including it directly into the C file
> as a C header. This speeds up compile and link time, without changing
> the test results.
> 
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
>  app/test/test_lpm.c | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++-
>  1 file changed, 69 insertions(+), 1 deletion(-)
> 
> diff --git a/app/test/test_lpm.c b/app/test/test_lpm.c
> index d2aa5de..4234a52 100644
> --- a/app/test/test_lpm.c
> +++ b/app/test/test_lpm.c
> @@ -34,6 +34,7 @@
>  #include <stdio.h>
>  #include <stdint.h>
>  #include <stdlib.h>
> +#include <string.h>
>  #include <errno.h>
>  #include <sys/queue.h>
>  
> @@ -44,16 +45,23 @@
>  #include <rte_branch_prediction.h>
>  #include <rte_ip.h>
>  #include <time.h>
> +#include <rte_malloc.h>
>  
>  #include "test.h"
>  #include "resource.h"
>  
>  #include "rte_lpm.h"
> -#include "test_lpm_routes.h"
>  #include "test_xmmt_ops.h"
>  
>  REGISTER_LINKED_RESOURCE(test_lpm_data)
>  
> +struct route_rule {
> +	uint32_t ip;
> +	uint8_t depth;
> +};
> +static struct route_rule *large_route_table;
> +static unsigned int NUM_ROUTE_ENTRIES;
> +
Just as an extra note, I had planned a 5th and final patch to rename this variable
to have a lower-case name, but I forgot to do so when preparing this RFC. If this
patchset seems good to people, I'll include that cleanup in a proper V1 submission.

/Bruce

  reply	other threads:[~2016-05-06 13:04 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-06 12:51 [dpdk-dev] [RFC PATCH 0/4] Convert lpm data from header to resource Bruce Richardson
2016-05-06 12:51 ` [dpdk-dev] [RFC PATCH 1/4] test: add lpm routes as a linked resource Bruce Richardson
2016-05-06 12:51 ` [dpdk-dev] [RFC PATCH 2/4] test: make all lpm routes be of unsigned type Bruce Richardson
2016-05-06 12:51 ` [dpdk-dev] [RFC PATCH 3/4] test: change lpm test to use routes as resource Bruce Richardson
2016-05-06 13:02   ` Bruce Richardson [this message]
2016-05-06 12:51 ` [dpdk-dev] [RFC PATCH 4/4] test: change lpm routes file from header to data file Bruce Richardson
2016-05-06 13:20 ` [dpdk-dev] [RFC PATCH 0/4] Convert lpm data from header to resource Thomas Monjalon
2016-06-14 13:03 ` [dpdk-dev] [PATCH " Nikita Kozlov
2016-06-14 13:03   ` [dpdk-dev] [PATCH 1/4] test: make all lpm routes be of unsigned type Nikita Kozlov
2016-06-14 13:03   ` [dpdk-dev] [PATCH 2/4] test: change lpm routes file from header to data file Nikita Kozlov
2016-06-14 13:03   ` [dpdk-dev] [PATCH 3/4] test: change lpm test to use routes as resource Nikita Kozlov
2016-06-14 13:03   ` [dpdk-dev] [PATCH 4/4] test: change lpm perf " Nikita Kozlov
2016-06-14 14:25   ` [dpdk-dev] [PATCH 0/4] Convert lpm data from header to resource Thomas Monjalon
2016-07-14 16:06   ` [dpdk-dev] [PATCH v2 0/5] change lpm route table from code to data Bruce Richardson
2016-07-14 16:06     ` [dpdk-dev] [PATCH v2 1/5] test: fix unneeded routes table include from lpm test Bruce Richardson
2016-07-14 16:06     ` [dpdk-dev] [PATCH v2 2/5] test: make all lpm routes be of unsigned type Bruce Richardson
2016-07-14 16:06     ` [dpdk-dev] [PATCH v2 3/5] test: add lpm routes as a linked resource Bruce Richardson
2016-07-14 16:06     ` [dpdk-dev] [PATCH v2 4/5] test: change lpm test to use routes as resource Bruce Richardson
2016-07-14 16:06     ` [dpdk-dev] [PATCH v2 5/5] test: change lpm routes file from header to data file Bruce Richardson
2016-07-15 23:05       ` Thomas Monjalon
2016-07-16  9:46         ` Richardson, Bruce

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=20160506130229.GA9864@bricha3-MOBL3 \
    --to=bruce.richardson@intel.com \
    --cc=dev@dpdk.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 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).