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 64F7A428B3; Wed, 5 Apr 2023 02:46:30 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 37BDC40FDF; Wed, 5 Apr 2023 02:46:28 +0200 (CEST) Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03on2042.outbound.protection.outlook.com [40.107.105.42]) by mails.dpdk.org (Postfix) with ESMTP id E513340DDC for ; Wed, 5 Apr 2023 02:46:26 +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=hIdmGZdKvXpvzxzQFdxZASr+Pgzjas3RgqxR0xJChCM=; b=j5Vl9o0xEpP9ykf6KdJbzK6C0PluP8r9taMGKQ2UP/Fm3cDObZB/InciNf/QDtBEr7v05B6/TwVG6CCuGAwsmHiceZycL1koB/VwYuaG2z0eUwdJb7Dmtu44OT5HVkq6zAooUFzcxvggo1j20kR75Q6lxrw4aXcyTcpwIzWxGwM= Received: from DB6PR1001CA0032.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:4:55::18) by AM0PR08MB5492.eurprd08.prod.outlook.com (2603:10a6:208:185::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6254.35; Wed, 5 Apr 2023 00:46:24 +0000 Received: from DBAEUR03FT053.eop-EUR03.prod.protection.outlook.com (2603:10a6:4:55:cafe::4d) by DB6PR1001CA0032.outlook.office365.com (2603:10a6:4:55::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6254.20 via Frontend Transport; Wed, 5 Apr 2023 00:46:24 +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; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DBAEUR03FT053.mail.protection.outlook.com (100.127.142.121) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6222.22 via Frontend Transport; Wed, 5 Apr 2023 00:46:24 +0000 Received: ("Tessian outbound 5bb4c51d5a1f:v136"); Wed, 05 Apr 2023 00:46:24 +0000 X-CR-MTA-TID: 64aa7808 Received: from 3ea338a1882b.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 6C70E718-0C2E-4423-B591-FF89A1D1ACC3.1; Wed, 05 Apr 2023 00:46:18 +0000 Received: from EUR04-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 3ea338a1882b.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 05 Apr 2023 00:46:18 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RoG2sCnt6qhwAzOKxw5G627g7Nh3Ty6dkmCRZnyeflXafVlRPe5YPUCLhmRxck7JMSiO0O80Jtbhb3k7dJD/rZk8UuNsS+X1vJAFTP2oqxFE+QlkL4ZTUo4VLDd+vwGAJDuhAoXE/MHJHggzPdCKFlOhst1xYErpqdzf0HTM5faE+Qa3uR2S0y+HoVpAIAKsU5IiTExwYpWeva2ZKgZpGBbE7dJBpxOiWXSZlLawvIh/9G0ExIFp33E/qqAA1s1zokBayi9dxof60p5VZUxagErwPeL3DA5gEjhIEKg/BDVuSrXqzoSQ36ELO9hv8uaSfw/FdS9mOlI4cyWZQH2xAQ== 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=hIdmGZdKvXpvzxzQFdxZASr+Pgzjas3RgqxR0xJChCM=; b=Yx44VACbVR14QhoEkITS1mUyieLXO/ZiL2MeUbAd+aUSglrrMYH8tYR6Zd9jAMjAWg/LrxRgt2+0gXGh/l339vRvUwSRSq8CsgKew5apGqXi10i07oRC/atc00yvrGOKDRv7aX4JAoZN/kDJOheCUXZYIGv0DyvmDnHzsuvrBbXtTvA3HzQ5g3T/ZtofrkxU7BjEFOhUbMzLC1TmYNripif351rK98bFRLC6VezamJ3vkIj2CY/zHfKnz//uRjooLxLO47iAzrHXnZefoFQcFYCXoNKpTq8fyEusOYsYVTAZA+/DInM9DOyyPC71tKE+hggWVoy8rf6ht/u8XTRtHA== 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=hIdmGZdKvXpvzxzQFdxZASr+Pgzjas3RgqxR0xJChCM=; b=j5Vl9o0xEpP9ykf6KdJbzK6C0PluP8r9taMGKQ2UP/Fm3cDObZB/InciNf/QDtBEr7v05B6/TwVG6CCuGAwsmHiceZycL1koB/VwYuaG2z0eUwdJb7Dmtu44OT5HVkq6zAooUFzcxvggo1j20kR75Q6lxrw4aXcyTcpwIzWxGwM= Received: from DBAPR08MB5814.eurprd08.prod.outlook.com (2603:10a6:10:1b1::6) by DB9PR08MB8577.eurprd08.prod.outlook.com (2603:10a6:10:3d6::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6254.33; Wed, 5 Apr 2023 00:46:16 +0000 Received: from DBAPR08MB5814.eurprd08.prod.outlook.com ([fe80::11e6:9bd8:f4e9:7bbb]) by DBAPR08MB5814.eurprd08.prod.outlook.com ([fe80::11e6:9bd8:f4e9:7bbb%6]) with mapi id 15.20.6254.033; Wed, 5 Apr 2023 00:46:16 +0000 From: Honnappa Nagarahalli To: Rory Sexton , "konstantin.v.ananyev@yandex.ru" CC: "dev@dpdk.org" , nd , nd Subject: RE: [RFC 0/1] ring: add callback infrastructire to ring library Thread-Topic: [RFC 0/1] ring: add callback infrastructire to ring library Thread-Index: AQHZXXvqlDrEbvyWVUWKEqZXZX5skK8b8mTA Date: Wed, 5 Apr 2023 00:46:12 +0000 Message-ID: References: <20230323113743.4086730-1-rory.sexton@intel.com> In-Reply-To: <20230323113743.4086730-1-rory.sexton@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: 0677E4C3EFD4CB4E80414F900623AD49.0 x-checkrecipientchecked: true Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; x-ms-traffictypediagnostic: DBAPR08MB5814:EE_|DB9PR08MB8577:EE_|DBAEUR03FT053:EE_|AM0PR08MB5492:EE_ X-MS-Office365-Filtering-Correlation-Id: 472411e7-bb9a-4c7b-a5ee-08db356f2e91 x-checkrecipientrouted: true nodisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: cPVMNiWhh2MS4es/gl+gC/Hvfn77tTNH+wiNlF3CPBKQtkqHr4qF1U47lJRpBLOObr+ERgWto8Z3r69+txR9xSGPCf/8F+6E9J5fS189ruBnaT653NlPE0oRqTHwfXHqOnSKa/A46BJVnKxhA6rSaziiGt5ucZb1oqD+wQ2q3guiU52tqoDXET1ADq9O7QBLzR+NuB8wN3Fug4c8Wy4ail/Z5HSsnZGzTL/snlJ745UURDH+GYSgC53MNuYHQzuOfmudLEqWdaJRUI6Oa/rRndCPcCSYRXUM2vGRTfE+45COUzFgrVrQ6h/zPXQqTzGzN8nYL0wJm5zSnmRBw10X3/mygcTrxJHsW2pfsGVPoPkmIRmNjtZxQxsC4B95U2qD6MuWrVqGtc1eO91fWiJDwuKaak5GLcP03OiAfGY/VWKSbxuwJLfRwpsvQjDX8eTOS2aKiCKpDO0bA58omau+vVkQrJEq/+RsLUSOGMddYtSUdS+i3hM62ZGm2QV+6ug5LvFaZZoQNunjj7RTtwItvG2LQWznT6uKdAsOFT7kd+UCpbQZAmB7vT+y47SraykDZdbpeWvtuzPCyLmvAHUcPGpgBhHd2ESFOIcX1ZNpegzWLESSWQOhAE2aaj/lNGqkK9ZZOZwxHOp6wYotO0bmIA== 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:(13230028)(4636009)(396003)(346002)(376002)(136003)(366004)(39860400002)(451199021)(110136005)(4326008)(38070700005)(66476007)(52536014)(41300700001)(66946007)(76116006)(64756008)(66446008)(66556008)(8676002)(122000001)(5660300002)(54906003)(316002)(38100700002)(8936002)(478600001)(86362001)(66899021)(2906002)(71200400001)(7696005)(33656002)(186003)(55016003)(83380400001)(26005)(6506007)(53546011)(9686003)(6666004)(23180200003); 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: DB9PR08MB8577 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: DBAEUR03FT053.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 2f5127bb-1752-4e2b-39e4-08db356f2808 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mgprUzyfBVUyNukKpqJfzdfqxflly0mrME0KfKOaJT/EdMFse6wvkceDe1rZy0Wj6hu1tWCuYBwqc4JOJ9jt8Bt1PbEwnZ+fTEqnwm3eMF4XTWPl0Fh0/aavkoI0spSkJsP9U9UThtMLWHkaxqbqjf8NE3Lv2+0I0V0nAOib1iVbZUey3yekvVvfnVxCSSVaHeKoTbJ9ro8v3YM2QSjcjOehuJSIhRkRgrWTvtOnKYGfDJ3aBmCGLk1fGsPI7W74LOt2Qt70G7ioposl5uc6ThZzPOIQFCTPDkFiw+p7Ze1yNQZHVZbSuKDDIRwVOb7JRhL/zchIADJv4V6xcEvmsK5UjsDEg4ZJLnCFlZvrN1SqoBLuaFCrQNXyUVJk2J8QI2iDPtuVsTfl6RsFl2BE+176NZG1mrqZrkeDeltslG7htSdO4OFl7Uzi/09n5uLFUVlastpZuTglRUV6nhIhJ2BbCT3ieq/HU44o9KUsHDCrQ3kBtj7mZpM7NbxslMvKHG5/UmnWaWh3Fmjm4Q7/wGNFjsRVJR6+g1/1u/o16VCCiPTsv/8aLmjqraAQ+FnLWjNJTwX79X9XP3AIEc83YxDI13NGM8WgFnWqWhGu2iWUU8/uqxewCozv4TgMc4FxvEBPrV/g/96JaO8mtObn6F2pOgMcMs+kripRx2ZvKRYDxZyOknZIgWkcipsCTamfOWdW23Px0f8wqGw/xH7P2YYiJyhdF/Png07KqBYRphY= 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:(13230028)(4636009)(346002)(39860400002)(396003)(136003)(376002)(451199021)(46966006)(40470700004)(36840700001)(82740400003)(66899021)(81166007)(356005)(316002)(33656002)(110136005)(36860700001)(83380400001)(54906003)(478600001)(8676002)(8936002)(47076005)(5660300002)(40460700003)(2906002)(41300700001)(53546011)(4326008)(6506007)(186003)(9686003)(26005)(86362001)(336012)(70586007)(70206006)(55016003)(40480700001)(52536014)(82310400005)(7696005)(6666004)(23180200003); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Apr 2023 00:46:24.1996 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 472411e7-bb9a-4c7b-a5ee-08db356f2e91 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: DBAEUR03FT053.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB5492 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 Hi Roxy, Thanks for the work, few questions inline. > -----Original Message----- > From: Rory Sexton > Sent: Thursday, March 23, 2023 6:38 AM > To: Honnappa Nagarahalli ; > konstantin.v.ananyev@yandex.ru > Cc: dev@dpdk.org; Rory Sexton > Subject: [RFC 0/1] ring: add callback infrastructire to ring library >=20 > This is an RFC proposing the addition of a callback infrastructure to the= ring > library, particularly in the ring dequeue functions, but they could also = be added > to the enqueue functions if desired. >=20 > Callbacks in the ring dequeue functions would be beneficial for a number = of > reasons including but not limited to the following: > - would allow users to register specific functions to be called on dequeu= e of a > ring avoiding the need to call the function within application code on = several > threads reading from said ring. I do not completely understand the 'avoiding the need to call the function = within application code on several threads reading from said ring'. Irrespe= ctive of where the feature is implemented (either in ring library or the ap= plication), the call back function will be called on all the threads that r= eceive from this queue.=20 > - would mirror the callback functionality offered by the ethdev library f= or > threads that read exclusively from a ring and process packets based off= that, > thus allowing for the same threads to read from either a NIC i/f or dir= ectly > from a ring without needing a different codepath. Do you plan to support a chain of callbacks? >=20 > The addition of callbacks wouldn't impact the reading of rings by more th= an 1 > cycle when no callbacks are registered. They could also additionally be c= ompiled > in/out as desired to give more confidence in maintaining performance when > callbacks are not required. I would prefer to keep this feature on always as maintenance is easier. But= , I think we should make that decision only after we have performance data.= Is it possible to provide some performance data with this feature on but n= o callbacks registered? >=20 > This RFC is to give a feel for what the additional APIs would be and how = they > would be integrated within the ring dequeue functions. As such only funct= ion > declarations are present. If there is a willingness within the community = to add > callback infrastructure to the ring library I will implement further code= . >=20 > Rory Sexton (1): > ring: add infrastructure to allow callbacks within the ring library >=20 > lib/ring/rte_ring.h | 133 ++++++++++++++++++++++++++++++++++++++- > lib/ring/rte_ring_core.h | 3 + > 2 files changed, 135 insertions(+), 1 deletion(-) >=20 > -- > 2.34.1