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 860CB43B57; Tue, 20 Feb 2024 19:04:01 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6B7C2402A7; Tue, 20 Feb 2024 19:04:01 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) by mails.dpdk.org (Postfix) with ESMTP id EF4A940289 for ; Tue, 20 Feb 2024 19:03:58 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1708452240; x=1739988240; h=date:from:to:cc:subject:message-id:references: content-transfer-encoding:in-reply-to:mime-version; bh=NJp7QKsNUxH4XlfM2QQmlSuRRU+eki+M7Rz9fQnvYKE=; b=nxb9KBhPO1mK94ix/a/Fjn2MN0SvbsJkd8+K8h79BE0jmqJgUgze8Nwf 2kIal8YrE78napT4BKtpTeeiRwVVyqE339cohcapqPAYMRtT8uiu6KrvN k7xVnLv8Mk0YbCveX5a6Qy/BwnFaK13pxI8mlGbqSO9NYIOYbMavw0RLR v9Zzp/vyKybeuiiToDChkxTBJGzmTUrRaKyTCueJhhBY6qBjT/CDRhwRQ Ncr6QOjYWmTIQxZ66wK3VHLHIopRzNH5am6LJrye1OOYBkWu5hs7igO21 ol73ExujUAYF5XbbcOEVuaMhCkGGlizO1SkyDwUcuEvnW03eD1Qr5GREM A==; X-IronPort-AV: E=McAfee;i="6600,9927,10990"; a="20008756" X-IronPort-AV: E=Sophos;i="6.06,174,1705392000"; d="scan'208";a="20008756" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Feb 2024 10:03:42 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,174,1705392000"; d="scan'208";a="35878724" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by fmviesa001.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 20 Feb 2024 10:03:41 -0800 Received: from orsmsx602.amr.corp.intel.com (10.22.229.15) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Tue, 20 Feb 2024 10:03:40 -0800 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35 via Frontend Transport; Tue, 20 Feb 2024 10:03:40 -0800 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.168) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Tue, 20 Feb 2024 10:03:40 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cRLMmRNCzVBZcy6ctWadGoRMe+78XTq8KVLRq7S8GleNb4769Xa+NJwYS5RoCfkQrLtfccJh+4p16kFTrJDruU16Gnwt3fWh7jWe5C6RpQ+d58/TAMyGa0QE0jj7qSfH1lLtDOmaQl1LZwwxgwQN30SG6Ka+W8TIEamKthqNO1AmuJV5N1xsk6Uar626dwJCg1vpAM7Ipfbfbqb6RCMh2DoPvo8Av/psyJ+AgzcO11OdtvCQEA67mS68wC12Y/t5XtrBS3Rsg9inFuRIvb9a6PhzLo/OMYnsW0UzmM9TzyUa62SLzD8L220/aZ0sXkVKExQpTS3PgCNN/dWQz95ycg== 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=u0S0Y5OQCx93Ky9nyDE/seSl6UUtrGFjd9Rrdzld39U=; b=d/XTrzbR3yFCI5PXS9YoS2hGCxruolsX4Ql6KpzGR8WIg097TXPLEGi6I744/x++oPUQGc0H2IkqQu90DUUFgqiJ95QH/8tR7A/dc99AIKYsBRm7o8IXGEfg1LXcP9O1Z5aMQJX5YvvsKN3k92xTwpKGB46FATMEpPyxQnu6mmuL+unaq1T5XfFwVK6XLGhgEzTPis0WQ00OdDPlak5rimeq8I/zdvstkB1BP8fbIseQwcwkLo0/EaNb/6kxZn7ZmnR2Hu7U8ckynQRXqrrbiHqYVUARkshhRWdf+P0YMyD5daGkvcj9EDCyLvXLkbeqClxR3L79RT5/qHz+jN8XKA== 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 Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) by DS7PR11MB6038.namprd11.prod.outlook.com (2603:10b6:8:75::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7316.21; Tue, 20 Feb 2024 18:03:37 +0000 Received: from DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::d10:3009:a8d3:1d2e]) by DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::d10:3009:a8d3:1d2e%7]) with mapi id 15.20.7292.036; Tue, 20 Feb 2024 18:03:37 +0000 Date: Tue, 20 Feb 2024 18:03:32 +0000 From: Bruce Richardson To: Jerin Jacob CC: , , , , , , , Subject: Re: [PATCH v3 10/11] eventdev: clarify docs on event object fields and op types Message-ID: References: <20240119174346.108905-1-bruce.richardson@intel.com> <20240202123953.77166-1-bruce.richardson@intel.com> <20240202123953.77166-11-bruce.richardson@intel.com> Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-ClientProxiedBy: DB8PR06CA0057.eurprd06.prod.outlook.com (2603:10a6:10:120::31) To DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|DS7PR11MB6038:EE_ X-MS-Office365-Filtering-Correlation-Id: 8837f1df-c681-4d6e-c8e2-08dc323e4318 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ogGhnRkncaijFLRM4zeXMYxWdw5fT+elrWzSTpdnB+YrIz4R+hVbEhLoOPd7VyVOWSBDmhpCjqYjk37T1oLRhbNeRMRl+7oHeAmPKfXPYo6AclSuM+MJKzzyBan5GADlxHfW/N5JieLZbX1PnGk3tdLi2UDtaFfDdUOmiecn2ilVdkUg0G2nApvM7aDekaJ0MzHUAyhRENrPY8GVl4Ozt44tDnboECdJg6z+8pbPY06cx/W+AC3ViOZrYpq4zrp45gRtyLokxwjk/R3eh1fETExw/7yt2qqw+UXcwfTBCiPlg7jL6eGvYWimFRJBxcsQ2/juQq0V8aVK16Z+cQJpkxSu8ChswyYo0UErmw8GGCXArHtHIoNrIFLA7k3ORo9tGz/Ba1qBSER9zfSs0wSX6YJQhG44P3YjLyLmAaI1RayYm0cPrtY9YUrTIsBi9/A6SgYefDbBj3Oky6x3B2cpnExyGkv5jw4LfliTtzA+4OgTdqG32+3T8XB3SFMw0rLpexem/7y0dHXjWIoc9u6uy/A/oV5MckIDNykjz1/8pQc= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DS0PR11MB7309.namprd11.prod.outlook.com; PTR:; CAT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1YQjBGY3VzWWcwV041NDZyMzdkTWw2bXB6bmlKSG5EenFnU2xlTjFR?= =?utf-8?B?K0ZFVGsxTHZUY3R4K0pFak5EZXN1aWJCdUtXWFJjMDZMN0l2RDAraVUrdEpa?= =?utf-8?B?RFRrKzF5YjdpUjRnVnJITkwwV2xRQWZtV0tQbzBXcENUMklSM2lpdFRMSnpQ?= =?utf-8?B?ZjhValFpQWVRV0k3MThvLyt2ZTErcDdJTktzZTg2RG9UVUJtQU9lMUlieThY?= =?utf-8?B?Y2xYSFhiU050ditYdzA1RTRnUnpJYTFkOTNiWnZpcWRJZW5XMDN1QXArT3F3?= =?utf-8?B?M0JtSno3aUxOVlFOMTVER2IyVGgzNktFOUMxMytkTzQreW05Sm1xUGoyRnRy?= =?utf-8?B?elpmM1hUTVJqKy9TWVRZZS96czQ3ZGtycUxPL0VRT2RqTytDVnE4ZGJDb0lX?= =?utf-8?B?VGdtV1N1dnJoMUFBbjRoL1dVZzFTT3JIMTUrTjQ3VlpUYzBDSmtjUExRdmJx?= =?utf-8?B?c0E9PQ==?= X-MS-Exchange-CrossTenant-Network-Message-Id: 8837f1df-c681-4d6e-c8e2-08dc323e4318 X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Feb 2024 18:03:37.7206 (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: 8DHKF7IQdVch/2Y5eamnLoHHfoNMmLAdZyrjL44pQkYW+96RQ2lx8ZzTFSXpWi+3kO5g5fcDAXT7FusgHyfmm0wFB9nd5DwIB+nsG/za9Ko= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR11MB6038 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 On Fri, Feb 09, 2024 at 02:44:04PM +0530, Jerin Jacob wrote: > On Fri, Feb 2, 2024 at 6:11 PM Bruce Richardson > wrote: > > > > Clarify the meaning of the NEW, FORWARD and RELEASE event types. > > For the fields in "rte_event" struct, enhance the comments on each to > > clarify the field's use, and whether it is preserved between enqueue and > > dequeue, and it's role, if any, in scheduling. > > > > Signed-off-by: Bruce Richardson > > --- > > V3: updates following review > > --- > > lib/eventdev/rte_eventdev.h | 161 +++++++++++++++++++++++++----------- > > 1 file changed, 111 insertions(+), 50 deletions(-) > > > > diff --git a/lib/eventdev/rte_eventdev.h b/lib/eventdev/rte_eventdev.h > > index 8d72765ae7..58219e027e 100644 > > --- a/lib/eventdev/rte_eventdev.h > > +++ b/lib/eventdev/rte_eventdev.h > > @@ -1463,47 +1463,54 @@ struct rte_event_vector { > > > > /* Event enqueue operations */ > > #define RTE_EVENT_OP_NEW 0 > > -/**< The event producers use this operation to inject a new event to the > > - * event device. > > +/**< The @ref rte_event.op field must be set to this operation type to inject a new event, > > + * i.e. one not previously dequeued, into the event device, to be scheduled > > + * for processing. > > */ > > #define RTE_EVENT_OP_FORWARD 1 > > -/**< The CPU use this operation to forward the event to different event queue or > > - * change to new application specific flow or schedule type to enable > > - * pipelining. > > +/**< The application must set the @ref rte_event.op field to this operation type to return a > > + * previously dequeued event to the event device to be scheduled for further processing. > > * > > - * This operation must only be enqueued to the same port that the > > + * This event *must* be enqueued to the same port that the > > * event to be forwarded was dequeued from. > > + * > > + * The event's fields, including (but not limited to) flow_id, scheduling type, > > + * destination queue, and event payload e.g. mbuf pointer, may all be updated as > > + * desired by the application, but the @ref rte_event.impl_opaque field must > > + * be kept to the same value as was present when the event was dequeued. > > */ > > #define RTE_EVENT_OP_RELEASE 2 > > /**< Release the flow context associated with the schedule type. > > * > > - * If current flow's scheduler type method is *RTE_SCHED_TYPE_ATOMIC* > > - * then this function hints the scheduler that the user has completed critical > > - * section processing in the current atomic context. > > - * The scheduler is now allowed to schedule events from the same flow from > > - * an event queue to another port. However, the context may be still held > > - * until the next rte_event_dequeue_burst() call, this call allows but does not > > - * force the scheduler to release the context early. > > - * > > - * Early atomic context release may increase parallelism and thus system > > + * If current flow's scheduler type method is @ref RTE_SCHED_TYPE_ATOMIC > > + * then this operation type hints the scheduler that the user has completed critical > > + * section processing for this event in the current atomic context, and that the > > + * scheduler may unlock any atomic locks held for this event. > > + * If this is the last event from an atomic flow, i.e. all flow locks are released, > > > Similar comment as other email > [Jerin] When there are multiple atomic events dequeue from @ref > rte_event_dequeue_burst() > for the same event queue, and it has same flow id then the lock is .... > > [Mattias] > Yes, or maybe describing the whole lock/unlock state. > > "The conceptual per-queue-per-flow lock is in a locked state as long > (and only as long) as one or more events pertaining to that flow were > scheduled to the port in question, but are not yet released." > > Maybe it needs to be more meaty, describing what released means. I don't > have the full context of the documentation in my head when I'm writing this. > Rather than trying to explain all again, I'm just going to put inline here a cross-reference to the text on RTE_EVENT_TYPE_ATOMIC. /Bruce