From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f176.google.com (mail-wr0-f176.google.com [209.85.128.176]) by dpdk.org (Postfix) with ESMTP id 76B557CC4 for ; Mon, 26 Mar 2018 15:59:39 +0200 (CEST) Received: by mail-wr0-f176.google.com with SMTP id m13so5712739wrj.5 for ; Mon, 26 Mar 2018 06:59:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=BvMawuphZBNaoMa09UFIC+tYlfUIeOiqNY40fuLSLho=; b=Fmv5a4Ntw2pqB3TJO80HcUZ5/2zN8dwcUcMSfNDVczKvi7U8qTGtiMEF0GrJWypSgS jYlwf0ZNtv3AhXPmBRhbl+XPVyduECXqlBCfGmafLz9xU42XZPcs3CmP5l4kNeU+PDzl j3ktRgmFKqlUmHEk6/qPSlxoKxGUFD3yooVpBkRSRIKPZRT8OQZTQXi6dSl36TkugTIq HORxlBrA7ZRvckUFzv0x33Z3hBDgcDKFJmIP4zBa8TvCGK+2sJGbX5eZHFHuGxgw6T8Z qexyq/aJKWtcaNfC4ZsVH49AyH/4NhULC4TGT3NckvvHoQnbv5a0ripbNQqdLuX15xSh 9HrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=BvMawuphZBNaoMa09UFIC+tYlfUIeOiqNY40fuLSLho=; b=a+ePmQOJi/73QWObFbVqj0c6sHeUZ2kxxVoanf8uR8wDUBPXorQ8Yx6tJdSQENbChT sZ4WPc/J0vL4RwmzlMuFqfs3c+aR/Emi2zn0XxlpxKk/h8KZfyLE+PVXMQWrfCGbdS5S 9JNErMTyqXBW286c7A38lLVT0XkKHEJgxc06+yJfnxl4sPF2ODjtYO7dSDYh8y31ppJ+ 1IAihCHbLHigWL3HSj6P8HUcCVekapTOtqISNaNogzcb8MgtAFigxxIo2sk22fI9/jAl FWM8UDwBD9aEyEZWBbU+Ta7LDF/GlO3cdpCpf4984CswaIoYLqLYQKTBynWb6iX5Bakq a7/Q== X-Gm-Message-State: AElRT7Hj7Ij+05W8jliS0RZM5XiXoqCWopfWVwY9ThVn0vsYJL6XuAZL jfbUjrJXJF/C8joKLBYJGbMv48AX X-Google-Smtp-Source: AG47ELsYKROOJl5NbkhFwN4SU6XOwTxsZMzHBPcSEKXZbZ+9/sXhnYXOjZrXsNbZd1v9IBAVI90/Vw== X-Received: by 10.223.193.129 with SMTP id x1mr22031716wre.166.1522072778900; Mon, 26 Mar 2018 06:59:38 -0700 (PDT) Received: from bidouze.vm.6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id p4sm17693086wma.5.2018.03.26.06.59.37 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 26 Mar 2018 06:59:37 -0700 (PDT) Date: Mon, 26 Mar 2018 15:59:20 +0200 From: =?iso-8859-1?Q?Ga=EBtan?= Rivet To: Neil Horman Cc: dev@dpdk.org, Wiles@bidouze.vm.6wind.com, Keith Message-ID: <20180326135919.y6jmhy27drgmwsm2@bidouze.vm.6wind.com> References: <20180323131236.yagasxv2nxorfjl5@bidouze.vm.6wind.com> <20180323184503.13041-1-gaetan.rivet@6wind.com> <20180323184503.13041-2-gaetan.rivet@6wind.com> <20180326113819.GB14835@hmswarspite.think-freely.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20180326113819.GB14835@hmswarspite.think-freely.org> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [dpdk-dev] [PATCH 2/2] dev: use rte_kvargs X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Mar 2018 13:59:39 -0000 Hi Neil, On Mon, Mar 26, 2018 at 07:38:19AM -0400, Neil Horman wrote: > On Fri, Mar 23, 2018 at 07:45:03PM +0100, Gaetan Rivet wrote: > > Signed-off-by: Gaetan Rivet > > --- > > > > Cc: Neil Horman > > Keep in mind that all of this is to achieve the trivial task I was doing in 20 lines or so. > I'm actually ok with this but as Keith noted, I'm not sure why you didn't just: > > 1) Add the ability to create a grouping key, so that key value pairs could > contain a list of comma separated values (something like '{}' to denote that > everything between the characters was the value in a kv pair, regardless of > other tokenizing characters in the value). > > 2) Add the ability to recursively parse the value into a list of tokens > I don't need a recursive construct or a tree-like structure. I only need an alternative to '\0' to signify "end-of-list". This seems like an edge-case to librte_kvargs that would only be useful to a specific case. It does not seem a wise addition. So maybe I did not understand your suggestion. Can you give an example of inputs? I need to parse something like "bus=pci,vendor_id=0x8086/class=eth" (and I only care about bus=pci and class=eth). how can grouping help? My issue is that librte_kvargs would parse key:vendor_id value:0x8086/class and would then stumble on the unexpected '='. > 3) Layer your functionality on top of (1) and (2), as Keith noted The stack allocator seems like a nice-to-have that would interest people using librte_kvargs. I find librte_kvargs to be cumbersome. I cannot rewrite it from scratch, unless I update everything that relies on it as well. So I do not touch it, because I don't care *that* much. Why not simply leave my helper alongside? If people care enough about it and would prefer to use it over librte_kvargs, then maybe we could think about doing the effort of exposing it cleanly (or maybe they could). Right now, I see only me needing it and I do not see this effort as worth it. Regards, -- Gaëtan Rivet 6WIND