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 026DB4369E; Thu, 7 Dec 2023 18:34:25 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DF18742F04; Thu, 7 Dec 2023 18:34:24 +0100 (CET) Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) by mails.dpdk.org (Postfix) with ESMTP id 01BEA42F04 for ; Thu, 7 Dec 2023 18:34:24 +0100 (CET) Received: by mail-pl1-f173.google.com with SMTP id d9443c01a7336-1d069b1d127so8886005ad.0 for ; Thu, 07 Dec 2023 09:34:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1701970463; x=1702575263; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=TolYrVS9PkFGvmD+OqbAY7igSLWlovFuY/Z1OrpbtY8=; b=1A5YKPyaIntvuOusOvassMbctmK+5FBv2vVF/PU4aUXOjHXAH1wqxxbrQ/w59xjf1G rmZAk11YZ3+/7ZSnhqerAOrTVYnvJM1C3XcoKb2mcoTsEc7hvTsXQpimGElO2Y3/8+Mo wsSFkJaw1cWsUhP4En7oBaMA/1n20fpk9krkuxZZJwnP42a5rNqhRjawNjoUOLW5hg0B TlS/ay9tKos0OPkHRR4CfgsTVtifVkeVPnKvt67lZ7fxmjtK2l/vp+vDSrlWWYhZt9Cl DvnCB8TIRrakGpzD+QfM6OJd8IyizU2HZcjHmWztMsacRxntf2uqUz1bZqW8GBcdBkFg fQPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701970463; x=1702575263; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TolYrVS9PkFGvmD+OqbAY7igSLWlovFuY/Z1OrpbtY8=; b=iz1hhXVCrhbQ+8GYraaW/8F/19sKYq+7pkWZsyNyYiwzx7C1ZVS6Vov/60E1rvpEW9 cfnOVDAeKC/BFhuBNRx4TOwZhjgPhPMybzja6+tJvaG9IucVpISMkmxC5zBU7HeMSNhF 33gHTGjghhs+kFAWoFt0HuIvSw5zyTAxlyYYaVBKnVJ5+emmv2vym4bXcu3a6mq5WFom /qfO4gRXYeqtwnAkR9waLg3GshPcW9m5lob/Rm+cJV5mdnlEXCT3yEExrh4dl6MeV6y0 5uV+QjwBGuzU6VEdv+MSOOFTOhvFJxkjGtzMFIyrycIOZf9xPINytxZsTts4jljsQqPs 8WKw== X-Gm-Message-State: AOJu0YwgLJUZVoohZE8loNkAed+B31wdobx50gpBz0ur/0VkXfKKKIrR YlYOWr727/7TkPoyNlrBlfnsFQ== X-Google-Smtp-Source: AGHT+IHZjb4zIlrxHeZqnccr/llYIwu9Zv6SVsccCCaZMRPU4Bulh9yEsJlbeE6T18SPyNxgMKRmnw== X-Received: by 2002:a17:903:2448:b0:1d0:9416:efec with SMTP id l8-20020a170903244800b001d09416efecmr2958608pls.74.1701970463006; Thu, 07 Dec 2023 09:34:23 -0800 (PST) Received: from hermes.local (204-195-123-141.wavecable.com. [204.195.123.141]) by smtp.gmail.com with ESMTPSA id l21-20020a17090aec1500b00286550864dfsm1679963pjy.30.2023.12.07.09.34.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 09:34:22 -0800 (PST) Date: Thu, 7 Dec 2023 09:34:21 -0800 From: Stephen Hemminger To: Euan Bourke Cc: dev@dpdk.org Subject: Re: [PATCH v3 0/8] add new command line argument parsing library Message-ID: <20231207093421.7115b8c3@hermes.local> In-Reply-To: <20231207161818.2590661-1-euan.bourke@intel.com> References: <20231207161818.2590661-1-euan.bourke@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 Thu, 7 Dec 2023 16:18:10 +0000 Euan Bourke wrote: > A recent thread on the mailing list[1] discussed corelist and coremask > parsing and the idea of a new library dedicated to command line parsing > was mentioned[2]. This patchset adds the library, along with the new > APIs, and edits the existing EAL, DLB2 driver and some example > application functions to use these APIs, rather than each implementing > their own copies. > > The new APIs work similar to the existing functions in EAL, however > instead of filling a core array like this: > [1, -1, -1, 2, 3] (a non -1 refers to an 'active core' at that index) > It fills it like this: > [0, 3, 4] (with the value at each index being an 'active core'). > > The new APIs will also return the number of cores contained in the > passed corelist/coremask, so in the above example, 3 would be returned. > > New in the v3, is a heuristic parser which searches for key markers in > the core string, returning a enum value based off this search to > indicate if a parameter is likely a coremask or a corelist. This > heuristic function is also wrapped in a parser function allowing > apps to handle both coremasks and corelists simultaneously. > > [1] https://mails.dpdk.org/archives/dev/2023-November/280957.html > [2] https://mails.dpdk.org/archives/dev/2023-November/280966.html > To avoid confusion with the other work to handle better args in DPDK, maybe this should be call coreparse library?