From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 423FB1B523 for ; Fri, 23 Nov 2018 11:30:32 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A1C0230821E3; Fri, 23 Nov 2018 10:30:31 +0000 (UTC) Received: from ktraynor.remote.csb (unknown [10.36.118.7]) by smtp.corp.redhat.com (Postfix) with ESMTP id E0BE61836C; Fri, 23 Nov 2018 10:30:29 +0000 (UTC) From: Kevin Traynor To: Dharmik Thakkar Cc: Honnappa Nagarahalli , Gavin Hu , dpdk stable Date: Fri, 23 Nov 2018 10:26:59 +0000 Message-Id: <20181123102713.17309-55-ktraynor@redhat.com> In-Reply-To: <20181123102713.17309-1-ktraynor@redhat.com> References: <20181123102713.17309-1-ktraynor@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Fri, 23 Nov 2018 10:30:31 +0000 (UTC) Subject: [dpdk-stable] patch 'test/hash: fix build' has been queued to stable release 18.08.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Nov 2018 10:30:32 -0000 Hi, FYI, your patch has been queued to stable release 18.08.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/29/18. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. If the code is different (ie: not only metadata diffs), due for example to a change in context or macro names, please double check it. Thanks. Kevin Traynor --- >>From 370924fdecabe9872b76c93f5e6d0fef66d79696 Mon Sep 17 00:00:00 2001 From: Dharmik Thakkar Date: Fri, 26 Oct 2018 16:43:03 -0500 Subject: [PATCH] test/hash: fix build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [ upstream commit 57ed574e263444928b793fff0d287121112fba84 ] Enable print_key_info() function compilation always. Compilation error message: 'test_hash.c: In function ‘print_key_info’: test_hash.c:90:15: error: cast discards ‘const’ qualifier from pointer target type [-Werror=cast-qual] uint8_t *p = (uint8_t *)key; ^ cc1: all warnings being treated as errors' Fixes: af75078fece36 ("first public release") Suggested-by: Honnappa Nagarahalli Signed-off-by: Dharmik Thakkar Reviewed-by: Honnappa Nagarahalli Reviewed-by: Gavin Hu --- test/test/test_hash.c | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/test/test/test_hash.c b/test/test/test_hash.c index b3db9fd10..db6442a2b 100644 --- a/test/test/test_hash.c +++ b/test/test/test_hash.c @@ -81,27 +81,21 @@ static uint32_t pseudo_hash(__attribute__((unused)) const void *keys, } +#define UNIT_TEST_HASH_VERBOSE 0 /* * 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; + if (UNIT_TEST_HASH_VERBOSE) { + const uint8_t *p = (const uint8_t *)key; + unsigned int i; - printf("%s key:0x", msg); - for (i = 0; i < sizeof(struct flow_key); i++) { - printf("%02X", p[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 */ -- 2.19.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2018-11-23 10:22:55.677347644 +0000 +++ 0055-test-hash-fix-build.patch 2018-11-23 10:22:54.000000000 +0000 @@ -1,4 +1,4 @@ -From 57ed574e263444928b793fff0d287121112fba84 Mon Sep 17 00:00:00 2001 +From 370924fdecabe9872b76c93f5e6d0fef66d79696 Mon Sep 17 00:00:00 2001 From: Dharmik Thakkar Date: Fri, 26 Oct 2018 16:43:03 -0500 Subject: [PATCH] test/hash: fix build @@ -6,6 +6,8 @@ Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit +[ upstream commit 57ed574e263444928b793fff0d287121112fba84 ] + Enable print_key_info() function compilation always. Compilation error message: @@ -17,7 +19,6 @@ cc1: all warnings being treated as errors' Fixes: af75078fece36 ("first public release") -Cc: stable@dpdk.org Suggested-by: Honnappa Nagarahalli Signed-off-by: Dharmik Thakkar @@ -28,7 +29,7 @@ 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/test/test/test_hash.c b/test/test/test_hash.c -index 6d06eb24c..fe607fadf 100644 +index b3db9fd10..db6442a2b 100644 --- a/test/test/test_hash.c +++ b/test/test/test_hash.c @@ -81,27 +81,21 @@ static uint32_t pseudo_hash(__attribute__((unused)) const void *keys,