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 BEA7343A4F; Fri, 2 Feb 2024 13:02:58 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4F776406B8; Fri, 2 Feb 2024 13:02:58 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.15]) by mails.dpdk.org (Postfix) with ESMTP id 17242402BF for ; Fri, 2 Feb 2024 13:02:55 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1706875376; x=1738411376; h=date:from:to:cc:subject:message-id:references: content-transfer-encoding:in-reply-to:mime-version; bh=NyXQPBdzpWAEYumvIVh8726Q2RDjMOWbMTVmdkTCywc=; b=Xv0sRhYj8btxoAR+I3ljrViN94uVfIQ2+1kDXyvCQ5TxqnvY5aBfMlwg htK1Bs3egZ35D71odvL7n4dOitRzTze6fq9/QkAlgrU+8wPkMH+CZG5zh xrrYrWgUC+cPU+FgqMQ2tp7X6uRnyal26pBcTdCS/1mVehFMCEmLdyDQa yX6l2ZW7Unyz807vVd4ETkeYhzxZXLvVOqjaapUOA/LbKh5IIPXrqkLdE I+rHo2euJytSoJY8XAW3yl7Kmc4CxfVbk04YRkbuMraNIbA6ZeLQIK5Aj BKXjirDytkfzs7siLpizT/p8fZhVBditaqexdUUGf4qKHmwQY0ucI8NKh Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10971"; a="4044537" X-IronPort-AV: E=Sophos;i="6.05,238,1701158400"; d="scan'208";a="4044537" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by orvoesa107.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Feb 2024 04:02:55 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.05,238,1701158400"; d="scan'208";a="4655011" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orviesa005.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 02 Feb 2024 04:02:55 -0800 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) 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; Fri, 2 Feb 2024 04:02:54 -0800 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) by ORSMSX610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Fri, 2 Feb 2024 04:02:54 -0800 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) 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 via Frontend Transport; Fri, 2 Feb 2024 04:02:54 -0800 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.41) 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; Fri, 2 Feb 2024 04:02:53 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=D3CPtbE8t2UtgFzwYsZ9vuZwQC1XS6ISADg8lGeiR0rY6xwHwkyanqT4xns3IgPp+C1IvaSa3PxV4y7OvlnyJq3qAsNLYJSevwGxSdUddhaZWJD7PBCPcSwvvNIsMms3yywcrtUOVZyePqN1q3lgBlfHxgxzhzcPbKx9N+Hfzflv2iObc6NprvTsCKPh0XDx09A+yHAFtkUkQkYR2yFDaHwbNJfwnU7O5MDDqGd0O0rkAdArLBboj9phoC5UWRhHnqe4dy/5Y347gUa3nWRXg1LjEjRH9QeBX/DQuqa43othFLBwToOSyJNHnohcOjhP3vr1dlLXpmcsImEjR4ZuFA== 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=Io7lt94qiuB25smLMdTF0Y9P6URzaQ4BbxPqldC4M4g=; b=hoQgMsr/0Np7opkFbIm49NRvH4x3vT9aB+bRaodOCQhy0zKtfLiKIrqPva2D4ye1HG4wot+wt52rS0OfCiVJYgVE2vjCi/9E8BKf37mfadnEmgy3Pu3FnzgkQUJRXaKLZdEzSH9R9oAaSwSBPuGLQ3nDYlYA3jmu1E7HO5ozOk+TByyNQkGnnrfXVOUifDPgIcMG+B2L+Kcz3Tmd8UxEGF50+i3CmIZbj5w2uxuETB0tP9hg9Y8XddBpXvai8DHVZZtd2mBrxSxH0MDaNfmOFufqimoXPZR1baicyqQMvfL+ev9sM9o7Vu0KoYW3CwbosvYSO+cW+qlOnQZxt8elvA== 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 CYYPR11MB8387.namprd11.prod.outlook.com (2603:10b6:930:c8::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.31; Fri, 2 Feb 2024 12:02:52 +0000 Received: from DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::df88:b743:97f8:516c]) by DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::df88:b743:97f8:516c%5]) with mapi id 15.20.7249.027; Fri, 2 Feb 2024 12:02:52 +0000 Date: Fri, 2 Feb 2024 12:02:47 +0000 From: Bruce Richardson To: Mattias =?iso-8859-1?Q?R=F6nnblom?= CC: , , , , , , , Subject: Re: [PATCH v2 11/11] eventdev: RFC clarify docs on event object fields Message-ID: References: <20240118134557.73172-1-bruce.richardson@intel.com> <20240119174346.108905-1-bruce.richardson@intel.com> <20240119174346.108905-12-bruce.richardson@intel.com> <211a59b9-095d-418e-be82-b49f4e5d1d00@lysator.liu.se> Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-ClientProxiedBy: DUZPR01CA0028.eurprd01.prod.exchangelabs.com (2603:10a6:10:46b::7) To DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|CYYPR11MB8387:EE_ X-MS-Office365-Filtering-Correlation-Id: fb98fa72-dd3e-4918-7227-08dc23e6e210 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 3SeDNTm9WspLqnfSzkHFNjXFoxHt21Yw7am/xRIl2TcLgdZZXjInEdCrdW9qX8bDnEUHDXhGq3mrs0SwkpU73qu53g5sBiBItsJUuJQ41EYfcFzlW26qX7ZUnv5fxytkL3m75HMGleugyZhUt2OV/ro70sfp04OPjm4Jfax9NKJeEHA4vFEGs/ka3dMJulwo3I9S1MnKWp+5wMJbXZflNXHSgvqdvdsNYZ+Dkt8NyD86x3vfO8RPYl6sl+CxzhfodZZoM7fmJ/kitjltp1klkQNsC7fG6yUs2ipnnDqic/1PCmxijBWXs9/m7rMkTYBWL+YtrAp88nJcq0/BGhembACMcI26SVaDWikdLX2H3YIoErkHQ2T2mt0C7kY054kIhqSEvCLwr89uXIasTr9wycvqVRtbb+D0NuKfh3bId4GIRXnnTwMqFLWIH3gCTH6VLukwaxUFycYnCV8JqTEfOEAewE3PMpo/3wiCQERTXymFUP2uwBhMKqbOa1C8uY9D9DXwYmMEFwUC6K+q139GyQcd3FEN1TV9N6HykwSyp0mDgVSlwBWgHoOcsEucHzd1 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)(396003)(136003)(346002)(376002)(39860400002)(366004)(230922051799003)(1800799012)(451199024)(186009)(64100799003)(86362001)(44832011)(4326008)(6512007)(2906002)(107886003)(26005)(5660300002)(41300700001)(66946007)(66556008)(66476007)(478600001)(6486002)(8676002)(6666004)(53546011)(8936002)(6506007)(296002)(316002)(6916009)(82960400001)(38100700002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?iso-8859-1?Q?Ac+DeqoTeMnW57AQsAdZ6saWTmLSllQGC+ThmevVwjyIu8jCiRyPcOLwwr?= =?iso-8859-1?Q?0w0dnBvSRG6MycV/EdKmNhXlvIWBLPoTlK5sJcNYnGlPxdassR8+mios2f?= =?iso-8859-1?Q?Y3NavnuvslY/yFGYmyrQLk+m3tAKeu27PooetRx/V6+GWj9eL6QG5XZHEd?= =?iso-8859-1?Q?aJye/ugtdFqwF5TixT0Z+lmuCvXGKqN/EOVELLJBq1UzlMzN5VN/6QUonP?= =?iso-8859-1?Q?39e9knq1n3RfUKNMUbhevF4hoAGYvuUjvU0FfIcsLpqulvdRg4Tlps61rp?= =?iso-8859-1?Q?TC0pC3rWXqFFjfcDWHna0lpRXQ9zo4o91bhowqiHLQXpkApyUJCLAKKZjV?= =?iso-8859-1?Q?TD6aQsI1b4HB+bcYveS4ezRW/9p5m7CymxVjfmN0YRz85u63RrcPXubpKe?= =?iso-8859-1?Q?nXpRxH0b2uGz/vcqR2keKvR9onW6ggkjltulna9WAeq1pa1uD2n/c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g6P4Oetkow72rdg3pIsUQXvHpi+d+lcthS8vlyfrxXsJU2Ne?= =?iso-8859-1?Q?lkOvxmN6+ttZY7U+vshdlllTpWXh9UkdzoIOV4iFV2Iz4EmMqz6fzu4+s7?= =?iso-8859-1?Q?GtIg7zq7oXTfImYCboH2JU1d5+ZNWTWESVj/hvEv1g8fuoeBlCQOdW3ZU1?= =?iso-8859-1?Q?vTqpbVjv1H9s0GMEBEu7jzGp7Saq9FmL5p3VolzdKdWPzn6f3eHQsD8Ps4?= =?iso-8859-1?Q?AOEPvYAIT3iY8y3vI/LALwvfAXyl8owRvO3m6Ng8a4YMX1mpGBHYfQs3HB?= =?iso-8859-1?Q?e+TI3KcgP/t6n2g+Uh6br/gRq8XO6/ZvIcv4uaPutn0dNEoEjO2I2QUw?= =?iso-8859-1?Q?=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: fb98fa72-dd3e-4918-7227-08dc23e6e210 X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Feb 2024 12:02:52.3729 (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: uPkt65kjSpBXZs1CoBxens3jsyX8bQOvCvA46mVlLVkbb3AS6/ptD9ewLdGZwIiSNT0C84cD/F5PKN5yw09Rd7MMxCGIwhr+507TVgO9fKA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CYYPR11MB8387 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 02, 2024 at 11:33:19AM +0000, Bruce Richardson wrote: > On Fri, Feb 02, 2024 at 10:38:10AM +0100, Mattias Rönnblom wrote: > > On 2024-02-01 17:59, Bruce Richardson wrote: > > > On Wed, Jan 24, 2024 at 12:34:50PM +0100, Mattias Rönnblom wrote: > > > > On 2024-01-19 18:43, 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 > > > > > --- > > > > > > > > > > Is the normalized or unnormalized value that is preserved? > > > > > > > Very good point. It's the normalized & then denormalised version that is > > > guaranteed to be preserved, I suspect. SW eventdevs probably preserve > > > as-is, but HW eventdevs may lose precision. Rather than making this > > > "implementation defined" or "not preserved" which would be annoying for > > > apps, I think, I'm going to document this as "preserved, but with possible > > > loss of precision". > > > > > > > This makes me again think it may be worth noting that Eventdev -> API > > priority normalization is (event.priority * PMD_LEVELS) / EVENTDEV_LEVELS > > (rounded down) - assuming that's how it's supposed to be done - or something > > to that effect. > > > Following my comment on the thread on the other patch about looking at > numbers of bits of priority being valid, I did a quick check of the evdev PMDs > by using grep for "max_event_priority_levels" in each driver. According to > that (and resolving some #defines), I see: > > 0 - dpaa, dpaa2 > 1 - cnxk, dsw, octeontx, opdl > 4 - sw > 8 - dlb2, skeleton > > So it looks like switching to a bit-scheme is workable, where we measure > supported event levels in powers-of-two only. [And we can cut down priority > fields if we like]. > And just for reference, the advertized values for max_event_queue_priority_levels are: 1 - dsw, opdl 8 - cnxk, dlb2, dpaa, dpaa2, octeontx, skeleton 255 - sw [though this should really be 256, it's an off-by-one error due to the range of uint8_t type. SW evdev just sorts queues by priority using the whole priority value specified.] So I think we can treat queue priority similarly to event priority - giving the number of bits which are valid. Also, if we decide to cut the event priority level range to e.g. 0-15, I think we can do the same for the queue priority levels, so that the ranges are similar, and then we can adjust the min-max definitions to match. /Bruce