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 89BFB436D1; Tue, 12 Dec 2023 12:28:41 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 437F742DBD; Tue, 12 Dec 2023 12:28:41 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id A84694026E for ; Tue, 12 Dec 2023 12:28:39 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1702380519; x=1733916519; h=date:from:to:cc:subject:message-id:references: content-transfer-encoding:in-reply-to:mime-version; bh=WHjj5VeraAYtfclxlBDxNItOpvFK27xcN0MzZq4kDT4=; b=MKFtypiOLPdyeNceUxp0idcZI9uBJk6Yg4b/YJONk6ov5DezSOHBK4Ym 7N+DILuFPcLl6nPqoIIpiBDup3kQFikAKoPijGXuGHxdfKeoYfEiY1xwr IDtpFb7cUo+xY7F5dD+Zr5fI4J0XTuIrmK1Okjh0aBQ1xGM6Ypf/e0ZBT n4FIc5xCy82ZUsF3W32axnIFGVtn2CroWL+/ClLda2fkkCpN7IekHKbWH J5KfIU8R54L+NRCqpaB2fH4bu48t/pLLGXZcvnZdrg6FG4JR65Z2+Kcp1 miqHqHacMX90Lgg+0fb5onsNioGBh3iWv6oJcqkm1I+GurHIcICejZ4Vj A==; X-IronPort-AV: E=McAfee;i="6600,9927,10921"; a="459107505" X-IronPort-AV: E=Sophos;i="6.04,270,1695711600"; d="scan'208";a="459107505" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Dec 2023 03:28:38 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10921"; a="1020673091" X-IronPort-AV: E=Sophos;i="6.04,270,1695711600"; d="scan'208";a="1020673091" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by fmsmga006.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 12 Dec 2023 03:28:38 -0800 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Tue, 12 Dec 2023 03:28:38 -0800 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.35; Tue, 12 Dec 2023 03:28:37 -0800 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) 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.35 via Frontend Transport; Tue, 12 Dec 2023 03:28:37 -0800 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.168) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Tue, 12 Dec 2023 03:28:37 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HEIJPLMgBj6US/c1WDg/BL9DkqT2YNkKTg9fLbXWqRNfUF52zVEwUDhV44cOMWI60JN49zliqVw8Mnsj/ImmCHSpgD0O4SUBYPV54gKR87IM93XcqX0/TP8z7owRYlEBmMMtUbugXOafiRbM2r3iXGhAuD6L05UY2mqwI/dTImClWqI7z4NmUyQg2zivx8JAAkYFxvbBQfpNccRuxzCSw7n9mCnbIs3k6xRhRHUq4AWGOUVH7oEXo6NdH3JS8IJRdpmP72dkwoPWzW3F1kRYNI9EVeGGrdInTty5GXfA5pgwrvfwZjT1v5pAXe3LtEQM/N+1S3oaTlH9j80avLNAAg== 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=FcT/8Zbv7OK7zHTTwz4/SPluUyy+E9t1CYNtP2w4hXo=; b=Ycx+2ujf/DqNSgdz7S6JGE8CFZWfiU9zir7A8PVtVXRVw8eFRP6dYZBfk6AE771Ce5k/Oe6tEqwxCV/Z6FGSz4kQBFcQVFfMCRhiO2WAKzP14KIKh2hTXPCySH0RalD7gZ1yh588Z/eFnPaD8K7LDtes+0YfWLcdGnejhZfQ3GGlHrCJ/UPPqvzfMWIh3rCJV06dDFqzuraf6qsAjfyriB17ExJ4mwTiVDuMyw0pYeSShCIIkAgHSj/wS55O9FoQYDIZ8K1f0zQcLZNUFB5vRR5+RAPn/S9DgDeYtdEhMSVPOrqsAw7MXPHdWDrHRGeOBOd6P1UEoJPn9REqc85b9Q== 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 SN7PR11MB7973.namprd11.prod.outlook.com (2603:10b6:806:2e6::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7068.32; Tue, 12 Dec 2023 11:28:35 +0000 Received: from DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::4782:d54a:209d:cb49]) by DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::4782:d54a:209d:cb49%7]) with mapi id 15.20.7068.033; Tue, 12 Dec 2023 11:28:35 +0000 Date: Tue, 12 Dec 2023 11:28:28 +0000 From: Bruce Richardson To: Jerin Jacob CC: , Mattias =?iso-8859-1?Q?R=F6nnblom?= , Jerin Jacob Subject: Re: [PATCH 24.03 v2 2/9] eventdev: increase flexibility of all-types flag Message-ID: References: <20231120172606.505579-1-bruce.richardson@intel.com> <20231121115437.96500-1-bruce.richardson@intel.com> <20231121115437.96500-3-bruce.richardson@intel.com> Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-ClientProxiedBy: DUZPR01CA0188.eurprd01.prod.exchangelabs.com (2603:10a6:10:4b6::27) To DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|SN7PR11MB7973:EE_ X-MS-Office365-Filtering-Correlation-Id: 9f254e55-5ba9-4897-f6da-08dbfb057a2f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 3lYfl6CTCjQZbX6ZGLVLDdQ5qTOZM0j5Fb9RQWPc4bdzbZDg4TvldKdFe8ONS6CzqD+elz5jeNl6jGGGxL+ub/Xx4PdlpD+Fc85x/k6gRsxmIFaREHiiyhenRuO2/gFP4cevSWJTLQvFGMwNenQ4NaY8tgVSBVJL4hm4X//8tdUgBuVtBxKYVjSWrW9vHdygUub/rgVSfR1bobYIko5ctaeBgxPRp7Vc/G5mG0GKElBerc++qR8JKcGeFToOfA2chfuG8S2FtmjHQUsRRJcw06sVA/UqdZz0d2CTjqs55ldkkH3SdkuWKGuTEZ+QQ3APOJGPy9NCkxGHMzgoXOyMCUxsmv549XWAvcmDoBQU0itEcj/nQlZbD84r0Odyjy9HuXX4TalPJRDWkl11s71MOBaABVhb1RvQClXpeOMmGg6APYLpNm5BOGYYqJfbYMlwhNCzbtTySwsMvaV/6SX5Xv4E/w/bsKIIqMUICas5X/3GXlRWsOgzlLQl7EjiNnLBxohM8Guy1VlDy15u58+KvYMiOLCm41KBtK5GEx9CxU4xk1PNSS+hxIQ+1PY9+rbQ 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:NONE; SFS:(13230031)(136003)(366004)(346002)(376002)(396003)(39860400002)(230922051799003)(64100799003)(451199024)(1800799012)(186009)(41300700001)(38100700002)(2906002)(44832011)(5660300002)(316002)(4326008)(8676002)(6916009)(8936002)(66946007)(66476007)(66556008)(54906003)(82960400001)(86362001)(6666004)(6512007)(478600001)(26005)(6486002)(53546011)(6506007)(83380400001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?ZkpHcDQ2dG1ZeFQ5OVdpWFdmS212YXVpZzNSSlRkb1AwU3p6Q3FPcncxQlRH?= =?utf-8?B?ZjBMdS95NjlNWEZBVE92aGUrUHhyU216amdnV3JSRTlRbUtzb0ZkMmNUMzV3?= =?utf-8?B?QVJhQUNORVhBeEtGOTJsVERSaEpKUkpHWkZpYVh5UnVkbk9zVExUTHR0cmV1?= =?utf-8?B?eENzbU1USUJlR2plNTFzclJxcU9NV0lBMU9ER0FBQTNxY0dwVXR6T3VuL3Jv?= =?utf-8?B?d3dtMEZjTmtObStlYy8yTVpLR2VTd2kwbnVTNEdFSkNLRDZwMFlnUFlVODha?= =?utf-8?B?WVBZTkZva3Vybk9pUGVWakc1R2dQL1cxOXZlV29MdzhRZGNBQS8yaCtLTTEz?= =?utf-8?B?VXdqdU5pL1VwUnJweS9oUWxzeGlzQUlnU2JBVGhZZU14L1g4SFNVT3h0Mkd5?= =?utf-8?B?U3hPMGN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ba9-4897-f6da-08dbfb057a2f X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Dec 2023 11:28:34.8580 (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: QnlDldwEb12H7Hqw5zpesk+LeffJ1UOCfOWGDGYKkdnfRcTplauM2ps96uSXS9YYhtlm4+iATii5EVU/MQRXbs58ob8sZRIDFa7rCQG4BSE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR11MB7973 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 Thu, Nov 23, 2023 at 09:37:58AM +0530, Jerin Jacob wrote: > On Tue, Nov 21, 2023 at 5:25 PM Bruce Richardson > wrote: > > > > Rather than requiring that any device advertising the > > RTE_EVENT_DEV_CAP_QUEUE_ALL_TYPES flag support all of atomic, ordered > > and parallel scheduling, we can redefine the field so that it basically > > means that you don't need to specify the queue scheduling type at config > > time. Instead all types of supported events can be sent to all queues. > > > > Suggested-by: Mattias Rönnblom > > Signed-off-by: Bruce Richardson > > --- > > lib/eventdev/rte_eventdev.h | 15 ++++++++++++--- > > 1 file changed, 12 insertions(+), 3 deletions(-) > > > > diff --git a/lib/eventdev/rte_eventdev.h b/lib/eventdev/rte_eventdev.h > > index d48957362c..1c5043de26 100644 > > --- a/lib/eventdev/rte_eventdev.h > > +++ b/lib/eventdev/rte_eventdev.h > > @@ -250,11 +250,20 @@ struct rte_event; > > * @see rte_event_dequeue_burst() > > */ > > #define RTE_EVENT_DEV_CAP_QUEUE_ALL_TYPES (1ULL << 3) > > -/**< Event device is capable of enqueuing events of any type to any queue. > > +/**< Event device is capable of accepting enqueued events, of any type > > + * advertised as supported by the device, to all destination queues. > > + * > > + * When this capability is set, the "schedule_type" field of the > > + * rte_event_queue_conf structure is ignored when a queue is being configured. > > can we also add something like below or so to above line > > rte_event_queue_conf structure is ignored when a queue is being > configured instead rte_event::sched_type > shall be used. > Preparing v3 now and including this doc change. However, I'm also wondering about the correct behaviour when this flag is not set. When the flag is not set, the events enqueued should match the event type of the queue, but do we need to enforce this, or should we? Couple of options: 1. Actually enforce this, and state that it is an error to enqueue events with another scheduling type. 2. Explicitly not enforce this, and just state instead that the sched_type of events will be ignored. Personally, I'd tend very much towards #2. because: * it's easier for the app, as they can ignore the sched_type field through the pipeline if they want, relying on each queues type to do the right thing. This could be especially useful if they have fallback mechanisms to e.g. configure a queue as atomic if reordered is not supported etc. The downside is that for portable applications the sched type should always be set anyway, but the app doesn't lose anything in this case with #2 over #1. * It's easier and more performant for the drivers, since it's one less check that should be performed on enqueue. The driver can just blindly override the sched_type provided with the queue config version. I actually think an extension of #2 would also be nice to have for portability, whereby an app could explicitly configure a queue to only have a scheduling type - event if it's all-types-capable - and thereafter never have to set the sched_type field on events. The drivers would always remember the queue-type and explicitly set that if necessary on enqueue Thoughts? /Bruce PS: Going to send v3 now anyway, based on feedback thus far. If we get quick consensus on above, I can roll it into a v4, otherwise we can look to clarify that situation in a separate patch later.