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 C2A3643279; Fri, 3 Nov 2023 11:17:10 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9923C40284; Fri, 3 Nov 2023 11:17:10 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) by mails.dpdk.org (Postfix) with ESMTP id 6570B4027F; Fri, 3 Nov 2023 11:17:08 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1699006629; x=1730542629; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=OKlAQxdx/wDe1RXcrL4XqnuiTr19UPIpNMCqqB+EXVQ=; b=i8wZLR4YFJ+ZbKd+BkPkXws+wIJ5+qIcnX70UXUcKzHOAjW3BtXiKEWb 6WmouHGR+vlwxydmgiKl9/P6dhfOUZyLGbsg/cBDLttXeH27iXh5olarV lWoWKSh+Nm3itJ55FsiOMNeLI2aJvy96lPpltYmG8KnpLshY9hDbVoK4Y QUh+g0aMi/BQpLm1bxSZ4vQox0qOq+A9G7//g3GVtWuS0Dq3kW8MXnJFW CisTyNSIgm7/NNWy8c7pQFhH+W3bweyk2MGEm368YMG3HtiJM1+UEoXA4 lVh0YSku2XddRcUgAA2K8MJs0TKEnVQ/mdd2g04fnni5kOob4CAUMbGT7 A==; X-IronPort-AV: E=McAfee;i="6600,9927,10882"; a="10454293" X-IronPort-AV: E=Sophos;i="6.03,273,1694761200"; d="scan'208";a="10454293" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Nov 2023 03:17:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10882"; a="1093027313" X-IronPort-AV: E=Sophos;i="6.03,273,1694761200"; d="scan'208";a="1093027313" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by fmsmga005.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 03 Nov 2023 03:17:06 -0700 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.34; Fri, 3 Nov 2023 03:17:06 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) 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.34 via Frontend Transport; Fri, 3 Nov 2023 03:17:06 -0700 Received: from NAM02-SN1-obe.outbound.protection.outlook.com (104.47.57.41) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.34; Fri, 3 Nov 2023 03:17:05 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WKdtLbUAFnuBFsPRui/XqjdNXDYiYRHZogGxI+VnRBSPn5PvXD44NJebT0+/zPTCdOYDwoD/fyxDpzuuuqOOpkcxmvqM+Jc+d3/e5DU+U5Po6jChKyikQZXmpyP4ZFQ02qUgddLhqrSlwROlL/F7YEmq6ckjjpA8EefJvpVjKn863vKrgFnKqWIlnlADTllsPxOE/Yk3Q7dalGYZ6MJBqsH0o8PSvo+UBqAV+0oB13lWTEMZXJdcFkykbL6KuhqtNtdbuhxk113u6yoaTVbiBgZq3fkpKWIIU9dpCy7JzWL0mFNFpcCMEMvqlIlHcv75emXDQ3f5/DXMS0wt6r5KPg== 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=hWwOlrL4j1gUsktpFhbcroKE6m1XMI1PXpIhwaUAA6w=; b=EUk4A1XXOhumwQj8TZpfq3ZrApIMCntvJ3gB2wBZDqFQyLBTtvfAJd4O7fP1z4uexSJD8RsqudFWFf5Pz2BiPXFPO2lx/duAUt4J1VrPY9lyLM/LsQvuMwUcOWCjPoQMWkfzG8NV8t1B73z7UvPP/RkDR0lbsSKwnL3AkVkYRR8zW1GuOBdBbDCy3tfLaCVwuQAPIsPrur2CgT7xct6StFDoe+Z9+nWFRH2kmVR4Za3wUOTpKb2Y7HckoEhUh/jlQkYtKlbb563JbymwtkHFLCk4qWlSLzallMoyDPFQubY7KmPglBFlqheSCWS+kP5vzKhHao5dtazGvEs01X0oWw== 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 SJ2PR11MB8497.namprd11.prod.outlook.com (2603:10b6:a03:57b::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.19; Fri, 3 Nov 2023 10:17:03 +0000 Received: from DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::d70b:11a0:d28f:ec44]) by DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::d70b:11a0:d28f:ec44%6]) with mapi id 15.20.6954.021; Fri, 3 Nov 2023 10:17:03 +0000 Date: Fri, 3 Nov 2023 10:16:58 +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> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <152ecf4d5e4a4b78a9bf91ab78234532@huawei.com> X-ClientProxiedBy: DB7PR03CA0100.eurprd03.prod.outlook.com (2603:10a6:10:72::41) To DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|SJ2PR11MB8497:EE_ X-MS-Office365-Filtering-Correlation-Id: f9a6a044-8950-451d-8e1b-08dbdc560651 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: fO/DGAomrWJ4PINzvHSFhJEIso84ySnrNfi0uYkyQtLQmdzFCuQ2Hy5tu7n3A+lg1R72HjjIhZt0nx/ubbOB1PteKTtrU7Yf2GCU6Vvs2BPUK3m2FHSkUY4C0CAjQgnVSbTl/y2pxLYQLcoSLf+wkojHFRRs3+KivSkMNLv7yQsRTTZKYdHSSXNCrQNZzJfKCegSfSdDYuak6YJ6vPpakySoITQwU4eKjvOiyJJ8jqUsmhcEhmQ7sNkeo2wksOh+44nyBVkpCVnRE/xGDJMwUbad6iLJVnsnHo/Yzo3fUWAh5IJZLfJoC+UyQxSSUtZMbloANhXt8VXWzHymghcGnyKDh0do45hCE3Bh9PxYwLsSvQ4lsLMPrBX+XS++b7ukFMNFaZggHtQfoZnHuu+svyM771+QQM/GObj8QXqOiUx2nay7hOeSw8xbYmCw1kEWyFXsrxPmr7bxOUDlzK/+f72Zp1UUDpstBC2tiFeDgYiPRHd2I4I6Ucx2SPA34M/kENcmBLi7JygmnZGWz2/63NbZTY0y/aLiY7TY5irf5/LOrX9kXjQJ5tAq/ur3qVWgE8CyRt5RzkYzqkUhhYqmjU+InFWHAxX8tHCW16/PVHE= 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)(366004)(39860400002)(396003)(136003)(376002)(346002)(230922051799003)(451199024)(186009)(64100799003)(1800799009)(66899024)(44832011)(5660300002)(82960400001)(38100700002)(41300700001)(2906002)(66556008)(6916009)(66476007)(66946007)(54906003)(107886003)(316002)(26005)(478600001)(6506007)(966005)(6486002)(8676002)(86362001)(6512007)(4326008)(83380400001)(8936002)(6666004)(67856001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?KRYSNf+XWNRnqPEU+haheAyvJlpKM9kKQzxMpzHqrSO39ZxlvSixHWmtK2za?= =?us-ascii?Q?p7eKqeJKzh3EN5o/5aelhCLW7C/hYcHsnAA9nR1i8PGU8Yui6CiL/6CZyv1i?= =?us-ascii?Q?qGYcIrrq9m7hxfiF//lbt7vnzXL0Yq0Cs/XTKcg38UmDFtaWs/KfAAZHtrnH?= =?us-ascii?Q?s1zR6+15uGgFdalym2dU7af2Jt/nbV36bWVgd07foCxRfftv4TGOyGddKfiR?= =?us-ascii?Q?48xizx4KYu4xotnTMPCgKcW4I+QYjHjm4R1/PNwO2kj2/2MVHKGzbiwbJs59?= =?us-ascii?Q?uMN4e4FBCD85dheW9JtY1HFeRD3CK8/U0CF8x+gIJ4oR8z2M1kXjzyL8zZ2J?= =?us-ascii?Q?aD3eXb6Zfo+ezFzGNJBtPyFvO9noD2s/PGcZk0c31wDDgxfPl8ZlbIUFi5Hs?= =?us-ascii?Q?+mB0k75CCRneTivK3nuPNZPBFAYWEUqJ0n0e7mc4+6kmZ+Q2IJArOJ2jH0fj?= =?us-ascii?Q?GorykPfHf9gCVqVWAFG9uwkbtV2LgIM7JTWOZc/KSFyOU9sEZ5vx44iOpKmY?= =?us-ascii?Q?TOXFLi37GWN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us-ascii?Q?G4rTLG/fIyPpbhWdHHwZcKlb/akNAYHddiQOt8aygasWo/QGyMWIFWvPzcwW?= =?us-ascii?Q?uUy1bglP8aotlYr4IzJNy82JfbXffa6VJZHeblJy8pdiuzc5XMuZmMxuxos1?= =?us-ascii?Q?egtnZKq3oLll5lacpNQHSapztJ50B1tPPISHalGCPU/P3wLPJGpxjhSIpsaf?= =?us-ascii?Q?pg=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: f9a6a044-8950-451d-8e1b-08dbdc560651 X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Nov 2023 10:17:03.5993 (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: G20m6HLc1LuGBR+RQcWYLxZFkeJVCcqu4s8jsRMRliWrAGWqNTQSM5cyIuNqH/sSXhs9ZxCrYcCQ3VRfgsAS9FpAcHuLgTo+7nDGGPPEQIg= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR11MB8497 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, Nov 03, 2023 at 10:11:08AM +0000, Konstantin Ananyev wrote: > > > Hi all, > > > > 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]. /Bruce [1] http://git.dpdk.org/dpdk/tree/lib/eal/common/eal_common_options.c#n777