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 C66CD4326F; Thu, 2 Nov 2023 15:57:31 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9379240270; Thu, 2 Nov 2023 15:57:31 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id 511EC40262; Thu, 2 Nov 2023 15:57:29 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1698937049; x=1730473049; h=date:from:to:cc:subject:message-id:mime-version; bh=bUnGQYOF2mraaEpR+dWv6tqKg4c1tX96Saz7bCo8lN0=; b=S5H6ks/IIPIMGdm9APcrRCYrXoYkbsI65miGLhBMbO4HMCFFmOodAKY2 4L0mkTn7PMg5jH8PG2lrEcO9qcXndjkNVX18IBpM1byEEhqrbM7PPe9ZQ U0OCSHiIQStvPYyz38bLlV3Jq5bQwE2gxRGpkibpWEN9rFrsBvQ3ssdQc PhGP2xtQqDJj+8TOmpDMLHRyw+1hd8uykPXA7fcPV9LTnqcx124FX/JAL C64xpbdCCuBhzbpjx/Q8wmd5jDmH7Jr/EiuW+SkPcat7vgzZrkqvYZVAT LfAqK0bP4MwsHXcP1NonWbbWpLoGdJloJQXtPnT5ApkWHeK9cc/mz5HiE A==; X-IronPort-AV: E=McAfee;i="6600,9927,10882"; a="474970705" X-IronPort-AV: E=Sophos;i="6.03,271,1694761200"; d="scan'208";a="474970705" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Nov 2023 07:56:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.03,271,1694761200"; d="scan'208";a="2570190" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by fmviesa002.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 02 Nov 2023 07:56:59 -0700 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Thu, 2 Nov 2023 07:56:59 -0700 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) by ORSMSX612.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Thu, 2 Nov 2023 07:56:59 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) 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.34 via Frontend Transport; Thu, 2 Nov 2023 07:56:59 -0700 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.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; Thu, 2 Nov 2023 07:56:58 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZhJ8Rzl10GLQCoQEO9ywYyfZI3ztr+oiCKMfiGJQDNzD3BFJj+XXLSqdcgeFcYuOyD6mXejjMBW34Xl2mLBIfqhZ/BIA4+8XxFnVLwIQ78CkbYFizKRYQ8xHtY/5e/zoZyhe5mUFjuJ5qk6vMhlOc1Imu+OTeW0lG4znSX8le35GoTDUYcVgdh1h0O+QA0391BNS+4lILOBTLvVwYdfQcIBVXSKyXisq8s5Fbx8JEf95skbkEm2auH4jh2FWsHQnQyIeLrMsGt6Y2cICWr3vNoXeAdSk6dkX2J1+ZiBlX5gyW3PSj5OiT8nGROjkuXI26V6jdUL9zzXap5Bb7BLoZQ== 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=KQUQFoYYK731sQiOzjrllfUTctUYdZz0n7uST4gO5wU=; b=VooJIs6gme25pV/yaoBHVRkASTX2jwdZ/6QJkeqPrU2l2WB8/seoN1C+22TLULUT0kA4sfZoWcWnfHILSmbbwVkmCeHiInFH8wyramKX1d69yMP2oa50Oo00H5Io2cg8aTMlJKQ5RnTepxYryAV7RSg31Xi/KTJ+j9LSKUYDYynzifxjE4C5tEDcqvmxyCg5jZvyg/uOlXewWP3mGQojN+bWcZmVBJZPVBNr6EV6RXRk78H8MGV+cHxbtjqdP7vHXi3RL/jJxe4dNmVJ4qiP6YGAzZrsohHASEeg6FOiiz0FKDRDX3GKMDn/arwIyO7NyJ5QZc0KXRoqkEDLpmSugQ== 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 SA2PR11MB4940.namprd11.prod.outlook.com (2603:10b6:806:fa::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.19; Thu, 2 Nov 2023 14:56:51 +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.019; Thu, 2 Nov 2023 14:56:51 +0000 Date: Thu, 2 Nov 2023 14:56:45 +0000 From: Bruce Richardson To: , CC: Euan Bourke Subject: Updating examples which use coremask parameters Message-ID: Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline X-ClientProxiedBy: DB9PR06CA0005.eurprd06.prod.outlook.com (2603:10a6:10:1db::10) To DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|SA2PR11MB4940:EE_ X-MS-Office365-Filtering-Correlation-Id: a148ab25-3a5b-48c1-ab97-08dbdbb3f244 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Cph1ULeDvWDKgUFYcWJP/3kfCZyZ4NuPtxREW3OwtPrI7HycCsxhCQ6T4D9Ojp4VflptEVs9irE7FfZNyiUsMDXRNhN/cHhVBMsHMlueqayzW4VT69HJDmz8dXXquBFz9b0wPXmZYWYpjkJKzqqpVBVFZCQP6OSpdUxqb5zCIGo5T0XnFfDcbNUiYBI0F43LoPGRy9Qczqqtt8tkaWZHzCVN06aRaaP9GR94PqJpnpgCrlBIigEd3rn709SjAmNE0Uhkydr65DLipc4dFX4SonQoXVjDQJtUuKbqYBWAxAi+1gg5y51jPbU8TOI3wRJbQzQh4MyyPdCMBC7oTs/JP3VOPHWCT5lF1AGlyTDnVH/NfU697ZARo/fYfjwQYjt2BTjszucTV2aE89tMBWdUuYekB5UbHHy5AQOq43kcJUjKnL+gYWB3AiQ4fSaOz3PvFwc7A1iZxlsKY0Pfewu0J4RgN9SkS14c00AIqQhfFq8YCkYnu9y04DYK78FIfZgMexxy/M/IGxkOj4McwPnw80ZWRJZVbaG3MWhD8bvq11X7MH202qhzApK3DwoGyFk6 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)(346002)(39860400002)(366004)(376002)(396003)(230922051799003)(186009)(64100799003)(451199024)(1800799009)(86362001)(66899024)(6506007)(26005)(6666004)(6512007)(478600001)(6486002)(41300700001)(83380400001)(2906002)(450100002)(107886003)(44832011)(8676002)(4326008)(8936002)(316002)(66476007)(66946007)(82960400001)(5660300002)(38100700002)(66556008); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?cUJtU/l71rcqSsa/INSMgquwPPG7vtLHKEVTaiAczRbGGWh2cokRKCWm0L4V?= =?us-ascii?Q?u1lh35HM0jgPUcSzB455KrqIrWtwpb2R3+BA5aGFWdgQdakOieRuEPGcIZZ4?= =?us-ascii?Q?gBodhA/pqvfPPRw595eOO7hRkZIL14J5/ZX5Xl3Q96BEyG+X4bEFeV/bOrEw?= =?us-ascii?Q?FQjtIgpJZ4fBXR62ERoZ0yRfw0WWm0akGEuVywDzuVGNBu+drRvsSxhib3cD?= =?us-ascii?Q?2FKw1wc+4bZ9cOHLhrxJB7R+Sw+eoOnKXgp6T6KNdLPrFMzLeC3Z0/gLqDki?= =?us-ascii?Q?LAuJR4otOX3/PGsAHVyamkZk/rrfgXeaZlOK+SPY7sXWe2ncVJcR65RFxc1T?= =?us-ascii?Q?0X0LY9WYPHn8Our6l8VJogld0Ax3TUySpXKoZ+Y5nk2jU87P42HyKOLvufeJ?= =?us-ascii?Q?yOASdVhsAqLlCGJYnNGKIqqNqCQAScwzLqWNj/5cDXA+GBylExfqfQi0WQcb?= =?us-ascii?Q?ATe+SurUWK4hqiBkQ9wCN1PkKXCZzDoXU9qZyllL/QOzoPe1q2N8vBiXCeLS?= =?us-ascii?Q?+fSPNAlnOoaGrKVCZa0peRSNPAKyJlWn5lyPkzHrcF/fzby+UwDsj9zCNDHV?= =?us-ascii?Q?4pnQFncmdk4imr410d+bbSrwCz2XBEqZ/tOyf8dv0EZnvGeW9Eq4XyjZVF+O?= =?us-ascii?Q?FbggQWkefkqxUlt9i6nu+k/ooHTj21NYge4XoY6CY6/o4UDJT7xCle2KPT+J?= =?us-ascii?Q?Pl1jWjsywwyxsnfFGN5o+UAnDF4+wqIYW0K3PgJBO57XONxh6bCnp2y+EC6M?= =?us-ascii?Q?2Roz29vJoxaBdfJUZWfciau0hQuDow489RdakfglO1zElwaiKn+2P/446+1V?= =?us-ascii?Q?n+roLyN9bIEHyyo/DDsJtz//5haW7X4QoGSxM+qvQyVZ585XJxwglZynL/H+?= =?us-ascii?Q?Io4RDfCa17oY3THEKhP6gKzdTAzcbOZFogZBETCIvx3O0S823IibCd6benDx?= =?us-ascii?Q?cmy3Le5nNYUXiQ8pfYLtYq5SdYXAZ3+pvhxexTLpy2Zf4dAbnpYu+yss7upb?= =?us-ascii?Q?aC3DFAeVhVKUmhejX0FUulEFvCLF1D5d22yzuLrQ6XKbBwvPMo/KaXoknsrO?= =?us-ascii?Q?XAlFSlBrKo1KWyY7W/7DmFN/T736dHn7gQlABwxUdaNCiUalSQlV6ekqLd84?= =?us-ascii?Q?jvp+f4nEqZ4w1BSms8lmFsscg8boArILsW/VWPbHu8lqnkePdbfSBZ8HbzWS?= =?us-ascii?Q?i4bCK01/IQ0UCSo/xxzpKEizn2+KFvU2BkmOU/cl76WsywpdA6tXPWZE/r3a?= =?us-ascii?Q?PjmIG11RtIth7w7DdzER3d1v53gppwOPnhwPjQmo9prr1X+n4WKEjuFUJk4v?= =?us-ascii?Q?TbOvuEpr59YheQsbabjMN55NtgoG172gp28MKtqLKzSX3okV3+pUS5Md3wiY?= =?us-ascii?Q?jes210HLzG5FEwJ9Ua723c8zq2UDIaZBWAcL4V5F6w3okDuKbhVQNAUjrSXo?= =?us-ascii?Q?B2LI92EPx34Mz9o2RQx5GFCPcMx11iY8en5O3a/NSEWr519cwpUiBKqmcSAN?= =?us-ascii?Q?QCKKcUk9BJ0qpY7uMTC1b4MYwvbKOIb+uofm+YbI+Lr3xMJIlmqp0ie5MSPO?= =?us-ascii?Q?zs7tMwqh9sKX8vPRuDJzNni97qnLuNEYgmpcBCF6qKt2DZYYatTQ8yyR9cgi?= =?us-ascii?Q?zg=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: a148ab25-3a5b-48c1-ab97-08dbdbb3f244 X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Nov 2023 14:56:51.5348 (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: IrNSCREIWXFf0tzm9QSMEpKa+kI5PxyUYHReWd8egbIUS7ipRPzSH0epTGJemNRQ7mZ+/oiaR8qMuERfk3YDBPF1TKX4TSqxlpfZA4bvYpg= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR11MB4940 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 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. 3. An interesting further alternative is to allow apps to take both coremasks and corelists and use heuristics to determine which is which. For example, anything starting with "0x" is a mask, anything containing "-" or "," is a list. There would be ambiguous values such as e.g. 2, which could be either, but we can always find ways to disambiguate these, e.g. allow trailing commas in lists, so that "0x2" is the coremask, and "2," is the corelist. [Could be other alternatives]. This largely keeps backward compatibility and also allows use of corelists. 4. something else?? Thoughts and feedback, please? We'd like to upstream some fixes for the examples in 2024 and would rather get agreement on the approach now than head down a wrong approach. Personally, I'd rather avoid #1, and #3 is neat, but perhaps being overly smart/complicated? Regards, /Bruce