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 AD5B742634; Mon, 25 Sep 2023 10:00:08 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7F679402CC; Mon, 25 Sep 2023 10:00:08 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id 100EF402B7; Mon, 25 Sep 2023 10:00:05 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1695628806; x=1727164806; h=date:from:to:cc:subject:message-id:references: content-transfer-encoding:in-reply-to:mime-version; bh=Wa5FG1WAVBfPWLs07fM9i4PwXmGouQDqaGPxLxMdE/8=; b=UiA/sAQ7m//YNSwGnY0GRoM6umNNXPoxixKR95TAgmTA6fugaf0xnBhX MFvF+ScdzfiVqu11ZGLH9KVkDzYjkNPbPTJlDV7dh0nqg8RsRehEe30Co v/3CtDME0AS/wRkLJ1PQzFBhZ3P9lXtSZdFCh7Q3Ix61weT/OEyww0fQ2 CUumLc7kozPmiKdYRvgKNBwEgyH98Y/nmaSUPxUUixjuVhgZXl32l//DX 6/Ik4Mw8LX68usfWQZifYC99EFq0HIO+r5R6HHfnCnnukUUBo1yhn5w0S gz94dJRkRTjk7WN8iw/WdKmk9wAyEq7BcZC1TWD+m4GdYDy+PZGWqDiJC Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10843"; a="380067861" X-IronPort-AV: E=Sophos;i="6.03,174,1694761200"; d="scan'208";a="380067861" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Sep 2023 01:00:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10843"; a="863774467" X-IronPort-AV: E=Sophos;i="6.03,174,1694761200"; d="scan'208";a="863774467" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by fmsmga002.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 25 Sep 2023 01:00:05 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) 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.32; Mon, 25 Sep 2023 01:00:04 -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.32 via Frontend Transport; Mon, 25 Sep 2023 01:00:04 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.176) 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.32; Mon, 25 Sep 2023 01:00:03 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=d+QJ92ILCjs4PNoMqEVmP6Fr3VS8FNdr8W6EDSUz5DScYYbYaB9KihHdX9C8xw6QYUTeQKAi9JOgVRJ8Vv3QNQT/cS1vpUxbydOlOSxLpl6uk1LsaMKwjmRoCeC9kSU9Vbr33z1RDSJdecLeRfoBQ4DQsOo1T7d9YchK1WbfapVAY5sidK/8dg0RdnQsE9PElBAtCYDg5OmxROVzMh2rg7D+0ppAweR/tPnAyodUzZrcxBze9EF3CbfZvjC5KOKrcejnIG0KcWwIPM7PmoX/7Jz+5SilpBXeRlCecvTbSGFsqVIIKQMXDMAFlVbiPmGSLVIGmogPX0fOt2Gi/pjsNA== 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=3JT424tQMmYgslmnYYDW5zKAZ/CAV7ZRi15VNDJsLEw=; b=n+NMYK1ixCi4TJpZf+vSriT+R7mxXKDz/Pet2HAoaHs/lUJa300Ns82nwZ4pnq8uIr/SYRfy9syvTWa+0NuFzH9e85lskLdrDqBgf6lMGvzcXGshVAbb2i6okLnZQH0UNqdXPz0zhh7QJcaoQ5iuRlsMJQ25WBNeTw2W9u8/fbHX96yJB9Byrggo3uhOlH+rEQn/hN0GCsNN3R/ZPy/SAQCny1xr8cbRxem3SHS/rbUkxxU8Juz3K9BzGF2pTqnJopdbhf41Xa3+AFJqNusn/pOoFw6d7wj+MavqtODUecZtetFoP1/0ekELph7NGBcvy3PrP0/jCnOzbuPZoQybCQ== 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 CO1PR11MB5172.namprd11.prod.outlook.com (2603:10b6:303:6c::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6792.28; Mon, 25 Sep 2023 08:00:01 +0000 Received: from DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::43d1:af60:464:347]) by DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::43d1:af60:464:347%5]) with mapi id 15.20.6768.029; Mon, 25 Sep 2023 08:00:01 +0000 Date: Mon, 25 Sep 2023 08:59:52 +0100 From: Bruce Richardson To: Mattias =?iso-8859-1?Q?R=F6nnblom?= CC: Mattias =?iso-8859-1?Q?R=F6nnblom?= , , Jerin Jacob , , , Peter Nilsson , Heng Wang , Naga Harish K S V , Pavan Nikhilesh , Gujjar Abhinandan S , Erik Gabriel Carrillo , Shijith Thotton , "Hemant Agrawal" , Sachin Saxena , Liang Ma , Peter Mccarthy , Zhirun Yan Subject: Re: [PATCH v4 1/3] lib: introduce dispatcher library Message-ID: References: <20230904130313.327809-2-mattias.ronnblom@ericsson.com> <20230922073825.351453-1-mattias.ronnblom@ericsson.com> <20230922073825.351453-2-mattias.ronnblom@ericsson.com> <00d5595f-11a2-089f-f563-3d1d75df27df@lysator.liu.se> Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <00d5595f-11a2-089f-f563-3d1d75df27df@lysator.liu.se> X-ClientProxiedBy: DU2PR04CA0027.eurprd04.prod.outlook.com (2603:10a6:10:3b::32) To DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|CO1PR11MB5172:EE_ X-MS-Office365-Filtering-Correlation-Id: 4f7c6819-7199-4cb4-ca8e-08dbbd9d6b1f X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: UD2Q9DGFuSf8FAqyXGcmDptUW1oN0WWUVrxPYPnvSTFENybwRi7Y3ibRhq5inmYWqOTtnLMJuf2bvDJPwF/IhlwfEzJAFkA1Ct0envWHPtPltpAMjlFEyBYiQyaYMTMOhYUeim6z4Yt8iOA1tmEyWhX6nbcMe017LezDyyX7YEpWn2eObFotE1wDBfFerDx6ly0wGZUdPpE58YnVjxZWDzDV6TQm5dYzPOj5aPtUSVWv79ammSoD1zRgndzvsKx/U4pFg1lTowkQ000mvZbP+1admT6nODY6iQ8HHXJDfVxjr/TzKCtTqp2D2JjaxGTa05c8GZ0y0s2PsiBHxcyIqjwaNl2PwioqrwXsKfZdqnT3ggA8mQabOxNdVC+/8r44GHrtrW3EjE7m51NsHUrtovh+7sLPK+LWP0OzXMTxK780qSUsllrHQyuhL3930k44PkCNyUaVr7r5xcdcD6KtA84bD+uK40FI5jah1HYR7sfGPUUEBCoRbihvjdLMsgYX1tGPwqIRHuu3zrvhrnYr1SC8EDK5T2K2rdEoPky4+/RxSLVoaucsBYjyHXDU314rJlEcCriQLMIxUBstf4wYzzIYuGq9NQH5qlQX+5zkXvQ= 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)(39860400002)(376002)(396003)(366004)(136003)(346002)(230922051799003)(451199024)(186009)(1800799009)(2906002)(7416002)(44832011)(5660300002)(478600001)(41300700001)(6916009)(107886003)(6512007)(316002)(296002)(54906003)(4326008)(66476007)(8676002)(26005)(8936002)(6666004)(6486002)(6506007)(53546011)(66556008)(66946007)(38100700002)(82960400001)(86362001)(67856001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?iso-8859-1?Q?unxmSAf+wqgHGSTAMslrL95gse2kQ7AnmYDalRJEpIGD94s4DbyiRd/v44?= =?iso-8859-1?Q?t6WQvxIUJJqQga2iJdW6Wf3SAWzxQUkcotux9l3/cV7YXRNYEeO6aZhHPB?= =?iso-8859-1?Q?/KJfgaTKV5jLfA4DChjdvmSg6RwxZial3tRNXWA9xK/qGyAcNkp4BV1hin?= =?iso-8859-1?Q?D3bVwIlq5+SLlpTX5y9HPHgJ6+AUvMiKySV6JweSDNuKzmnFSi0LQnaEdg?= =?iso-8859-1?Q?e4wj/S1V5GplkqsnCFQjxlB3Kdp3QjgPw3ubjOIZPDKVDCPXBTG0EURagK?= =?iso-8859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3L7KOgAV4kKZ?= =?iso-8859-1?Q?/lR+NQ7mVgBaKyVTLQzFGIA5LfV6vOt6+uxQE6Qkr7QPreHxVKYC4+Cht+?= =?iso-8859-1?Q?D7Q5+kNabxvRSAlilmtyyOvdeX+tJdQVYeTY5jKrcjd/Iddi/wwuMmZ2Hl?= =?iso-8859-1?Q?g+GwHFdxsycdtsZK8vFsuS2g1+24uKF1X8OiMNL++k9hRSHRo2sqkjs3Os?= =?iso-8859-1?Q?y/1S3J8WHkZ7XqPQ2+s69DhZC8pYKxiFGzUTXpWElMofKHw2CZHwsv2h0O?= =?iso-8859-1?Q?DTVuc8dR+M4gG9iFEWTX5x4Ots51CwPvN0+wlJxOsDsQapU45MgviIMZcL?= =?iso-8859-1?Q?1tbTMWFR41ldcvzhZbname/x1aE4xAs1500evIAo1B5kahemTj9kShB9zo?= =?iso-8859-1?Q?Gcj+SaUIy5yHNVe9qeGwF02h3Z2Ynw+Wi39PhPI7Oy+soKHaVkuI9AWZ5N?= =?iso-8859-1?Q?q7proL4Lc+TyDU7h6cautp23adHiu78+k13b0zWEqw3LglrwC9358VbA?= =?iso-8859-1?Q?=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 4f7c6819-7199-4cb4-ca8e-08dbbd9d6b1f X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Sep 2023 08:00:01.0317 (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: Eakl6k3TdajbfMekPeJvK0s8xViHycXc+pAeW1WsGgNDU+uPUTBEkylH8cEkE7Phqeczf4bGxj+HPFZyh8gsFwh2UoAw9ydxrWcUaIcbEJo= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR11MB5172 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 Mon, Sep 25, 2023 at 09:11:38AM +0200, Mattias Rönnblom wrote: > On 2023-09-22 09:38, Mattias Rönnblom wrote: > > > > > +int > > +rte_dispatcher_create(uint8_t id, uint8_t event_dev_id) > > +{ > > > There are two changes I'm considering: > > 1) Removing the "id" to identify the dispatcher, replacing it with an > forward-declared rte_dispatcher struct pointer. > > struct rte_dispatcher; > > struct rte_dispatcher * > rte_dispatcher_create(uint8_t event_dev_id); > > > The original reason for using an integer id to identify a dispatcher is to > make it look like everything else in Eventdev. I find this pattern a little > awkward to use - in particular the fact the id is application-allocated (and > thus require coordination between different part of the application in case > multiple instances are used). > > 2) Adding a flags field to the create function "for future use". But since > the API is experimental, there may not be that much need to attempt to be > future-proof? > I'd add the flags anyway, if you can forsee it potentially being needed. For something like create it could be useful, and it's not a major overhead on the user to add an extra "0" to each function call. Just ensure it's checked for zero inside the initial implementation. /Bruce