From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8745DA00C4; Mon, 14 Feb 2022 10:31:09 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7335A41144; Mon, 14 Feb 2022 10:31:09 +0100 (CET) Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2055.outbound.protection.outlook.com [40.107.22.55]) by mails.dpdk.org (Postfix) with ESMTP id D996740DDA; Mon, 14 Feb 2022 10:31:07 +0100 (CET) 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=jl52Qr3r0G56mCovcbNT/4rHBM4M8OkKHvnFuDdQ5x8=; b=EhaVSWeKeBKkBaAR0BY+uOOvBC94IVnP2Rh6OO15QXu4hF9YK49j0dQLVLqIh8XUzT9TSIoXdFZeVs0C5szUR9Syj6aknwXoPf0UG2YKWTYCsAR8A1dnIuW3sIue8dPT481h/j9SEWM8N1IruTi9gAQh4ROUgU0kMdxSatCvNjo= Received: from AM5PR0601CA0062.eurprd06.prod.outlook.com (2603:10a6:206::27) by PR2PR08MB4762.eurprd08.prod.outlook.com (2603:10a6:101:1e::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.17; Mon, 14 Feb 2022 09:31:01 +0000 Received: from AM5EUR03FT018.eop-EUR03.prod.protection.outlook.com (2603:10a6:206:0:cafe::21) by AM5PR0601CA0062.outlook.office365.com (2603:10a6:206::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.12 via Frontend Transport; Mon, 14 Feb 2022 09:31:01 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass 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 AM5EUR03FT018.mail.protection.outlook.com (10.152.16.114) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.11 via Frontend Transport; Mon, 14 Feb 2022 09:31:01 +0000 Received: ("Tessian outbound 18e50a6f0513:v113"); Mon, 14 Feb 2022 09:31:00 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 09e3e91d224f1144 X-CR-MTA-TID: 64aa7808 Received: from 653840eae343.3 by 64aa7808-outbound-1.mta.getcheckrecipient.com id B1EA4806-648B-45F4-A4E5-731F97E9C3A8.1; Mon, 14 Feb 2022 09:30:55 +0000 Received: from EUR05-AM6-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 653840eae343.3 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Mon, 14 Feb 2022 09:30:55 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=T6Wd0HQ5SMYASVi5nM9Kly9HcRLjxxWKll1hYZbQSUsTX06XJHHI0Kpjs8TUpnrJEh2OI/EYK0RmuEnG8J9+kLKFsuABHNl3QMGZ0LVkrjaLLReNCtZkAh+IH8nXSjDm9k1A0kHPuq5+Gl2xrs9iwTv9dKer/mtIaCOuOuFBrcrPzGnhdaRnerd7p4z99KfExZrO0I+aKBWf+JWF9P5yDHSfEXBBJBPZ+ojV6OVfkV7KDn7txYo6u/OD8Y+mrm62VqNxgd6nSGHsGVDMwc8M8QHti/M6ZLlekyPYMyFpK2jYF2S5RsaBG6H4JKBESpQyNvH0eIsIAR46JSxGFAcr4w== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=jl52Qr3r0G56mCovcbNT/4rHBM4M8OkKHvnFuDdQ5x8=; b=YRzv1gqBlxJ0dAEhKnGMNqBs8N3CDCdQlWk2PHuxGds1UfuXgtbF9jv57Q5blBC9dEdDOOSUdjas3gPjWOxdXq+ckPC2f8ZKeyZ4bVlId0qdh/gmMOUUBa9gWovuYMlxFciIcs/ayMnpIjmfqi5RCNlrbOP6UTJoWmDAaGLkH2Dr5Fyodb6ukoTnn5MkIyKNNNYoCUMxTKDJO0ZPPmf7uv/zHXb5Xlv0IRCqNyjB/4/fbfIiCmAUe6AjlQYj/QgUvI0WOSxZvartNuIz9Mq0XUdJLwsmZosX4fVQzofmUHgSWRQllIob8h2AztV2+SapotXdk85CqESNbVtotXnPWg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; 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=jl52Qr3r0G56mCovcbNT/4rHBM4M8OkKHvnFuDdQ5x8=; b=EhaVSWeKeBKkBaAR0BY+uOOvBC94IVnP2Rh6OO15QXu4hF9YK49j0dQLVLqIh8XUzT9TSIoXdFZeVs0C5szUR9Syj6aknwXoPf0UG2YKWTYCsAR8A1dnIuW3sIue8dPT481h/j9SEWM8N1IruTi9gAQh4ROUgU0kMdxSatCvNjo= Received: from DU2PR08MB7287.eurprd08.prod.outlook.com (2603:10a6:10:2d6::20) by AM8PR08MB5572.eurprd08.prod.outlook.com (2603:10a6:20b:1db::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.11; Mon, 14 Feb 2022 09:30:52 +0000 Received: from DU2PR08MB7287.eurprd08.prod.outlook.com ([fe80::105f:72d7:e23d:2b9a]) by DU2PR08MB7287.eurprd08.prod.outlook.com ([fe80::105f:72d7:e23d:2b9a%5]) with mapi id 15.20.4975.018; Mon, 14 Feb 2022 09:30:52 +0000 From: Joyce Kong To: Bruce Richardson , "dev@dpdk.org" CC: "jerinj@marvell.com" , "stable@dpdk.org" , Gavin Hu , Konstantin Ananyev , Honnappa Nagarahalli , Ola Liljedahl , Sunil Kumar Kori , David Marchand Subject: RE: [PATCH v4 1/7] eal: fix header build with C++ Thread-Topic: [PATCH v4 1/7] eal: fix header build with C++ Thread-Index: AQHYHpTkpTnRJ7/OpkWiekl6mhsApqySykng Date: Mon, 14 Feb 2022 09:30:52 +0000 Message-ID: References: <20220204174209.440207-1-bruce.richardson@intel.com> <20220210154239.587185-1-bruce.richardson@intel.com> <20220210154239.587185-2-bruce.richardson@intel.com> In-Reply-To: <20220210154239.587185-2-bruce.richardson@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-MS-Office365-Filtering-Correlation-Id: 47a1969d-ba54-4a04-bcd5-08d9ef9cb6e6 x-ms-traffictypediagnostic: AM8PR08MB5572:EE_|AM5EUR03FT018:EE_|PR2PR08MB4762:EE_ x-ld-processed: f34e5979-57d9-4aaa-ad4d-b122a662184d,ExtAddr X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true nodisclaimer: true x-ms-oob-tlc-oobclassifiers: OLM:813;OLM:6108; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: X4DVS8EPL0EEqXvnnD0zDMVMQ+U110Nz+p50ZitbqjJ7YiSK+hW96eICzaNveGh292LC8gRU+9o15XX2Ddn5fXKBUfRzLB8T893k+NaIfk+5NdNXzJkQu5d6Ac/qxv+2OL/xkFkK55g3aAxjUAR8gKJYmGYP+ranNOngKl1hP+9i2qRV1yB4yw7Gg67ht7et6pMATrM1yG2oetQ/AHiC0TgN1rweVDUrEk5HlpCDco70pyBPvQs4QYCDnH4N2ZupV3UoDWrVn+hn/s6ho9BbeffzRTNNtoe1zpOD41ZeW5KwzY1DY6T47BZTMlCVsOxVMFmZ9P3WA+ajEFEh02vbR1Sn8Nsr2EcXtxFex8qb5G5LPQUZWU+BqL6arLSEahdllN7BaTfG9NXVuXPmPjSy+tjFeyi2c3MSfIVVTdXAQ4OLFLhnUkQoppsIQH0LbdhCJqEgZBm++NRZIkb/SnF6pU2xg0R0IcTr4yN98NzBmy5mvCcOkuW36VdZ61/h3lWD/vgN/z4oGa6NNGE64IQij6Fiwucx5y7Eoyx5Cjjh4sDvF1UVGfzsEDaA73X/yuwbw3XHi+IDWXoca6uxHwCxTOtb8ROqpHKvjnJCNCXFKqv+LVvqiN2KXQVInOncnEyA80GdP1zDte/cBuELkeXajHW59yEcxmF2Nnmx4phonQcDNzeet66DfoArnulbikjOh+HILeMDBJQXVEJLG1nmIw== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DU2PR08MB7287.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(76116006)(66946007)(4326008)(8676002)(52536014)(64756008)(7696005)(6506007)(66446008)(66476007)(66556008)(8936002)(38100700002)(71200400001)(316002)(5660300002)(54906003)(110136005)(508600001)(86362001)(2906002)(9686003)(186003)(26005)(83380400001)(38070700005)(33656002)(122000001)(55016003); DIR:OUT; SFP:1101; Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR08MB5572 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT018.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: f57bfe56-ecf2-48f6-4caa-08d9ef9cb1e0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: X+EKspqK6x/PGNqpQdwVYoqao7Uwl32CjfgTQDHOnzlWOodztzAkYhlqPFKNKkE87vJ4UBjBb8FD6gNOAmiFwlcHQbtg30tR2v6tfb/+WDeOuFX+3RW/60Al42ViQsKvbQ14OFoYFyoXCm1yPcYhJTLrUr2olR6U+vgiSlwY+Tt+lHYkLAUB+ZdTVxJ905xwZrQJLR3LETkUDxEGpBPn2VdOtPOOwbHzYRLizHpsAuBiIUQStr3PGduya/rEDzHY7vznzgc80kERuZMj9vsZr/hOm6iowOMQQgFQZCY3OWH0J8h+EPtMdHYQi7EVDNheFSlqGbjvf8QtbE6CNKLMm/gx7Gnp4FW2vReG1er2Nm0hHTCQ5gyHiYnqYGrlIpkE0hKMoGAlcaVohn2jzr1V/uN5Rbd0Hmvm9BBGj0Mr/fwiVtI9kJqrbFSdcjENMKtLyHpiAA9ntmKlwB1UtD4iffPGA0BdGRQl6tMFJTIfk9WtqINy/MQ2k/R2TN/z+hq+x3EMRLwVguIo1aRhszz5cGXDYtFim7KbISvBbVZ0n5yAYmNPwPRSH270vtXaJocYCvlZkbKK8xYOjxabCMgw7C24a4IoeozGzD2gONkQvu+96mQrtuYbE0isWwI0p4pocBsKP8mLjJOhjewucCJDyOUcFeHwqN9b9ZPAp3QLGmKTZ7zoWRjhmXPOFLm3Xq9S 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:(13230001)(4636009)(46966006)(36840700001)(40470700004)(36860700001)(81166007)(7696005)(70586007)(70206006)(40460700003)(83380400001)(5660300002)(9686003)(6506007)(2906002)(52536014)(356005)(26005)(33656002)(186003)(82310400004)(4326008)(107886003)(86362001)(316002)(110136005)(54906003)(8936002)(55016003)(450100002)(47076005)(8676002)(508600001)(336012); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Feb 2022 09:31:01.1366 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 47a1969d-ba54-4a04-bcd5-08d9ef9cb6e6 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: AM5EUR03FT018.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR2PR08MB4762 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org > Subject: [PATCH v4 1/7] eal: fix header build with C++ > > C++ files could not include some headers because: > > * "new" is a keyword in C++, so can't be a variable name > * there is no automatic casting to/from void * > > Fixes: 184104fc6121 ("ticketlock: introduce fair ticket based locking") > Fixes: 032a7e5499a0 ("trace: implement provider payload") > Cc: joyce.kong@arm.com > Cc: jerinj@marvell.com > Cc: stable@dpdk.org > > Signed-off-by: Bruce Richardson Acked-by: Joyce Kong > --- > lib/eal/include/generic/rte_ticketlock.h | 14 +++++++------- > lib/eal/include/rte_trace_point.h | 2 +- > 2 files changed, 8 insertions(+), 8 deletions(-) > > diff --git a/lib/eal/include/generic/rte_ticketlock.h > b/lib/eal/include/generic/rte_ticketlock.h > index c1b8808f51..693c67b517 100644 > --- a/lib/eal/include/generic/rte_ticketlock.h > +++ b/lib/eal/include/generic/rte_ticketlock.h > @@ -91,13 +91,13 @@ rte_ticketlock_unlock(rte_ticketlock_t *tl) static > inline int rte_ticketlock_trylock(rte_ticketlock_t *tl) { > - rte_ticketlock_t old, new; > - old.tickets =3D __atomic_load_n(&tl->tickets, __ATOMIC_RELAXED); > - new.tickets =3D old.tickets; > - new.s.next++; > - if (old.s.next =3D=3D old.s.current) { > - if (__atomic_compare_exchange_n(&tl->tickets, &old.tickets, > - new.tickets, 0, __ATOMIC_ACQUIRE, __ATOMIC_RELAXED)) > + rte_ticketlock_t oldl, newl; > + oldl.tickets =3D __atomic_load_n(&tl->tickets, __ATOMIC_RELAXED); > + newl.tickets =3D oldl.tickets; > + newl.s.next++; > + if (oldl.s.next =3D=3D oldl.s.current) { > + if (__atomic_compare_exchange_n(&tl->tickets, &oldl.tickets= , > + newl.tickets, 0, __ATOMIC_ACQUIRE, __ATOMIC_RELAXED)) > return 1; > } > > diff --git a/lib/eal/include/rte_trace_point.h > b/lib/eal/include/rte_trace_point.h > index e226f073f7..0f8700974f 100644 > --- a/lib/eal/include/rte_trace_point.h > +++ b/lib/eal/include/rte_trace_point.h > @@ -370,7 +370,7 @@ do { \ > do { \ > if (unlikely(in =3D=3D NULL)) \ > return; \ > - rte_strscpy(mem, in, __RTE_TRACE_EMIT_STRING_LEN_MAX); \ > + rte_strscpy((char *)mem, in, __RTE_TRACE_EMIT_STRING_LEN_MAX); > \ > mem =3D RTE_PTR_ADD(mem, __RTE_TRACE_EMIT_STRING_LEN_MAX); > \ } while (0) > > -- > 2.32.0 IMPORTANT NOTICE: The contents of this email and any attachments are confid= ential and may also be privileged. If you are not the intended recipient, p= lease 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.