DPDK patches and discussions
 help / color / mirror / Atom feed
From: Gavin Hu <Gavin.Hu@arm.com>
To: Dharmik Thakkar <Dharmik.Thakkar@arm.com>,
	Bruce Richardson <bruce.richardson@intel.com>,
	Pablo de Lara <pablo.de.lara.guarch@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>,
	Dharmik Thakkar <Dharmik.Thakkar@arm.com>
Subject: Re: [dpdk-dev] [PATCH] test/hash: solve unit test hash compilation error
Date: Mon, 27 Aug 2018 14:41:10 +0000	[thread overview]
Message-ID: <VI1PR08MB31670C0BD9C055F936D91A448F0B0@VI1PR08MB3167.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <1535379969-19642-1-git-send-email-dharmik.thakkar@arm.com>


> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Dharmik Thakkar
> Sent: Monday, August 27, 2018 10:26 PM
> To: Bruce Richardson <bruce.richardson@intel.com>; Pablo de Lara
> <pablo.de.lara.guarch@intel.com>
> Cc: dev@dpdk.org; Honnappa Nagarahalli
> <Honnappa.Nagarahalli@arm.com>; Dharmik Thakkar
> <Dharmik.Thakkar@arm.com>
> Subject: [dpdk-dev] [PATCH] test/hash: solve unit test hash compilation error
>
> Enable print_key_info() function compilation always.
>
> Signed-off-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
> Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
> Reviewed-by: Gavin Hu <gavin.hu@arm.com>
> Suggested-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Acked-by: Gavin Hu <gavin.hu@arm.com>
> ---
>  test/test/test_hash.c | 24 +++++++++---------------
>  1 file changed, 9 insertions(+), 15 deletions(-)
>
> diff --git a/test/test/test_hash.c b/test/test/test_hash.c index
> b3db9fd..13239e1 100644
> --- a/test/test/test_hash.c
> +++ b/test/test/test_hash.c
> @@ -80,29 +80,23 @@ static uint32_t pseudo_hash(__attribute__((unused))
> const void *keys,
>  return 3;
>  }
>
> +#define UNIT_TEST_HASH_VERBOSE0
>  /*
>   * Print out result of unit test hash operation.
>   */
> -#if defined(UNIT_TEST_HASH_VERBOSE)
>  static void print_key_info(const char *msg, const struct flow_key *key,
>  int32_t pos)
>  {
> -uint8_t *p = (uint8_t *)key;
> -unsigned i;
> -
> -printf("%s key:0x", msg);
> -for (i = 0; i < sizeof(struct flow_key); i++) {
> -printf("%02X", p[i]);
> +if (UNIT_TEST_HASH_VERBOSE) {
> +const uint8_t *p = (const uint8_t *)key;
> +unsigned i;
> +
> +printf("%s key:0x", msg);
> +for (i = 0; i < sizeof(struct flow_key); i++)
> +printf("%02X", p[i]);
> +printf(" @ pos %d\n", pos);
>  }
> -printf(" @ pos %d\n", pos);
> -}
> -#else
> -static void print_key_info(__attribute__((unused)) const char *msg,
> -__attribute__((unused)) const struct flow_key *key,
> -__attribute__((unused)) int32_t pos)
> -{
>  }
> -#endif
>
>  /* Keys used by unit test functions */
>  static struct flow_key keys[5] = { {
> --
> 2.7.4

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

  reply	other threads:[~2018-08-27 14:41 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-27 14:26 Dharmik Thakkar
2018-08-27 14:41 ` Gavin Hu [this message]
2018-09-16  9:59 ` Thomas Monjalon
2018-09-18 19:22 ` [dpdk-dev] [PATCH v2] " Dharmik Thakkar
2018-10-01 20:04   ` Honnappa Nagarahalli
2018-10-26 20:24   ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
2018-10-26 21:05     ` Wang, Yipeng1
2018-10-26 21:55       ` Dharmik Thakkar
2018-10-26 21:59         ` Thomas Monjalon
2018-10-29  4:16           ` Honnappa Nagarahalli
2018-10-29  4:24             ` Thomas Monjalon
2018-10-29  4:54               ` Honnappa Nagarahalli
2018-10-26 21:09     ` Dharmik Thakkar
2018-10-26 21:43   ` [dpdk-dev] [PATCH v3] " Dharmik Thakkar
2018-11-06  2:19     ` Thomas Monjalon

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=VI1PR08MB31670C0BD9C055F936D91A448F0B0@VI1PR08MB3167.eurprd08.prod.outlook.com \
    --to=gavin.hu@arm.com \
    --cc=Dharmik.Thakkar@arm.com \
    --cc=Honnappa.Nagarahalli@arm.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=pablo.de.lara.guarch@intel.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).