From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 070EB1B555 for ; Fri, 23 Nov 2018 14:17:29 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id F1AFB30820F5; Fri, 23 Nov 2018 13:17:28 +0000 (UTC) Received: from [10.36.112.54] (ovpn-112-54.ams2.redhat.com [10.36.112.54]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EDAE583882; Fri, 23 Nov 2018 13:17:27 +0000 (UTC) To: Thomas Monjalon , dev@dpdk.org Cc: olivier.matz@6wind.com References: <20181121154545.14261-1-thomas@monjalon.net> From: Maxime Coquelin Message-ID: <349f99c8-cfc4-9e98-38dc-fbe06ba26993@redhat.com> Date: Fri, 23 Nov 2018 14:17:25 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <20181121154545.14261-1-thomas@monjalon.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Fri, 23 Nov 2018 13:17:29 +0000 (UTC) Subject: Re: [dpdk-dev] [PATCH] doc: announce kvargs API change 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: Fri, 23 Nov 2018 13:17:30 -0000 On 11/21/18 4:45 PM, Thomas Monjalon wrote: > In some usages, kvlist is processed one time in rte_kvargs_process(), > and it is processed a second time if need to check whether it was matched. > In order to simplify implementation of kvargs checks, a new callback > may be used for "no match" cases. > > The change of the function prototype would be as below: > > int > rte_kvargs_process(const struct rte_kvargs *kvlist, > const char *key_match, > - arg_handler_t handler, > + arg_handler_t match_handler, > + arg_handler_t no_match_handler, > void *opaque_arg) > > Signed-off-by: Thomas Monjalon > --- > doc/guides/rel_notes/deprecation.rst | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst > index 34b28234c..7af65cd4b 100644 > --- a/doc/guides/rel_notes/deprecation.rst > +++ b/doc/guides/rel_notes/deprecation.rst > @@ -11,6 +11,10 @@ API and ABI deprecation notices are to be posted here. > Deprecation Notices > ------------------- > > +* kvargs: The function ``rte_kvargs_process`` will get a new parameter > + for a function pointer called in case of no match of the key. > + It will ease implementation of default values or check for mandatory keys. > + > * eal: both declaring and identifying devices will be streamlined in v18.11. > New functions will appear to query a specific port from buses, classes of > device and device drivers. Device declaration will be made coherent with the > Acked-by: Maxime Coquelin