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 61FAFA0352; Thu, 16 Jan 2020 17:36:45 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 458B91D588; Thu, 16 Jan 2020 17:36:44 +0100 (CET) Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-eopbgr130073.outbound.protection.outlook.com [40.107.13.73]) by dpdk.org (Postfix) with ESMTP id 521511D585 for ; Thu, 16 Jan 2020 17:36:43 +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=Ow8lj0YtalIj6ketJ+W295NTnVD44/3LBiZ6EnMn2lw=; b=BNdKt15TJdqqmHVWz/4lcPV3TBMFJD42p4knufiR6+IdyuSYoY+ordoSMpzNzhHD/K4aMNlMnqSF/JKuTsvSyYBhDsQDpEC6RZHzzLS3AfakkFvJ90hZh7c6Jq7DQS/Fw5JhKW5iYjRQfpuBtfts0V47gdAX8pkMyTsA2EYMOXs= Received: from AM6PR08CA0044.eurprd08.prod.outlook.com (2603:10a6:20b:c0::32) by AM5PR0801MB1908.eurprd08.prod.outlook.com (2603:10a6:203:4b::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2644.20; Thu, 16 Jan 2020 16:36:42 +0000 Received: from DB5EUR03FT048.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e0a::205) by AM6PR08CA0044.outlook.office365.com (2603:10a6:20b:c0::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2644.20 via Frontend Transport; Thu, 16 Jan 2020 16:36:42 +0000 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 DB5EUR03FT048.mail.protection.outlook.com (10.152.21.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2602.11 via Frontend Transport; Thu, 16 Jan 2020 16:36:41 +0000 Received: ("Tessian outbound ca1df68f3668:v40"); Thu, 16 Jan 2020 16:36:41 +0000 X-CR-MTA-TID: 64aa7808 Received: from 6bc0dc11e0b7.3 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 09FC9343-AE99-4B51-B473-8743B6D8D56C.1; Thu, 16 Jan 2020 16:36:36 +0000 Received: from EUR04-DB3-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 6bc0dc11e0b7.3 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 16 Jan 2020 16:36:36 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LYqaAwQuCSPvZoRg52+W12FmUTXIVIFbCxexFonumyFqX8T/ziy6f7OCZhf3jG6QY5uZO/l9swcGERiPw7Iy3+61/Sj4jbrhmKz7GjTPEsV6lR+fI+0gMEAILdNGFPQ13eXihZL7uAOo3IIG8jK03As1sdVIPZTbmHm9tcGwHgeamO8skXGr+s1a7ZmTTvhLnkBd0GF7FvMeGZyIjHQ+SyEDGPD0M98eBrw2Gqka9u9noOf8IKDn6Rgp5N6Ka/aXWGKIJ4uuCSJxCt7vyoYWmqRkPVY4yolN6eRSMSNBsqYynaQ001qmiup5NZqqypOWMcdSWK8l+qYKN9kJOeosVg== 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=Ow8lj0YtalIj6ketJ+W295NTnVD44/3LBiZ6EnMn2lw=; b=QEwtsGAE5PRluLk8f7XtGe2eeTvkyrk4N1E5IIP+Qhe0UG2C9SuYQEHs6zMdqpL+HP3CSpoinDY0YDJNCieBhZq/MjA5QvDAMLMQcZnRmQ2FJtvs1vQ8uKuahksqdNpz3967moCCz85bgxcX4AgDIh+5NDgVJwScOH3Lf/9gc1cQ7GPloe+m8FFzXueqopVNmWkmAOuCnZZg867LxviKsHpmkk0mIIkv1N9p6SMNoqetHl71d1lrIKLSE47NUdkeSmFcq0+7qNcJhDGc+N/GrgCp+YNOaVr4e78zbQ6d3RieS3JOjsB4vsEn2Vl7Razctcqm8Jp3QxXz798m7qiqvg== 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=Ow8lj0YtalIj6ketJ+W295NTnVD44/3LBiZ6EnMn2lw=; b=BNdKt15TJdqqmHVWz/4lcPV3TBMFJD42p4knufiR6+IdyuSYoY+ordoSMpzNzhHD/K4aMNlMnqSF/JKuTsvSyYBhDsQDpEC6RZHzzLS3AfakkFvJ90hZh7c6Jq7DQS/Fw5JhKW5iYjRQfpuBtfts0V47gdAX8pkMyTsA2EYMOXs= Received: from VE1PR08MB5149.eurprd08.prod.outlook.com (20.179.30.27) by VE1PR08MB4702.eurprd08.prod.outlook.com (10.255.114.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2644.19; Thu, 16 Jan 2020 16:36:34 +0000 Received: from VE1PR08MB5149.eurprd08.prod.outlook.com ([fe80::29eb:a1be:8f8f:fae2]) by VE1PR08MB5149.eurprd08.prod.outlook.com ([fe80::29eb:a1be:8f8f:fae2%7]) with mapi id 15.20.2623.018; Thu, 16 Jan 2020 16:36:34 +0000 From: Honnappa Nagarahalli To: Honnappa Nagarahalli , "olivier.matz@6wind.com" , "sthemmin@microsoft.com" , "jerinj@marvell.com" , "bruce.richardson@intel.com" , "david.marchand@redhat.com" , "pbhagavatula@marvell.com" , "konstantin.ananyev@intel.com" , "yipeng1.wang@intel.com" CC: "dev@dpdk.org" , Dharmik Thakkar , Ruifeng Wang , Gavin Hu , nd , Honnappa Nagarahalli , nd Thread-Topic: [PATCH v9 0/6] lib/ring: APIs to support custom element size Thread-Index: AQHVzC1g6/jtmwdtk0WBx7Etb26/hqftfL3w Date: Thu, 16 Jan 2020 16:36:34 +0000 Message-ID: References: <20190906190510.11146-1-honnappa.nagarahalli@arm.com> <20200116052511.8557-1-honnappa.nagarahalli@arm.com> In-Reply-To: <20200116052511.8557-1-honnappa.nagarahalli@arm.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: f5525a65-4da9-494f-ae68-4340f4fc71f0.0 x-checkrecipientchecked: true Authentication-Results-Original: spf=none (sender IP is ) smtp.mailfrom=Honnappa.Nagarahalli@arm.com; x-originating-ip: [217.140.111.135] x-ms-publictraffictype: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 854f6d45-d3f5-456a-fa8c-08d79aa24466 X-MS-TrafficTypeDiagnostic: VE1PR08MB4702:|VE1PR08MB4702:|AM5PR0801MB1908: x-ld-processed: f34e5979-57d9-4aaa-ad4d-b122a662184d,ExtAddr x-ms-exchange-transport-forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true nodisclaimer: True x-ms-oob-tlc-oobclassifiers: OLM:10000;OLM:10000; x-forefront-prvs: 02843AA9E0 X-Forefront-Antispam-Report-Untrusted: SFV:NSPM; SFS:(10009020)(4636009)(39860400002)(366004)(396003)(136003)(376002)(346002)(189003)(199004)(86362001)(316002)(52536014)(66476007)(66556008)(26005)(54906003)(81166006)(478600001)(81156014)(110136005)(53546011)(71200400001)(8936002)(186003)(6506007)(33656002)(2906002)(8676002)(76116006)(7696005)(45080400002)(4326008)(66946007)(55016002)(9686003)(66446008)(5660300002)(64756008)(21314003); DIR:OUT; SFP:1101; SCL:1; SRVR:VE1PR08MB4702; H:VE1PR08MB5149.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: wYJGgODZ2EuRG5/VviYYaRZlqWlv7fCpFV4vP6sbe7GhmB/S6/G4FU84QSHM8VLSTcIRy2LnjC5slG+4m/V6eIR8VfmO0fzp/upE2nZYVx9bXrZuT9u9tGuHBNE08DAgwf3WQ/zzkFID0G5tWs77RQ5VdI2S5/jlXpwMjRQsGOVzGlWu3AGCkY5Ajc6eBSfW1DT0iT4bUVsG/onWMeIcM9CrZ5wEFwUerID7fo7LG4KHkY6+S1MaDe0/fyEDJgTNEwGVxcFVVB5ZfHiaUZpDSc0D65ligbMeUeTBLiQ/W+hZkXsgWtA43cvCV0jB1PzlvyuPrPIXvA9BH+eC2xmPgE4wSXs8xkgxyNZ5dDRRajX/vK0h1uWTgrR5DMrpxLdkaL0Ywj5lFK4uPRnFbjAswpKJnXY9U1y90yulRP53GTwhkRw6xqW0pS+56ESq3i+HaIm2NkoakK2mG4BWw6wmQ8JFyA4xxmCvHk8GjfagOXMRG/EYdTFp8yITcK9ejsBe Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR08MB4702 Original-Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Honnappa.Nagarahalli@arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT048.eop-EUR03.prod.protection.outlook.com X-Forefront-Antispam-Report: CIP:63.35.35.123; IPV:CAL; SCL:-1; CTRY:IE; EFV:NLI; SFV:NSPM; SFS:(10009020)(4636009)(346002)(136003)(376002)(39860400002)(396003)(199004)(189003)(53546011)(2906002)(336012)(4326008)(478600001)(5660300002)(7696005)(45080400002)(26826003)(33656002)(186003)(86362001)(26005)(52536014)(6506007)(70586007)(55016002)(70206006)(8936002)(9686003)(8676002)(81166006)(356004)(110136005)(54906003)(316002)(81156014)(21314003); DIR:OUT; SFP:1101; SCL:1; SRVR:AM5PR0801MB1908; H:64aa7808-outbound-1.mta.getcheckrecipient.com; FPR:; SPF:Pass; LANG:en; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; A:1; MX:1; X-MS-Office365-Filtering-Correlation-Id-Prvs: 505355f0-0c38-407e-6d5b-08d79aa24029 X-Forefront-PRVS: 02843AA9E0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mW9cFlFckBSRE7u0tgvH2WeI9Nc2FgTW5NiRHkgvYweywO9YFoyNdzzJj/RM5f3g1aGdF5v5EdlypkPxXRfg3tefdLmiA2mgnZSnG0v2mLh0VUq9Wj9tB0qYieR876FdNFGpFe3B9SnkNL6VxLHUhkyAEdU3CXZdx0nbgVAT7o4rvIGwndx3H8SK8ko8qZI2q4f4aDZttLaA6mKjFeI85zpFiHFPEVY2Mg0xZ/K13b0ViN5gUSU7L8+OCShdiedxLybzDUEVXYvRbE/ytS3cdmEVloPaeEoOHGZ+fhxBCX6HTwTP2XhpAcXtXBq6AKK28rITp1G1TJOS3/JbYL0F2z0kuyeDLfvc0r1MqtQ8b6rfKCjAsZGQYG3mjnLb1iZ0FMuH2nKVziVDePq3G2OPgIlL9kHptX+8GJGVbsRFL9LgqiJcTf+H+0DPBeSxe/rpY6QBXrTfP25en3jE/xYdoQi9UmEcEs4m9QS+82E7X2PxU9f6/hLKQ4ysmYfMS4cj X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jan 2020 16:36:41.8633 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 854f6d45-d3f5-456a-fa8c-08d79aa24466 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-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0801MB1908 Subject: Re: [dpdk-dev] [PATCH v9 0/6] lib/ring: APIs to support custom element size 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" I see that the none of the CIs (except Travis) have run on this patch. Inte= l CI has reported a compilation error and I fixed it in this version. Does = anyone know if/when the CI will run on the patches? Thanks, Honnappa > -----Original Message----- > From: Honnappa Nagarahalli > Sent: Wednesday, January 15, 2020 11:25 PM > To: olivier.matz@6wind.com; sthemmin@microsoft.com; jerinj@marvell.com; > bruce.richardson@intel.com; david.marchand@redhat.com; > pbhagavatula@marvell.com; konstantin.ananyev@intel.com; > yipeng1.wang@intel.com; Honnappa Nagarahalli > > Cc: dev@dpdk.org; Dharmik Thakkar ; Ruifeng > Wang ; Gavin Hu ; nd > > Subject: [PATCH v9 0/6] lib/ring: APIs to support custom element size >=20 > The current rte_ring hard-codes the type of the ring element to 'void *',= hence > the size of the element is hard-coded to 32b/64b. Since the ring element = type > is not an input to rte_ring APIs, it results in couple of issues: >=20 > 1) If an application requires to store an element which is not 64b, it > needs to write its own ring APIs similar to rte_event_ring APIs. This > creates additional burden on the programmers, who end up making > work-arounds and often waste memory. > 2) If there are multiple libraries that store elements of the same > type, currently they would have to write their own rte_ring APIs. This > results in code duplication. >=20 > This patch adds new APIs to support configurable ring element size. > The APIs support custom element sizes by allowing to define the ring elem= ent > to be a multiple of 32b. >=20 > The aim is to achieve same performance as the existing ring implementatio= n. >=20 > v9 > - Split 'test_ring_burst_bulk_tests' test case into 4 smaller > functions to address clang compilation time issue. > - Addressed compilation failure in Intel CI in the hash changes. >=20 > v8 > - Changed the 128b copy elements inline function to use 'memcpy' > to generate unaligned load/store instructions for x86. Generic > copy function results in performance drop. (Konstantin) > - Changed the API type #defines to be more clear (Konstantin) > - Removed the code duplication in performance tests (Konstantin) > - Fixed memory leak, changed test macros to inline functions (Konstantin= ) > - Changed functional tests to test for 20B ring element. Fixed > a bug in 32b element copy code for enqueue/dequeue(ring size > needs to be normalized for 32b). > - Squashed the functional and performance tests in their > respective single commits. >=20 > v7 > - Merged the test cases to test both legacy APIs and > rte_ring_xxx_elem APIs without code duplication (Konstantin, Olivier) > - Performance test cases are merged as well (Konstantin, Olivier) > - Macros to copy elements are converted into inline functions (Olivier) > - Added back the changes to hash and event libraries >=20 > v6 > - Labelled as RFC to indicate the better status > - Added unit tests to test the rte_ring_xxx_elem APIs > - Corrected 'macro based partial memcpy' (5/6) patch > - Added Konstantin's method after correction (6/6) > - Check Patch shows significant warnings and errors mainly due > copying code from existing test cases. None of them are harmful. > I will fix them once we have an agreement. >=20 > v5 > - Use memcpy for chunks of 32B (Konstantin). > - Both 'ring_perf_autotest' and 'ring_perf_elem_autotest' are available > to compare the results easily. > - Copying without memcpy is also available in 1/3, if anyone wants to > experiment on their platform. > - Added other platform owners to test on their respective platforms. >=20 > v4 > - Few fixes after more performance testing >=20 > v3 > - Removed macro-fest and used inline functions > (Stephen, Bruce) >=20 > v2 > - Change Event Ring implementation to use ring templates > (Jerin, Pavan) >=20 > Honnappa Nagarahalli (6): > test/ring: use division for cycle count calculation > lib/ring: apis to support configurable element size > test/ring: add functional tests for rte_ring_xxx_elem APIs > test/ring: modify perf test cases to use rte_ring_xxx_elem APIs > lib/hash: use ring with 32b element size to save memory > lib/eventdev: use custom element size ring for event rings >=20 > app/test/test_ring.c | 1342 +++++++++++++------------- > app/test/test_ring.h | 187 ++++ > app/test/test_ring_perf.c | 452 +++++---- > lib/librte_eventdev/rte_event_ring.c | 147 +-- > lib/librte_eventdev/rte_event_ring.h | 45 +- > lib/librte_hash/rte_cuckoo_hash.c | 94 +- > lib/librte_hash/rte_cuckoo_hash.h | 2 +- > lib/librte_ring/Makefile | 3 +- > lib/librte_ring/meson.build | 4 + > lib/librte_ring/rte_ring.c | 41 +- > lib/librte_ring/rte_ring.h | 1 + > lib/librte_ring/rte_ring_elem.h | 1003 +++++++++++++++++++ > lib/librte_ring/rte_ring_version.map | 2 + > 13 files changed, 2242 insertions(+), 1081 deletions(-) create mode 100= 644 > app/test/test_ring.h create mode 100644 lib/librte_ring/rte_ring_elem.h >=20 > -- > 2.17.1