From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id BE82C1B517 for ; Fri, 30 Nov 2018 00:15:20 +0100 (CET) Received: from Internal Mail-Server by MTLPINE1 (envelope-from yskoh@mellanox.com) with ESMTPS (AES256-SHA encrypted); 30 Nov 2018 01:21:11 +0200 Received: from scfae-sc-2.mti.labs.mlnx (scfae-sc-2.mti.labs.mlnx [10.101.0.96]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id wATNCW8b032075; Fri, 30 Nov 2018 01:15:16 +0200 From: Yongseok Koh To: Dharmik Thakkar Cc: Honnappa Nagarahalli , Gavin Hu , dpdk stable Date: Thu, 29 Nov 2018 15:11:31 -0800 Message-Id: <20181129231202.30436-97-yskoh@mellanox.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20181129231202.30436-1-yskoh@mellanox.com> References: <20181129231202.30436-1-yskoh@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'test/hash: fix build' has been queued to LTS release 17.11.5 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: Thu, 29 Nov 2018 23:15:21 -0000 Hi, FYI, your patch has been queued to LTS release 17.11.5 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 12/01/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. Yongseok --- >>From f4e02a9fa7eb230e4314bf7b05f9f56a4bf725fc 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 | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/test/test/test_hash.c b/test/test/test_hash.c index 4668cf1a2..2218142a2 100644 --- a/test/test/test_hash.c +++ b/test/test/test_hash.c @@ -109,29 +109,23 @@ static uint32_t pseudo_hash(__attribute__((unused)) const void *keys, return 3; } +#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; - - 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 int 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.11.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2018-11-29 15:01:49.471133847 -0800 +++ 0097-test-hash-fix-build.patch 2018-11-29 15:01:45.256958000 -0800 @@ -1,4 +1,4 @@ -From 57ed574e263444928b793fff0d287121112fba84 Mon Sep 17 00:00:00 2001 +From f4e02a9fa7eb230e4314bf7b05f9f56a4bf725fc 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,10 +29,10 @@ 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/test/test/test_hash.c b/test/test/test_hash.c -index 6d06eb24c..fe607fadf 100644 +index 4668cf1a2..2218142a2 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, +@@ -109,29 +109,23 @@ static uint32_t pseudo_hash(__attribute__((unused)) const void *keys, return 3; }