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 A7C92432C5; Tue, 7 Nov 2023 10:50:42 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 419D2402BC; Tue, 7 Nov 2023 10:50:42 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id 534994003C; Tue, 7 Nov 2023 10:50:40 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1699350640; x=1730886640; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=y9x6pJjQySU1Rw6WBe+AsBoMTS+1wxzMVj+FpJwA8Ys=; b=Di4TLmzePSvHdpxZ+XFIoXtmCN+8rkKTxzygQaufeQRIQ8PuUPvaaF2m DXsfjL//4ZFkx43AvIuzpu49TBtjtVb2k5O1LABV6GMIh0UHxFXAZWe/d 39RNI/ByE8w2KGB82zwxQca+mzi3enmRaNcaMmWyD+MREXQRbXMhY7jUm yvRXjWQwRnlMznwx8wBNQhGfaNHgZfbATmqoCdqK4PW76pL2RftCiBM8o Y5cPr9/oy08JY5EMNQrcVuAsiOAzkgtidJjs+wXVnWhLGcSn2hiwlojCs 0vHg/p/nOFrl+rVJOusIyt4MT+FfFxYHSfcU2fr7U8xkmoujpC3hme8XI w==; X-IronPort-AV: E=McAfee;i="6600,9927,10886"; a="420579481" X-IronPort-AV: E=Sophos;i="6.03,283,1694761200"; d="scan'208";a="420579481" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Nov 2023 01:50:38 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.03,283,1694761200"; d="scan'208";a="10355814" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by orviesa001.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 07 Nov 2023 01:50:39 -0800 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Tue, 7 Nov 2023 01:50:37 -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.34; Tue, 7 Nov 2023 01:50:36 -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.34 via Frontend Transport; Tue, 7 Nov 2023 01:50:36 -0800 Received: from NAM04-BN8-obe.outbound.protection.outlook.com (104.47.74.41) 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.34; Tue, 7 Nov 2023 01:50:36 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kdK45BvPzjrA48bYLtZKCA96CdUsndWj696p3J5ajscFmieAKbl+lK2r4e8wzm3T4PzppYKPM3xRqhDWOGhuKzG4Oo8cepz/gT9w0umLVeuaVkawibUJ5lNp+C5+0u1DwmhQN8vg6Qm+1grjsKM0oS2JxjbELxmrJc8xwVvYwpHqcH/hxf2SyrpwnOSEi1DloVOLdAKGZq/v4O/uDVscVjrLfCiSb4QCCVeHrms3vfC81sP1JQ9UGfnxtSg9yaiyvTzmfgF2/ujlIJSlxp96dw2dPDHgjfurkfitymbEVCRZJneAtu1l8fTZ1XqV6IkPFRPYweGT8rdL0bg1uFGREw== 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=TQ8obIETqZsSV/9EqWMXeH38w/0QcB8kVEGGB2QNSaw=; b=HUp9M8SRhy4pg/60zSyedFIbUzd+8KCwHmtItQjoXV4bOmP5IPaJJ/BKSmUdf4LXs+VfRlmdTVbznzI/Xq9GkdcLAlbJKkZmldE7hUG1Wk7JX0D6IBnHbtKRiIsx29Evj6YypJP+9fFcwY0BFC8sQ4sQiyW+Jbrn+2V0IyqLkeO2Zq6idjAVdf+qeZTYZk4h+lxsUSKfUbx0Cj7eucoL9DpEDROYv3Rjo+3CS+peOawrRx+X7QWQPSUSqIVrQJ5nZqrRjeSKiULRkmn7PybVVImUOLkt5iYB004XgSF58fFDo4uZlbRqBzYtszl3ijFpc7EGLrPfrPG2doGRVaxqwQ== 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 SJ0PR11MB4847.namprd11.prod.outlook.com (2603:10b6:a03:2d9::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.28; Tue, 7 Nov 2023 09:50:29 +0000 Received: from DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::8645:d921:ce8a:12ba]) by DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::8645:d921:ce8a:12ba%5]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 09:50:29 +0000 Date: Tue, 7 Nov 2023 09:50:25 +0000 From: Bruce Richardson To: Konstantin Ananyev CC: "dev@dpdk.org" , "techboard@dpdk.org" , Euan Bourke Subject: Re: Updating examples which use coremask parameters Message-ID: References: <152ecf4d5e4a4b78a9bf91ab78234532@huawei.com> <8d2ceeb3b16b4467ac98942d8067d736@huawei.com> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <8d2ceeb3b16b4467ac98942d8067d736@huawei.com> X-ClientProxiedBy: DB9PR01CA0022.eurprd01.prod.exchangelabs.com (2603:10a6:10:1d8::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_|SJ0PR11MB4847:EE_ X-MS-Office365-Filtering-Correlation-Id: 186d87f1-9b00-46b7-f27a-08dbdf76f9b8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 54CyCWDYpR3JoZkhklGVjKwqEvMIjveFeVIZkLOlv3RmdF9jqmg+mAmzCGMricxRKUEqbT8inhAtB7IqjPVNln8NHgVfW2JeV4hEPW44WobdZdUuWrSu4HYymctfWogt8IqA6etmRsYJIV6SizdyLAjByr3Y8cRt+FCQFHHrVVPRrl2KGMjDPyfUYKDHChLMhBm8N/DesY2YJ8gzyWShovqT6Ix4rxOLueYa9oeCBIUfJx1TMWZFRy045P1GgaUZpgj9qbCe0QOY6BHXel8CI+tWOeNVNMboypql2Rwrx22esqSJSXja/yvS9GU/3I4Pqq6XJGgAg9tNUgdYYRRRK+qRMwXKTMJrlMS3+Q9HRQmSPYW9A0juOB5LJhTcoclA3Egn0kriNYrGS5qv1bjbkvj52dSQezQw2jeb0Ij5AtvYpaeSPNXbzV6Wj0x+uKCVghlyRpC5cqB8uw+ene+obGnu0ZkdzSev0nqsUqc5WJeo+Dov5h0j+e8fYCCLpW4uQiOvC68/9xKh32FR1ZSow4YBgZUZdwqnDa4cjp8I2EHCWN9WfvENSeRkfbutSKm9 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)(376002)(136003)(346002)(366004)(39860400002)(230922051799003)(1800799009)(186009)(64100799003)(451199024)(107886003)(26005)(6512007)(41300700001)(6666004)(6506007)(8936002)(83380400001)(8676002)(4326008)(6486002)(44832011)(2906002)(5660300002)(478600001)(316002)(6916009)(66556008)(54906003)(66476007)(66946007)(38100700002)(82960400001)(86362001)(66899024); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?rzi+AW26nx0iuRvkLcBfGnxi1HehXwP/ZRyQ9+iezpcNByC49oSiNePKHYm4?= =?us-ascii?Q?JRNNHyKhgHt/Afq0hinYmJRPTFUnqHyxSeMH8Jy8aGP/Bag5UkPElT40Kc52?= =?us-ascii?Q?mRKW2Ea67lCCBoNYUY9rDghCDw4/3RFoZhOj6Ftaf8KahnjphQIYzGNhOVOR?= =?us-ascii?Q?8aPqRzmZeNsqMAG+HaWGg1YLay7rChbGiNpnd4T5DBXfyANuyPrUkdz1gv2L?= =?us-ascii?Q?Nsajw/awHCrPzzQHs5GJoxBdPxhSls9henLVODcwquW4P1xke+xMSC429X5T?= =?us-ascii?Q?CYoiRzvT8YRb8AAOPjFILa6ZCOgpWzENuivp03SpDFyn61Sa/GPf2UhNMId1?= =?us-ascii?Q?mPAfqbd1nlMsHqeAF+03q6Q0aJ9EV5wOMfVITXqdA+WmcJo5d/IMufiwG7TP?= =?us-ascii?Q?Rbxru1j2YjE6kGzwhZSDcw5yHkTEdzjJlBPzZOG3OXSxeIXIikuG3pXT7HVK?= =?us-ascii?Q?hgff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WxV?= =?us-ascii?Q?XT0M3OL5pIh62lMbVLBE+9XePs7XKLF5ipKOBokHPl9tmb15bEiOujfsBKZu?= =?us-ascii?Q?N5vwlOle4Zw5MMkBsiQwvjEr8aoIj9fYosUMppkN3b3AFe4bttQG1gpA7YHU?= =?us-ascii?Q?k8GQK8jkcNn4uTZ6gtLR49/PjLC9RprztM1nV9XFnxRBhCYtPoi47fzUeaUH?= =?us-ascii?Q?4ghzf/JjsCWACJiApN1HmV33+zgX12MtYOmXHvjAV7PSvmXc+JWS0md4nrAN?= =?us-ascii?Q?jw=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 186d87f1-9b00-46b7-f27a-08dbdf76f9b8 X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 09:50:29.2990 (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: zc55AonxiUwKk3K+aZS+Gag0TXXvx6cJxJMnYhtERUoa/CPL2U2A/A6NKeGNEWxhXWm/fuiphvSoY6M1rNRyL8sAf82CZDcg/T5lSh+srk8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR11MB4847 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, Nov 06, 2023 at 09:37:31PM +0000, Konstantin Ananyev wrote: > > > > > > > > > looking to start a discussion and get some input here. > > > > > > > > There are a number of our examples in DPDK which still track core usage via > > > > a 64-bit bitmask, and, as such, cannot run on cores between 64 and > > > > RTE_MAX_LCORE. Two examples I have recently come across with this issue are > > > > "eventdev_pipeline" and "qos_sched", but I am sure there are others. The > > > > former is a good example (or bad example depending on your viewpoint) of > > > > this as it takes multiple coremask parameters - for RX cores, for TX cores, > > > > for worker cores and optionally for scheduler cores. > > > > > > > > Now, the simple solution to this is to just expand the 64-bit bitmask to > > > > 128 bit or more, but I think that is just making things harder for the > > > > user, since dealing with long bitmasks is very awkward and unwieldy. Better > > > > instead to convert all examples using coremasks to using core lists > > > > instead. > > > > > > > > First step should be to take our EAL corelist processing code and refactor > > > > it into a function that can be made public, so that it can be used by all > > > > apps for parsing core lists. Simple enough! > > > > > > > > The next part I'm looking for input on is - how do we switch the apps from > > > > coremasks to core lists? Some options: > > > > > > > > 1. Add in new commandline parameters for each app to work with core lists. > > > > This is what we did in the past with EAL, by adding -l as a replacement > > > > for -c. The advantage is that we maintain backward compatibility, but the > > > > downside is that it becomes hard to find new suitable letter options for > > > > the core lists. Taking eventdev_pipeline again, we would need "new" > > > > options for "-r", "-t", "-w" and "-s" parameters. Using the capitalized > > > > versions of these would be a simple alternative, but "-W" is already used > > > > as an app parameter so we can't do that. > > > > > > > > 2. Just break backward compatibility and switch the apps to taking > > > > core lists instead of masks. Advantage is that it gives us the cleanest > > > > solution, but the downside is that and testing done using these examples, > > > > or any users who may have run them in the past, get different behaviour. > > > > > > > > > As it is for examples, I also don't see any issue with converting to core-list. > > > Said that, I suppose we still want to keep EAL '-c' (coremask) parameter, right? > > > If so, then it might be plausible to consider making the code that handles it > > > to work with really-long ones (up to 1K, or whatever is our current CPU_SET limit). > > > > I believe the EAL coremask parsing already supports >64 lcores, and works > > with arbitrary lengths up to RTE_MAX_LCORE, so I think we are ok here. It > > parses the coremask char-by-char (backwards) as a string, rather than > > trying to convert it using atoi-type functions[1]. > > Great, thanks for clarifying. > I suppose next question here - would it make sense to convert that code into some public API, > so we can have one function for core-mask parsing that will be used for both EAL and user apps? > Yes, that is the intention.