From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0048.outbound.protection.outlook.com [104.47.2.48]) by dpdk.org (Postfix) with ESMTP id 1AF965B3E; Mon, 1 Oct 2018 22:04:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector1-arm-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=I75fukeiMXqbQxTzKNgaufDYjsEmUxfdRpF0TB55oU0=; b=CkVIoGlxIpHQQaCCyszjrqRcI1CYXYQqoQpLc1EaPOPOsJcRq56cM1ZXVGDmjIudHem4QcfvEED2KJnZeg00HoswiHtToxpbwYS2WKVXhpYjkO047p9D/KTGt49QdAJ0o+nHTZC30tQ7Sb2Mz2vgIqMbT/7b7xX69hbI3W4UARc= Received: from AM6PR08MB3672.eurprd08.prod.outlook.com (20.177.115.29) by AM6PR08MB3047.eurprd08.prod.outlook.com (52.135.163.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1185.25; Mon, 1 Oct 2018 20:04:06 +0000 Received: from AM6PR08MB3672.eurprd08.prod.outlook.com ([fe80::f423:e46a:a03c:e928]) by AM6PR08MB3672.eurprd08.prod.outlook.com ([fe80::f423:e46a:a03c:e928%2]) with mapi id 15.20.1185.024; Mon, 1 Oct 2018 20:04:06 +0000 From: Honnappa Nagarahalli To: Dharmik Thakkar , Bruce Richardson , Pablo de Lara CC: "dev@dpdk.org" , "thomas@monjalon.net" , Dharmik Thakkar , "stable@dpdk.org" , nd Thread-Topic: [PATCH v2] test/hash: solve unit test hash compilation error Thread-Index: AQHUT4UIgjqCC1DXB0my/VwlVWUnmqUK5IrQ Date: Mon, 1 Oct 2018 20:04:05 +0000 Message-ID: References: <1535379969-19642-1-git-send-email-dharmik.thakkar@arm.com> <1537298539-31403-1-git-send-email-dharmik.thakkar@arm.com> In-Reply-To: <1537298539-31403-1-git-send-email-dharmik.thakkar@arm.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Honnappa.Nagarahalli@arm.com; x-originating-ip: [217.140.111.135] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; AM6PR08MB3047; 6:ma2g+IHcsYkPXIRgKEzS5JE3JXqcwVmjJEr+7SAMdODBVdxUKSBxw8TEz5c8pKkn6lJcG8G4rkfhnbRxfmGtLzWQwHTv+BAt5M+aTueCaVRbasnMFJJ0R08URMyaJxjIfG2O60gBCYgOPlMjXCoANkqQ/ydNA5kA2EH1JrpUnJkAP0CVnA84mAaZnPeibMmhAOlhcOWAU2yKFpgr9feWhAPEqlr8zYgiPTohOvHVrPnYPqoiq2Hi7mX/NjguIdRigXANxs+MxkqGFS2O2Ry1Ap8HXWFqqV3xXxLGG2MgczJXlXgJkFrPyxpxATj8fedRdGdqO+JmN5bf7i1Uzt3HnsVudkoHOV5WeQ2YjgPJaW2WErI9+xWsPJUO34nYoVFSBI3KZGeZXtBgMW1GzF3It0MMGh5BJJ/QFd/x4zUF8upmSe4KN2g2RfzDSUbGjiZZdun3DmaKjPBef3xDdfwr2w==; 5:cfMKeWxc+TIgbK7MjVCXLtDuZNTm8b6jcftz02JEE/mjVo1Izse45DL4F/m2V17eA3B+ixE7CUy99YSxTT3SWcIKEz2P/f1hBVk3xCLqn89j2OJKeUHOS/zHpDSLUofFBiTcZanBshJ5UyZ3+GFFWAvMAhSCfQfPYUywXjJcJfI=; 7:lNME9BOHXcGWT20nYBz+XltrTc0y7Tp4y4wgivfKYgxHVGtqmRMQ+//g+7gjXIzUSQTep5eVMjZsuCSs+tAtuvXgu8n4IlpAdJPQmt4vpsLgDibulHzJxRfLYZB/DFuVLydPDh5u0lch5cSOY8VEzhpITmEWrUmJOaslTQD8zU8rHaFz67hbe6NoJ+7V9czs7KB3d6/WIZGzXduKkwan7Ud0OXrqWn1qATxh7OJAunKTHpr97c8xugrcSU59y4cj x-ms-exchange-antispam-srfa-diagnostics: SOS;SOR; x-ms-office365-filtering-correlation-id: b4d8383b-8d79-4bb7-c324-08d627d90ab7 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:AM6PR08MB3047; x-ms-traffictypediagnostic: AM6PR08MB3047: nodisclaimer: True x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(180628864354917); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(3002001)(3231355)(944501410)(52105095)(10201501046)(6055026)(149066)(150057)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123564045)(20161123562045)(20161123560045)(201708071742011)(7699051); SRVR:AM6PR08MB3047; BCL:0; PCL:0; RULEID:; SRVR:AM6PR08MB3047; x-forefront-prvs: 0812095267 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(39860400002)(136003)(346002)(366004)(376002)(199004)(189003)(6506007)(5660300001)(97736004)(7736002)(7696005)(256004)(105586002)(102836004)(76176011)(106356001)(6436002)(316002)(26005)(66066001)(86362001)(55016002)(25786009)(8676002)(53936002)(99286004)(81166006)(9686003)(33656002)(5250100002)(6246003)(71200400001)(14454004)(71190400001)(3846002)(11346002)(486006)(478600001)(68736007)(476003)(8936002)(81156014)(2906002)(229853002)(4326008)(6116002)(74316002)(305945005)(110136005)(54906003)(72206003)(2900100001)(446003); DIR:OUT; SFP:1101; SCL:1; SRVR:AM6PR08MB3047; H:AM6PR08MB3672.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: 5tcJIcqp2xNkbttQq5kDQAxkLl+bYb5AFtnTdvijmbZmKe7ZBNSmmpB5cHkC6Q1YoZ+KdXJ783g+h/5YbB4IM7PACQ/vO4mBJY9IVDjMgWij8eAkpIcDYDt6I72WOLZSaG9HwKtgJMvmyFE2VC5vA4RwXhuo6QozJM7ITd1N/tor/Lie/mLEieSCG9qvDVw4UI7FvfIAydX4TDsgIrtQ+uNZ+dE7AlUUeZGybtDfnS+20hQRRX3QT2IuDxoqkOVf7hGBmYfcEG61THycpAuIOMgTQ8KiKvB20Vmkxwxst6kU+oDW+UKkKHiUjjQVXTzGHx5L9cX8n+MzPisesKw3snh8J5sPRyIrRKDTTD8o5R4= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-Network-Message-Id: b4d8383b-8d79-4bb7-c324-08d627d90ab7 X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Oct 2018 20:04:05.9611 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB3047 Subject: Re: [dpdk-dev] [PATCH v2] test/hash: solve unit test hash compilation error X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Oct 2018 20:04:07 -0000 >=20 > Enable print_key_info() function compilation always. >=20 > Fixes: af75078fece36 ("first public release") > Cc: stable@dpdk.org >=20 > Suggested-by: Honnappa Nagarahalli > Signed-off-by: Dharmik Thakkar > Reviewed-by: Honnappa Nagarahalli > Reviewed-by: Gavin Hu > --- > v2: > * Fix checkpatch coding style issue > * Add "Fixes:" tag > --- > test/test/test_hash.c | 24 +++++++++--------------- > 1 file changed, 9 insertions(+), 15 deletions(-) >=20 > diff --git a/test/test/test_hash.c b/test/test/test_hash.c index > b3db9fd10547..db6442a2b101 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; > } >=20 > +#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 =3D (uint8_t *)key; > - unsigned i; > - > - printf("%s key:0x", msg); > - for (i =3D 0; i < sizeof(struct flow_key); i++) { > - printf("%02X", p[i]); > + if (UNIT_TEST_HASH_VERBOSE) { > + const uint8_t *p =3D (const uint8_t *)key; > + unsigned int i; > + > + printf("%s key:0x", msg); > + for (i =3D 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 >=20 > /* Keys used by unit test functions */ > static struct flow_key keys[5] =3D { { > -- > 2.7.4 Acked-by: Honnappa Nagarahalli