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 183D2A00BE; Wed, 8 Jul 2020 07:11:40 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id EE07F1DBA1; Wed, 8 Jul 2020 07:11:38 +0200 (CEST) Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60072.outbound.protection.outlook.com [40.107.6.72]) by dpdk.org (Postfix) with ESMTP id D75031DB4F for ; Wed, 8 Jul 2020 07:11:37 +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=+8bpPoMZzDiYGuFExPQqbEK/bR5y2URirmM+3atzgrI=; b=0x9Wip5a3kRlRza164JIzIrEpWYZ0XKKKztExyZ/tN6mmOeR0zAIk5LUCA5Fjg3fTymbsLdjnH7jqP185+a69geLohknXxSR7ShDUZHZb+4Edaorcie8trmqyIy92IDPjYPWkAwGpNBoKYrgKzTfee9xDGG0ZGWAh/YN/WxFZhk= Received: from DBBPR09CA0018.eurprd09.prod.outlook.com (2603:10a6:10:c0::30) by DBBPR08MB4299.eurprd08.prod.outlook.com (2603:10a6:10:ce::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.27; Wed, 8 Jul 2020 05:11:37 +0000 Received: from DB5EUR03FT032.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:c0:cafe::fe) by DBBPR09CA0018.outlook.office365.com (2603:10a6:10:c0::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.21 via Frontend Transport; Wed, 8 Jul 2020 05:11:37 +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 DB5EUR03FT032.mail.protection.outlook.com (10.152.20.162) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.24 via Frontend Transport; Wed, 8 Jul 2020 05:11:37 +0000 Received: ("Tessian outbound 4e683f4039d5:v62"); Wed, 08 Jul 2020 05:11:36 +0000 X-CR-MTA-TID: 64aa7808 Received: from 6292a40f3a74.3 by 64aa7808-outbound-1.mta.getcheckrecipient.com id EC6E65B8-454F-4686-B145-5FD563BCD572.1; Wed, 08 Jul 2020 05:11:31 +0000 Received: from EUR04-DB3-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 6292a40f3a74.3 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 08 Jul 2020 05:11:31 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AJmxLXnFcpmU/8t8VIKbDdA2YTGg7rGE2rhbptlsua2wpCOCKMSYQwlUuXcBf21CwaD/a/OqZTQtmBKMcme/WvFUylFkSTFrHvVHvk7nv6S01r7CawSx7T1rbbBm9XDvlcLc7bPWgeloXEEscNIb/c2EHL6LBWW4am+UfmmjZxyuOPUvoYxU3vcMC9U06R8HF5+ahuHA6EsR4Ku0vEYT8xezilE1qw+XQot+wlKJ0PHTEbCFCiiMpWmpu2rbyIVfFV9sABqgSumrQAjpbKWLKeMCWt/1LtKZv9cT7F9DiFni9lOrE1BcIcETyPquKRUyQneiBixPfMGTjBlpnkiz7A== 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=+8bpPoMZzDiYGuFExPQqbEK/bR5y2URirmM+3atzgrI=; b=mOng9TQJLdzKRn7sMut2hFZHBEauQIKLR3QIiXvOi70Vp7IktCKC2R9lEQyx1Jf9rPVzviTtuB33ueg5VZUsHqkSEHgJ4bTaRR12dgrECqA+MNsITY7UyQMqKn7YbL/YzvBm8PTht5LUCJLzF4xj8LUvpHFB/QgdpwWCcNNFRiLmMRIoG5LziFNaI8jhD+/Qe0QxFYU7AiBa5c9nzfbem/SM2+996X4jw+oAYparyNrUFSWStA3vedylYRo0xjvQlQVI6BJ+nJgyRKceK+4lEyg7+6W9sfIwvjAm38BxNiGEWsDd/uBvJWzqXxcJx/2uVvN+X1b22UYvQ2z3/yhriw== 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=+8bpPoMZzDiYGuFExPQqbEK/bR5y2URirmM+3atzgrI=; b=0x9Wip5a3kRlRza164JIzIrEpWYZ0XKKKztExyZ/tN6mmOeR0zAIk5LUCA5Fjg3fTymbsLdjnH7jqP185+a69geLohknXxSR7ShDUZHZb+4Edaorcie8trmqyIy92IDPjYPWkAwGpNBoKYrgKzTfee9xDGG0ZGWAh/YN/WxFZhk= Received: from VE1PR08MB4640.eurprd08.prod.outlook.com (2603:10a6:802:b2::11) by VE1PR08MB4735.eurprd08.prod.outlook.com (2603:10a6:802:a2::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.24; Wed, 8 Jul 2020 05:11:30 +0000 Received: from VE1PR08MB4640.eurprd08.prod.outlook.com ([fe80::c2e:9ccb:a690:6863]) by VE1PR08MB4640.eurprd08.prod.outlook.com ([fe80::c2e:9ccb:a690:6863%6]) with mapi id 15.20.3153.029; Wed, 8 Jul 2020 05:11:30 +0000 From: Phil Yang To: Phil Yang , "david.marchand@redhat.com" , "dev@dpdk.org" CC: "drc@linux.vnet.ibm.com" , Honnappa Nagarahalli , "olivier.matz@6wind.com" , Ruifeng Wang , nd Thread-Topic: [dpdk-dev] [PATCH v2] mbuf: use C11 atomics for refcnt operations Thread-Index: AQHWVEbwX0ZZhWoutEejPVv4HOUHjKj9H3PQ Date: Wed, 8 Jul 2020 05:11:30 +0000 Message-ID: References: <1591871178-12542-1-git-send-email-phil.yang@arm.com> <1594116633-14554-1-git-send-email-phil.yang@arm.com> In-Reply-To: <1594116633-14554-1-git-send-email-phil.yang@arm.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: b4f77297-210c-487c-9afd-149c04eabf33.0 x-checkrecipientchecked: true Authentication-Results-Original: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=arm.com; x-originating-ip: [203.126.0.113] x-ms-publictraffictype: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 55da465e-2dbc-4856-2d49-08d822fd63dc x-ms-traffictypediagnostic: VE1PR08MB4735:|DBBPR08MB4299: x-ms-exchange-transport-forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true nodisclaimer: true x-ms-oob-tlc-oobclassifiers: OLM:8273;OLM:8273; x-forefront-prvs: 04583CED1A X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: u5mK0+/7mUPXnyWSmTDVa9/ri9lV4MO/uHNL8qb8LqqbbW0snjX0ENeKNYFBEIpZ1Zairhb6psgx1sjgYLpW7d+czdp5NqTC68YjXlqowMh98P5VfuBgOcvkhHWp5N8t3C1Gq21BZ39PNi3KtcXcCb/3L83eU998Qn4do4EKWL6xsPBhGWiKJP+lRIDtBQDGgfcLN9M3cKKk44P+KB7KDCvr0R1tLjj5XnyubKgkDnpFPUUIoWM68nd6OVsYz7QP9L14CylNmJQvS5EvksIpYQj270OZMQ8aCK6Pzg3Yp4bR9nLnxWfN/sYGroUJBp7Wib83U8wGD+MwT+8U2UbkcQ== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VE1PR08MB4640.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(346002)(136003)(376002)(39850400004)(366004)(396003)(66946007)(64756008)(55016002)(2906002)(66446008)(66476007)(66556008)(7696005)(76116006)(8936002)(71200400001)(4326008)(186003)(9686003)(86362001)(8676002)(110136005)(54906003)(478600001)(316002)(52536014)(33656002)(6506007)(5660300002)(83380400001)(26005)(53546011); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: BgljrueLiAPmWCPO+y3FQjrFw1+kiADlvOnR7lUf0xGc7R1jdQoZ4wUAo0t8FABb4VpDbxKfClpEPFXQZhwCzqufO1tqWo1g7mOpBZJacJQk6NTo7JeZluU6WyyIsJo2Vn21DaDZEiWtm9Ymu+KHVP0Jmnl2C98uyhCLwKWNk2QAEKGpRKRU7Kd9a/4ioiIBVP2kBzNF+7wOtk3Q552TVVaKhb3gUh+lnEkZfeerDwpPsSjL7Wkk7cFsdzInWreoxrwVyaNVJRB9OU78rC6Z7gX0CgAY6wQ37PFwvjt/BPZXRdi8EMFBvPjTqPcSP0h1EVS221udjWKy0fr19FskOquwT8iHCSVdqalYQ0UJM2UML3jvFD0nxTZF79WGhDS/LafCHX7GvC2WjXv3/7ijKkNsTac7EzSb+WL6fNfnbtI52FYdj5p4hXqfoBCLGKGDP2zsCTlKlBqHVzhDnJZBjuSnKMqF8E5rNlh+pZfb2Jf8eXsYd+8+DFqj5RK0OSBa Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR08MB4735 Original-Authentication-Results: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT032.eop-EUR03.prod.protection.outlook.com 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; SFTY:; SFS:(4636009)(136003)(396003)(39850400004)(346002)(376002)(46966005)(81166007)(8676002)(186003)(5660300002)(54906003)(356005)(7696005)(82310400002)(86362001)(53546011)(70206006)(336012)(26005)(52536014)(6506007)(316002)(4326008)(110136005)(8936002)(55016002)(2906002)(70586007)(82740400003)(33656002)(83380400001)(478600001)(9686003)(47076004); DIR:OUT; SFP:1101; X-MS-Office365-Filtering-Correlation-Id-Prvs: 1dbb0393-ea7f-408d-b199-08d822fd6030 X-Forefront-PRVS: 04583CED1A X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: IeKUi+50XNRH3GCwjZfrBIFjE7wR5Z2VxQNGJcrgQXy4WCtGyT/54jFeg51CvPYKWvTKCbjO34zf3+btCjFatlGYZN2h/RvIs9VORXjrHGa97f2XK3D8s6FWSltGOmqyIXC2/KhWAnL/+g6k5G6TrOWtW2Bi0R9crOsYoLZ5fuY+H2GI5Qa5sIPUXIuoXa6oUNphGxcw0ZuFmqx1xYdgi6pdTacTW3y5YnSuOYEqn4zm82gjfkjrDk1RTSgQW17PglpPeaPcOKhnpZ4TsWKUXwLHKiaPzpGkgu/D+tTVRI2h7o4VxZ1IlLuRwvNx+ZhyTq8qiJ2eMQHWrHgTXE2VgUsDfWvUZeDzpw//0ps7ocsBpnZ8GSluRh+H7bimyvn6D2PibC2dAbuG2cvdelu9VA== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Jul 2020 05:11:37.0299 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 55da465e-2dbc-4856-2d49-08d822fd63dc 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: DB5EUR03FT032.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR08MB4299 Subject: Re: [dpdk-dev] [PATCH v2] mbuf: use C11 atomics for refcnt operations 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" > -----Original Message----- > From: dev On Behalf Of Phil Yang > Sent: Tuesday, July 7, 2020 6:11 PM > To: david.marchand@redhat.com; dev@dpdk.org > Cc: drc@linux.vnet.ibm.com; Honnappa Nagarahalli > ; olivier.matz@6wind.com; Ruifeng Wang > ; nd > Subject: [dpdk-dev] [PATCH v2] mbuf: use C11 atomics for refcnt operation= s >=20 > Use C11 atomics with explicit ordering instead of rte_atomic ops which > enforce unnecessary barriers on aarch64. >=20 > Signed-off-by: Phil Yang > Reviewed-by: Ruifeng Wang > --- > v2: > Fix ABI issue: revert the rte_mbuf_ext_shared_info struct refcnt field > to refcnt_atomic. >=20 > diff --git a/lib/librte_mbuf/rte_mbuf_core.h > b/lib/librte_mbuf/rte_mbuf_core.h > index 16600f1..806313a 100644 > --- a/lib/librte_mbuf/rte_mbuf_core.h > +++ b/lib/librte_mbuf/rte_mbuf_core.h > @@ -18,7 +18,6 @@ >=20 > #include > #include > -#include >=20 > #ifdef __cplusplus > extern "C" { > @@ -495,12 +494,8 @@ struct rte_mbuf { > * or non-atomic) is controlled by the > CONFIG_RTE_MBUF_REFCNT_ATOMIC > * config option. > */ > - RTE_STD_C11 > - union { > - rte_atomic16_t refcnt_atomic; /**< Atomically accessed > refcnt */ > - /** Non-atomically accessed refcnt */ > - uint16_t refcnt; > - }; > + uint16_t refcnt; > + > uint16_t nb_segs; /**< Number of segments. */ >=20 > /** Input port (16 bits to support more than 256 virtual ports). > @@ -679,7 +674,7 @@ typedef void > (*rte_mbuf_extbuf_free_callback_t)(void *addr, void *opaque); > struct rte_mbuf_ext_shared_info { > rte_mbuf_extbuf_free_callback_t free_cb; /**< Free callback > function */ > void *fcb_opaque; /**< Free callback argument */ > - rte_atomic16_t refcnt_atomic; /**< Atomically accessed refcnt */ > + uint16_t refcnt_atomic; /**< Atomically accessed refcnt */ It still causes an ABI check failure in Travis CI on this type change. I think we need an exception in libabigail.abignore for this.=20 Thanks, Phil > }; >=20 > /**< Maximum number of nb_segs allowed. */ > -- > 2.7.4