From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 683A2A0487 for ; Tue, 2 Jul 2019 11:57:27 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 471E85B3C; Tue, 2 Jul 2019 11:57:27 +0200 (CEST) Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by dpdk.org (Postfix) with ESMTP id D7BA95B34 for ; Tue, 2 Jul 2019 11:57:25 +0200 (CEST) Received: by mail-wr1-f67.google.com with SMTP id x17so17023892wrl.9 for ; Tue, 02 Jul 2019 02:57:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=amyFDm/lhIyk1KyMYAD5fmCXFeQK9GcaR+EuxobX7W8=; b=ewUH49bphaXeKnOrj9PkcYnO9hKVCY4WkY8mpl2IxQrjNnf7S4CEz+Bq+pg3t9TCwd W1MuQe5BB4TX4kNOwVHYwXdmwpnwrSuMTTTu46RyjSulvve3lXmqGtRwEaQQNR1BVLnr hZRGDJdzaWst7WcBSM+dSKZ8lvDUJZw4vcKTmElPt42+lFGmHBWawwVd8maxv5qZKSjD Zci4R31LHVk4d2gn7/Wh04R2KDxUBQ8G9FoVfrtRawe5rxhJZqRykY/0nNupBbsJ57NX 51me6rh9Mz8kG0Wlaeu629U2XK/cNK2RJCB4jZRRDwlsO6xF1bi4OYt68Vl0QFhJyhIF 9ddg== 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:in-reply-to; bh=amyFDm/lhIyk1KyMYAD5fmCXFeQK9GcaR+EuxobX7W8=; b=nkoJcH3JRka+mdrNTh7bR+KuLv6hK7hEalfnjihY//JuHFGwH6D5OazLaXtJGSb2qK 4r0FT+RA1zkrPhM96ymfWCR+ZzaKXb1tw/nopvcq2pS9xYLHvduLBSx4dGwladgr2Fwt PEgNqZ3PhrL3WF1kSDl6Q+05XQ4CT2fDjO9jJSMS+HLwDzqd6drdXZzpnWnbV61ELsNe e3qgdqGX4vUK2nXqER+dbUtPeAu4hGOIzmQ9g/jYDbE261hs+qrLhnhffKwIR3GA/ZS5 xWsQfWtw634s78r0BhNRpjdw7++dCxZV1QnBWdng4atBI8EbytF/t7AshJxia5YULu8A htWQ== X-Gm-Message-State: APjAAAX81pe3wRDkGi7fQXJeaRPZ3b+XgH3HB28pQwuoskRCZ+MeMIFY qQKp9TKGqhwky4WRL7JvSXXHNCEEFRv5fw== X-Google-Smtp-Source: APXvYqxiCsmdWwl/gwJ2I+eMSFQrehqR1ZSiwJm0cowBsqzlkywFugnbUO6XnTQF+i4axf++7vmbdQ== X-Received: by 2002:adf:e691:: with SMTP id r17mr23444022wrm.67.1562061445316; Tue, 02 Jul 2019 02:57:25 -0700 (PDT) Received: from 6wind.com (32.40.136.77.rev.sfr.net. [77.136.40.32]) by smtp.gmail.com with ESMTPSA id g8sm2300566wme.20.2019.07.02.02.57.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Jul 2019 02:57:24 -0700 (PDT) Date: Tue, 2 Jul 2019 11:57:16 +0200 From: Adrien Mazarguil To: Dekel Peled Cc: Andrew Rybchenko , "wenzhuo.lu@intel.com" , "jingjing.wu@intel.com" , "bernard.iremonger@intel.com" , Yongseok Koh , Shahaf Shuler , Slava Ovsiienko , "dev@dpdk.org" , Ori Kam Message-ID: <20190702095716.GA4512@6wind.com> References: <1389143e204e85c90b4fc124f9e561f43f78175e.1561989889.git.dekelp@mellanox.com> <7e07e792-edd4-b946-641d-4cff9cc2c830@solarflare.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [dpdk-dev] [PATCH] ethdev: support action with any config object type 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Tue, Jul 02, 2019 at 08:42:41AM +0000, Dekel Peled wrote: > Thanks, PSB. > > > -----Original Message----- > > From: Andrew Rybchenko > > Sent: Tuesday, July 2, 2019 11:09 AM > > To: Dekel Peled ; Adrien Mazarguil > > ; wenzhuo.lu@intel.com; > > jingjing.wu@intel.com; bernard.iremonger@intel.com; Yongseok Koh > > ; Shahaf Shuler ; Slava > > Ovsiienko ; arybchenko@solarflare.com > > Cc: dev@dpdk.org; Ori Kam > > Subject: Re: [dpdk-dev] [PATCH] ethdev: support action with any config > > object type > > > > On 01.07.2019 17:10, Dekel Peled wrote: > > > In current implementation, an action which requires parameters must > > > accept them enclosed in a structure. > > > Some actions require a single, trivial type parameter, but it still > > > must be enclosed in a structure. > > > This obligation results in multiple, action-specific structures, each > > > containing a single trivial type parameter. > > > > > > This patch introduces a new approach, allowing an action configuration > > > object of any type, trivial or a structure. > > > > > > This patch introduces, in test-pmd, a new macro ARG_ENTRY_HTON, to > > > allow using a single argument, not enclosed in a structure. > > > > > > Signed-off-by: Dekel Peled > > > > The term "object" confuses me a bit, but I'm not a native speaker so it could > > be just my wrong association. I'd prefer "configuration data". > > In previous version I wrote just "action configuration", and changed to "action configuration object" per Adrien's suggestion. I think it is better, but if it causes confusion maybe it should be changed. > > Adrien, what do you think? Does "configuration data" carry the correct meaning? Well I'm no native speaker either but "object" is the term used in the C standard with a well-defined meaning [1] and encompasses everything (integers, floats, structures, unions, functions, pointers, arrays): "region of data storage in the execution environment, the contents of which can represent values" I think it's a bit less vague than "data" because whenever objects are mentioned in the standard, they always have a type. There's no such thing as a C object without one, and rte_flow puts a lot of emphasis on documenting them. int foo; struct { ... } foo; double foo; char foo[]; void *foo; Whatever the type, would you refer to "foo" itself as an "object" or as "data"? Unrelated, but you must remove ARG_ENTRY_HTON from this patch since there's no testpmd change in there that requires it. There's no tolerance for dead code in testpmd as it doesn't expose an API. Thanks. [1] 3.14 "object" http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf -- Adrien Mazarguil 6WIND