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 DD519428D4; Wed, 5 Apr 2023 16:44:45 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 76D5441153; Wed, 5 Apr 2023 16:44:45 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id D495A41133 for ; Wed, 5 Apr 2023 16:44:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1680705884; x=1712241884; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=J3bQdBtI5l1J2VpLlxVUAXod8nKNjnbWMTaBMHGN3kc=; b=evp07iVlmBjvrHGM55ObAo2p/9A/loZFVxlogL7qhSBOn1s644fXGv3J kgwV3+yOTyY5jPbYco3eBPa++m1uM9CCaclcW24gKToJGtDe0NljiCmGJ k9EkcDTWp2hgDpix8LL1sGnq1ggVSheDX1+HQoLLCgxjWk4pX1gPhcim2 5x3ibP9kBldGHcTuqQS0NGp1H3ZmPEoJSl+lexMqMbQsJDXFTSk9IZRir NsfvqZ36xVWvw22nXmrLvL2WdaqCPnRPG2/tADyjE9OWLqRsrRQWbFPMk e6nq0poZtXLJvtrsjZfiFYzSzlvFkNikt0L8+eRMstqF6lRK1vRv7lwBJ Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10671"; a="428756175" X-IronPort-AV: E=Sophos;i="5.98,321,1673942400"; d="scan'208";a="428756175" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Apr 2023 07:44:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10671"; a="680310192" X-IronPort-AV: E=Sophos;i="5.98,321,1673942400"; d="scan'208";a="680310192" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orsmga007.jf.intel.com with ESMTP; 05 Apr 2023 07:44:42 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Wed, 5 Apr 2023 07:44:42 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Wed, 5 Apr 2023 07:44:41 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21 via Frontend Transport; Wed, 5 Apr 2023 07:44:41 -0700 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.101) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.21; Wed, 5 Apr 2023 07:44:41 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=g80y74iHGUe2L+xGU6Hn6pWGXuUtsNygVoIG5LX4B+U7cUjKCuX31TJ+kZmf5vgqvfcm4A2XZao9LojJ9Bbz3pBR3rSWoTTtp1O83qzNxETq4naQmJrqFGC1hn0gIEPNh5beR1uSMmeq4z0onbZNK0T4zy3XBUQ3r8x+vQYWlcXtxKNcYIJjlkVpVSImOz/Cy9QhDU+sTjv8YdYcLNibp/IGgAQ5SOkHNjMVLKskVGWE1lzw4vZ7KJ8N5TPycrwo7QMABgNntOH+5bWvnnq85oRLkCO0Jp7ejYACAm3y7Rk3uWOL0617Ek0tPCubNWTjBcapiq8CsqGMZWHvAlOyMA== 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=gK/PKB/irl/vRw2AIkEs0jKUkV45V06FsJIUTR72tyk=; b=U98onGdYsVA5Mr0fVn8Lkoi/nHLywIE16QkmqZbvjTNuiwyWIOW+3w6bnWT0drvTTH9VSRGWZ9yYlm9EMiwMVe3XWVv4xmUhwJrY3A1Yr+YSqXnQduasNBJC4fAda0cjoh4fLKHpMJlfY8IBW5I3X23wwT1G9dqofEsdOXOYtFHyi/VSnihlgv7iRA01uugogK3LLmBqqDBvPpU50PB5aVbX8GDxGxaUYUDBsNCgCxJIiu+r5I1ZrfMvnqWPD3sfbkadsSxI/Au6oF4gqr4kdx/Mw+8diclWuhJYIN8zlYMpJsBfcHYIio9+cfucBokn+Zr3ZuK5M//A2pQiFzdYxw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from DM6PR11MB4282.namprd11.prod.outlook.com (2603:10b6:5:1db::24) by MN6PR11MB8145.namprd11.prod.outlook.com (2603:10b6:208:474::13) 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 14:44:39 +0000 Received: from DM6PR11MB4282.namprd11.prod.outlook.com ([fe80::3329:fbc1:1309:4237]) by DM6PR11MB4282.namprd11.prod.outlook.com ([fe80::3329:fbc1:1309:4237%7]) with mapi id 15.20.6254.033; Wed, 5 Apr 2023 14:44:39 +0000 From: "Sexton, Rory" To: Honnappa Nagarahalli , "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: AQHZXXvqzXfyE/xp60WcgNG5wi51JK8b9REAgADpV+A= Date: Wed, 5 Apr 2023 14:44:39 +0000 Message-ID: References: <20230323113743.4086730-1-rory.sexton@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DM6PR11MB4282:EE_|MN6PR11MB8145:EE_ x-ms-office365-filtering-correlation-id: d7a93649-5ba5-4f32-5e95-08db35e44904 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: h+y1od9oNDnFwpA2FmcBKogEoHBDLv9QcaFbgCBbmwTjxIMGSX1nOZ+vEn40CHMPRhhvkwgRKQZv6ia8zkpOpsszkC+HigCD+AAXz5TjAW0fltWfBxwtYD5ya1iBH4uS6u74zQh3HT7nwsPrIZOUXjkBmehOVLocIUZpRlNCMxjnOgxXBdTIrjCZC+fg1ZeWxdOf8cY6Rp8aUrXBnyYKL9N2vxm2kVmLF3j+SHRHkZbZEbvbefY7sHjjdYlOb0NNQjgobyNREmaa2zYKay7Gc7F6qnBMnoCK0Tptd7od5eief6JS9foiBueKjRb5qTUSahKEA85cA9C7egTzm3BICMhYF0W/abWKuOnzlP7iKaJTFTTFWb4CP8QM9if+r62zY2A4HwOg+2YC7AlROwTN3LFR87JXLxCT+t8lCRNZbj2zU43eKzyz36xzERGnj624VN2Vy4JP56dNBoZKWV3rgMgst8KGtXDJxkFb0sOt7HfZRWFRtiG7BtCVajorStqq4tnlq6xH6npdDOYgxKV8vnCuQH5wOOkrO5RMPsnLw8dchwpUurl/Os9Pyo8V+zTGLrpTHlqe8Qb9kNviTtTVZ7KCAhg8tiEGGPjoKetlV67tABxEAmdgNGlAbJIWwFwLDnuMRF4N6ulz+gdWeTMp4Q== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR11MB4282.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(39860400002)(346002)(376002)(136003)(396003)(366004)(451199021)(38070700005)(86362001)(33656002)(2906002)(66899021)(55016003)(122000001)(7696005)(71200400001)(83380400001)(53546011)(186003)(26005)(9686003)(6506007)(4326008)(8676002)(66556008)(64756008)(66476007)(66446008)(66946007)(316002)(38100700002)(41300700001)(76116006)(5660300002)(82960400001)(478600001)(54906003)(8936002)(110136005)(52536014)(23180200003); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?1ZnaKd1P4B2D5qiQFSmZMf3k8gZ5HaWH5iO1VMUqcIvneOBFkumD7vaoLgD+?= =?us-ascii?Q?sav2L5c3UiNpFzc8qrVUfou83Evs5fUndT6nyekDo9UPtl7ioZtR+xIwOnVa?= =?us-ascii?Q?1VtM/6sZK9vyuwOtxWF+zvqCTmy4alV9vTvKkO5r3Hiw/5NiQ/AF5oPBA8ix?= =?us-ascii?Q?rrCLeEcSK3vVFvbqTnPWPFkfq7+FW5BNW6UgKClIvg6zYNMTTbcJGrgMekP0?= =?us-ascii?Q?fKY4aSs1e3gQb7TYAFoLgfksgMKhYT5O1A/pPX7OxtstM34+soNSsGG3Os68?= =?us-ascii?Q?iBk7haT3xLJ+koLIS9rfAqagTQ3kVqPLrZI0L2F9YbYDWdXV07NO6OiNkAGh?= =?us-ascii?Q?/fwRSe/jOD0pJaymDK3SFrPjeWIzT9TV/30uV+hftFwMrAlVLtv6WUDSzemm?= =?us-ascii?Q?IioAc16GxDaVj7lydtvwbSCRaol61VngYwvNs635rlSF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fUHJALkgJlSW9csUQJ6mY+G6eo2FkiCUivum0?= =?us-ascii?Q?Yry2kI64HG3m/G+06j4EKd44Yj76oPb0mjJqxLQA+pErYCH4OAba9Cl6q4Fh?= =?us-ascii?Q?pu2W9Bjz0B6tbRYcbi7l1cZXhS/Pcj/bSoP47JKTzu8mqs5noqC0ZsYSpvWq?= =?us-ascii?Q?O5FbX2yDoNBomdzXQ6sTdrRGgYFl9gtv4XBXstZQhc0r7c+WQydrc66sOdlv?= =?us-ascii?Q?EA8EeHeZGTYg1goF1wQ6JtZBYU0cHfAS0WmVgsDW?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR11MB4282.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d7a93649-5ba5-4f32-5e95-08db35e44904 X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Apr 2023 14:44:39.6753 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: qv86ATAYBFdq1pBiDZCYE6bOXwuS0vf3jan9jhpTzQ8nLCVoabSANVTHtFxLPj16pmUllc/6U1RS3gpmAHsthA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN6PR11MB8145 X-OriginatorOrg: intel.com 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 Honnappa, Responses inline. I will continue with an initial implementation of this feature and capture = performance data as suggested.=20 Rgds, Rory > -----Original Message----- > From: Honnappa Nagarahalli =20 > Sent: Wednesday, April 5, 2023 1:46 AM > To: Sexton, Rory ; konstantin.v.ananyev@yandex.ru > Cc: dev@dpdk.org; nd ; nd > Subject: RE: [RFC 0/1] ring: add callback infrastructire to ring library >=20 > Hi Roxy, > Thanks for the work, few questions inline. >=20 > > -----Original Message----- > > From: Rory Sexton > > Sent: Thursday, March 23, 2023 6:38 AM > > To: Honnappa Nagarahalli ;=20 > > 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=20 > > the ring library, particularly in the ring dequeue functions, but they= =20 > > could also be added to the enqueue functions if desired. > >=20 > > Callbacks in the ring dequeue functions would be beneficial for a=20 > > number of reasons including but not limited to the following: > > - would allow users to register specific functions to be called on dequ= eue of a > > ring avoiding the need to call the function within application code o= n several > > threads reading from said ring. > I do not completely understand the 'avoiding the need to call the functio= n within application code on several threads reading from said ring'. Irres= pective of where the feature is implemented (either in ring library or the = application), the call back function will be called on all the threads that= receive from this queue.=20 I just mean the callback infrastructure would handle the call back function= rather than developer needing to call their implemented function explicite= ly=20 >=20 > > - would mirror the callback functionality offered by the ethdev library= for > > threads that read exclusively from a ring and process packets based o= ff that, > > thus allowing for the same threads to read from either a NIC i/f or d= irectly > > from a ring without needing a different codepath. > Do you plan to support a chain of callbacks? Yes I would plan to support a chain of callbacks=20 >=20 > >=20 > > The addition of callbacks wouldn't impact the reading of rings by more= =20 > > than 1 cycle when no callbacks are registered. They could also=20 > > additionally be compiled in/out as desired to give more confidence in=20 > > maintaining performance when callbacks are not required. > I would prefer to keep this feature on always as maintenance is easier. B= ut, I think we should make that decision only after we have performance dat= a. Is it possible to provide some performance data with this feature on but= no callbacks registered? Agreed that keeping the feature always on would be easier long-term. I can capture performance data with the feature on but no callbacks registe= red. We can base the final implementation with that data in mind.=20 >=20 > >=20 > > This RFC is to give a feel for what the additional APIs would be and=20 > > how they would be integrated within the ring dequeue functions. As=20 > > such only function declarations are present. If there is a willingness= =20 > > 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