From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id E0530A04C5; Fri, 4 Sep 2020 08:27:57 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4F9D91C0BC; Fri, 4 Sep 2020 08:27:57 +0200 (CEST) Received: from FRA01-PR2-obe.outbound.protection.outlook.com (mail-eopbgr120052.outbound.protection.outlook.com [40.107.12.52]) by dpdk.org (Postfix) with ESMTP id 944331BC25; Fri, 4 Sep 2020 08:27:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=DaSDgaj1kpIl9iBOBPAGuzZM6Na7rxbFfHxl+/4Yql4=; b=XWY5X1s/vN+szeP9+nn/xvlb+HwWVxc7xrJQNjZj1yoGVMx2EhGW3vOe3XnOyDHEJS6YeXl8FaStNulMUTcQtFPU/pEDJoWFFsvrzFv0JlmPtbb+xc00S9xNMbvxwpt3w04S8CyHNiq1st7x5Lc1bvnLvmOunZ/n1UpAiwdGA6s= Received: from AM6P192CA0068.EURP192.PROD.OUTLOOK.COM (2603:10a6:209:82::45) by PR2PR08MB4843.eurprd08.prod.outlook.com (2603:10a6:101:24::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3326.23; Fri, 4 Sep 2020 06:27:54 +0000 Received: from VE1EUR03FT017.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:82:cafe::9c) by AM6P192CA0068.outlook.office365.com (2603:10a6:209:82::45) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3348.15 via Frontend Transport; Fri, 4 Sep 2020 06:27:54 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dpdk.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dpdk.org; dmarc=bestguesspass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VE1EUR03FT017.mail.protection.outlook.com (10.152.18.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3348.16 via Frontend Transport; Fri, 4 Sep 2020 06:27:54 +0000 Received: ("Tessian outbound a0bffebca527:v64"); Fri, 04 Sep 2020 06:27:53 +0000 X-CR-MTA-TID: 64aa7808 Received: from 337620c05b54.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 935C6C38-ABF3-44F0-AFC9-76CE5E68B48D.1; Fri, 04 Sep 2020 06:27:48 +0000 Received: from EUR04-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 337620c05b54.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 04 Sep 2020 06:27:48 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HfvjowLEi2OKalQrnMvqFflKm2Jg3dIcbPbF45vipabylz2XuOanBiLAnxzZnJV+4sAa7m7BRxhjWbV4hFZPu22JDbc3X1cKxbhD+aNaaiBCOJ3d+MNV+gVLmF2Vmc7e3CzfnKmWFfPxNzWP61L/PWGrhXbI9uBkewSKI3ZdV+cpOmLkkRRfM/Ft3CGj8SNdGuBKu4FWLFlXSO9atRctl6bAlgCLu7eBn8/+BvZHKgJRHYsbcct49riToSeoC1mS2JRUvbyQww/D0dFE/AXSgbKQKfPX7/4rMxNGVsvA6aKxcoaOsJCnrZjea7gSbTm093DD6BJQeSD0lFgeUfxCHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=DaSDgaj1kpIl9iBOBPAGuzZM6Na7rxbFfHxl+/4Yql4=; b=i+gntzdJp+LxXI1+oYl//ZYWPNF+atqbxubHhb/Nt5Z6Umv9c9w10NHlXv/qsy/ptVDDcw1JmaXg/4Jelzuu7g5p7a6A96nSHpqCdBCxtLgD7lLdmSC7Fa2QvHZvoeZOc+Rp8jd8KPW1Qc5sG2Fkna4fbCIeNFSgMM00NdDfwYWUYnKB4TBVIqTsKD5FcgcDmxbUKw3j6miuktcfn4S1IS53WOeHd4XClz2w9d1PelQ3WX3vxQ+c5hsNXT4fpf7xej5EBbO5zmUap6y6qR206Q/6s/wdkr5LTsUgjzx3Q7eLSPcrHMcj8GizjfVSXJDTZjzEqp2oaGNZc8dCRgcMKQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=DaSDgaj1kpIl9iBOBPAGuzZM6Na7rxbFfHxl+/4Yql4=; b=XWY5X1s/vN+szeP9+nn/xvlb+HwWVxc7xrJQNjZj1yoGVMx2EhGW3vOe3XnOyDHEJS6YeXl8FaStNulMUTcQtFPU/pEDJoWFFsvrzFv0JlmPtbb+xc00S9xNMbvxwpt3w04S8CyHNiq1st7x5Lc1bvnLvmOunZ/n1UpAiwdGA6s= Received: from DBAPR08MB5814.eurprd08.prod.outlook.com (2603:10a6:10:1b1::6) by DB6PR0802MB2152.eurprd08.prod.outlook.com (2603:10a6:4:83::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3348.15; Fri, 4 Sep 2020 06:27:46 +0000 Received: from DBAPR08MB5814.eurprd08.prod.outlook.com ([fe80::408a:40fb:7402:c805]) by DBAPR08MB5814.eurprd08.prod.outlook.com ([fe80::408a:40fb:7402:c805%6]) with mapi id 15.20.3348.016; Fri, 4 Sep 2020 06:27:46 +0000 From: Honnappa Nagarahalli To: Dmitry Kozlyuk , "dev@dpdk.org" CC: "stable@dpdk.org" , nd , Honnappa Nagarahalli , nd Thread-Topic: [PATCH] rcu: avoid literal suffix warning in C++ mode Thread-Index: AQHWf98yhs+Ign4T0UuT79Qx+5pD3alYBYtA Date: Fri, 4 Sep 2020 06:27:46 +0000 Message-ID: References: <20200831213811.21521-1-dmitry.kozliuk@gmail.com> In-Reply-To: <20200831213811.21521-1-dmitry.kozliuk@gmail.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: 5C735B4230F8AA4291FF9F65A183B36E.0 x-checkrecipientchecked: true Authentication-Results-Original: gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=none action=none header.from=arm.com; x-originating-ip: [217.140.110.7] x-ms-publictraffictype: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: b674c2f2-f265-4a9d-ef88-08d8509ba807 x-ms-traffictypediagnostic: DB6PR0802MB2152:|PR2PR08MB4843: x-ms-exchange-transport-forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true nodisclaimer: true x-ms-oob-tlc-oobclassifiers: OLM:3276;OLM:3276; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: bf+z/E7/jAVieM0snVRls2227zyhbV8RC7ZcYrIjI+keaIQWffYA9RsKguQhAyEm731f7DFbyIZaK/2kuOxgWy4lrBYr+w6w/necngCF8omEyLE6BbuUxlH9FFpuYrBJK77CUwyDId2fTt4LMC8q/6JA5SZ/iRNt3xt+3OF+zDYhuDaehk4EXlCMcNLthw7TKZpvzCxZGuKrmuDkDF+aZScvSf6v7l5yh6ilPVhOM3q74OLN1guqyNV7tLX7LxaEyBgM66MHcmB4ZXO7W17u6vpni9DfGBzaS8EyoNcUtlYjMA+BHyJX+8EXxd3BxmprxuyBM9lFIlq1oOJkwGnuBw== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DBAPR08MB5814.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(366004)(396003)(346002)(39860400002)(376002)(71200400001)(33656002)(83380400001)(9686003)(7696005)(4326008)(186003)(53546011)(6506007)(316002)(5660300002)(86362001)(26005)(478600001)(76116006)(66476007)(54906003)(8936002)(110136005)(55016002)(66446008)(64756008)(66556008)(52536014)(2906002)(8676002)(66946007); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: xlMpy8Ofg5HKnTPUEEVXFDzBH/uUwq4I0B3D9OhETPUK/I2Z9vUetWNHATOcXjsJx3ZF0s2gts46aBuTFsQYSUCFkm1N0Zx1D9VFxYyCDriAbkEZsn1aNREiNkoZCuSDaaP+tFNzCyBppKCo5AtXrWwJVDoz4U6IZpEFAjRxmmLc7Ek5LD/El3StJL4tbtKLnmGIR0n1gCrrF7wAk4ULitlyajaE2Zoyh+Mpwh788Z3AJti/zPeEy+3zvcPlA5tzBb0jeWO03WYJDPLXNQHbgr1fa76Iemv45dNKI/Aph653MQjm/mv5MGFrxMw5atvAdn/sQ+aQEGC04Q3ibkARIKWS7wFhxGCEP5FqInD3FjM6SeY0g75WmDxIn+bB5LjsRUzbpzYEoLm111ShCU+c6vLqOYP0ZHDkbjr+5X8LJ0BVHTqR+pNTREA2HC+muKAH6y8JFPZVy6vOA0mV6UDh2nLnZp4iMiCZ6/03DXObREggedIOP633WEiDhY0cgVDQ08pWL4UU/esTuV4+3LJBxiWk5X4D2tsKqIGkzVFwRHwehwN6j+FxEy/5xJs1yBMo2+zV7Q2mYXStGaKN/e/17lHJv3IKfs0wBEzUfHocOeEeNdqQhvz7w3PqITMBnc1GVVb05XXXjhKAgmVjpouC+g== Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0802MB2152 Original-Authentication-Results: gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT017.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 00c123e1-f0b6-41f3-950c-08d8509ba359 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 7uOxTqO9gc5KyhD/oUmp7nBs0AcrqY/WWbsxPr1ObzDMes51l+EfYztj6CBvOiMWzrniat26nQb3A/CVWmRREHFplEW8yAqlVK5y2qcxVFID6s0eQ6GKx3Cip/hhdVB3lBZtViCOyRqSqjUxW/JfTY7pGp2J/2LnS/MU2KXV1YcFNlaDfsnj1HXNsHdklsaWofhwoRNLzx5bJ72/xXOgNPQAIsgB6JccLri5a5mgw8sjKM9KhodEb+FqIUIAQnlmStNVQ1+Ahn4Q/Wp8G8QDCoORNFndHSe1Hc+CKon2rtROgLRYLT0pGbdARaxYJC3t1cE7eaJ0wJ4KM/fn2QBaEyya8g6aCki+Q42CZ0KhTSN+QnDLy79HDpLvj/iOMcNzwzI+sCDNdwLIWpYbSqsnZA== X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(4636009)(136003)(39860400002)(396003)(346002)(376002)(46966005)(2906002)(86362001)(55016002)(110136005)(82310400003)(82740400003)(478600001)(5660300002)(47076004)(9686003)(26005)(54906003)(336012)(4326008)(83380400001)(356005)(52536014)(81166007)(8676002)(450100002)(33656002)(186003)(8936002)(6506007)(70586007)(7696005)(316002)(53546011)(70206006); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Sep 2020 06:27:54.0711 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b674c2f2-f265-4a9d-ef88-08d8509ba807 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: VE1EUR03FT017.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR2PR08MB4843 Subject: Re: [dpdk-dev] [PATCH] rcu: avoid literal suffix warning in C++ mode 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi Dmitry, Thanks for the patch, few nits inline. > -----Original Message----- > From: Dmitry Kozlyuk > Sent: Monday, August 31, 2020 4:38 PM > To: dev@dpdk.org > Cc: Dmitry Kozlyuk ; stable@dpdk.org; > Honnappa Nagarahalli > Subject: [PATCH] rcu: avoid literal suffix warning in C++ mode ^^^ should be lib/rcu >=20 > Sequences like "value =3D %"PRIu64 (no space before PRIu64) are parsed as= a > single preprocessor token, user-defined-string-literal, in C++11 onwards. > While modern compilers are smart enough to parse this properly, GCC 9.3.0 > generates warnings like: >=20 > rte_rcu_qsbr.h:555:26: warning: invalid suffix on literal; C++11 > requires a space between literal and string macro [-Wliteral-suffix] >=20 > Add spaces around format specifier macros to make public headers > compatible with C++ without causing warnings. >=20 > Fixes: 64994b56c ("rcu: add RCU library supporting QSBR mechanism") > Cc: stable@dpdk.org >=20 > Signed-off-by: Dmitry Kozlyuk > --- > lib/librte_rcu/rte_rcu_qsbr.h | 14 +++++++------- To be consistent, can you please do similar changes in rte_rcu_qsbr.c file? > 1 file changed, 7 insertions(+), 7 deletions(-) >=20 > diff --git a/lib/librte_rcu/rte_rcu_qsbr.h b/lib/librte_rcu/rte_rcu_qsbr.= h > index a98e8f0f8..aa237cf75 100644 > --- a/lib/librte_rcu/rte_rcu_qsbr.h > +++ b/lib/librte_rcu/rte_rcu_qsbr.h > @@ -552,7 +552,7 @@ rte_rcu_qsbr_quiescent(struct rte_rcu_qsbr *v, > unsigned int thread_id) > __atomic_store_n(&v->qsbr_cnt[thread_id].cnt, > t, __ATOMIC_RELEASE); >=20 > - __RTE_RCU_DP_LOG(DEBUG, "%s: update: token =3D %"PRIu64", > Thread ID =3D %d", > + __RTE_RCU_DP_LOG(DEBUG, "%s: update: token =3D %" PRIu64 ", > Thread ID =3D > +%d", > __func__, t, thread_id); > } >=20 > @@ -580,13 +580,13 @@ __rte_rcu_qsbr_check_selective(struct > rte_rcu_qsbr *v, uint64_t t, bool wait) > while (bmap) { > j =3D __builtin_ctzl(bmap); > __RTE_RCU_DP_LOG(DEBUG, > - "%s: check: token =3D %"PRIu64", wait =3D %d, Bit > Map =3D 0x%"PRIx64", Thread ID =3D %d", > + "%s: check: token =3D %" PRIu64 ", wait =3D %d, > Bit Map =3D 0x%" PRIx64 > +", Thread ID =3D %d", > __func__, t, wait, bmap, id + j); > c =3D __atomic_load_n( > &v->qsbr_cnt[id + j].cnt, > __ATOMIC_ACQUIRE); > __RTE_RCU_DP_LOG(DEBUG, > - "%s: status: token =3D %"PRIu64", wait =3D %d, > Thread QS cnt =3D %"PRIu64", Thread ID =3D %d", > + "%s: status: token =3D %" PRIu64 ", wait =3D %d, > Thread QS cnt =3D %" > +PRIu64 ", Thread ID =3D %d", > __func__, t, wait, c, id+j); >=20 > /* Counter is not checked for wrap-around condition > @@ -643,12 +643,12 @@ __rte_rcu_qsbr_check_all(struct rte_rcu_qsbr *v, > uint64_t t, bool wait) >=20 > for (i =3D 0, cnt =3D v->qsbr_cnt; i < v->max_threads; i++, cnt++) { > __RTE_RCU_DP_LOG(DEBUG, > - "%s: check: token =3D %"PRIu64", wait =3D %d, Thread ID > =3D %d", > + "%s: check: token =3D %" PRIu64 ", wait =3D %d, Thread > ID =3D %d", > __func__, t, wait, i); > while (1) { > c =3D __atomic_load_n(&cnt->cnt, > __ATOMIC_ACQUIRE); > __RTE_RCU_DP_LOG(DEBUG, > - "%s: status: token =3D %"PRIu64", wait =3D %d, > Thread QS cnt =3D %"PRIu64", Thread ID =3D %d", > + "%s: status: token =3D %" PRIu64 ", wait =3D %d, > Thread QS cnt =3D %" > +PRIu64 ", Thread ID =3D %d", > __func__, t, wait, c, i); >=20 > /* Counter is not checked for wrap-around condition > @@ -725,10 +725,10 @@ rte_rcu_qsbr_check(struct rte_rcu_qsbr *v, > uint64_t t, bool wait) > /* Check if all the readers have already acknowledged this token */ > if (likely(t <=3D v->acked_token)) { > __RTE_RCU_DP_LOG(DEBUG, > - "%s: check: token =3D %"PRIu64", wait =3D %d", > + "%s: check: token =3D %" PRIu64 ", wait =3D %d", > __func__, t, wait); > __RTE_RCU_DP_LOG(DEBUG, > - "%s: status: least acked token =3D %"PRIu64"", > + "%s: status: least acked token =3D %" PRIu64, > __func__, v->acked_token); > return 1; > } > -- > 2.25.4