[v2] doc: announce kvargs API change

Message ID 20181122103223.22837-1-thomas@monjalon.net (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers
Series [v2] doc: announce kvargs API change |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/mellanox-Performance-Testing success Performance Testing PASS
ci/intel-Performance-Testing success Performance Testing PASS

Commit Message

Thomas Monjalon Nov. 22, 2018, 10:32 a.m. UTC
  After processing a kvlist in rte_kvargs_process(),
it may be needed to loop again over kvlist in order to know
whether the key is matched or not.
In order to simplify implementation of kvargs checks,
a new pointer parameter may be used to get the match count.

The change of the function prototype would be as below:

 int
 rte_kvargs_process(const struct rte_kvargs *kvlist,
 		const char *key_match,
+		int *match_count,
 		arg_handler_t handler,
 		void *opaque_arg)

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
v1: callback for no-match
v2: integer for match count (Olivier suggestion)
---
 doc/guides/rel_notes/deprecation.rst | 3 +++
 1 file changed, 3 insertions(+)
  

Comments

Olivier Matz Nov. 22, 2018, 1:22 p.m. UTC | #1
On Thu, Nov 22, 2018 at 11:32:23AM +0100, Thomas Monjalon wrote:
> After processing a kvlist in rte_kvargs_process(),
> it may be needed to loop again over kvlist in order to know
> whether the key is matched or not.
> In order to simplify implementation of kvargs checks,
> a new pointer parameter may be used to get the match count.
> 
> The change of the function prototype would be as below:
> 
>  int
>  rte_kvargs_process(const struct rte_kvargs *kvlist,
>  		const char *key_match,
> +		int *match_count,
>  		arg_handler_t handler,
>  		void *opaque_arg)
> 
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>

Maybe "unsigned int" instead of "int".

Apart from this,
Acked-by: Olivier Matz <olivier.matz@6wind.com>
  
Thomas Monjalon Nov. 22, 2018, 2:02 p.m. UTC | #2
22/11/2018 14:22, Olivier Matz:
> On Thu, Nov 22, 2018 at 11:32:23AM +0100, Thomas Monjalon wrote:
> > After processing a kvlist in rte_kvargs_process(),
> > it may be needed to loop again over kvlist in order to know
> > whether the key is matched or not.
> > In order to simplify implementation of kvargs checks,
> > a new pointer parameter may be used to get the match count.
> > 
> > The change of the function prototype would be as below:
> > 
> >  int
> >  rte_kvargs_process(const struct rte_kvargs *kvlist,
> >  		const char *key_match,
> > +		int *match_count,
> >  		arg_handler_t handler,
> >  		void *opaque_arg)
> > 
> > Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> 
> Maybe "unsigned int" instead of "int".

Yes we will discuss such detail during review of the code patch.

> Apart from this,
> Acked-by: Olivier Matz <olivier.matz@6wind.com>

Thanks
I will consider the deprecation notice as approved when there will be 3 acks.
  
Ferruh Yigit Nov. 22, 2018, 5:08 p.m. UTC | #3
On 11/22/2018 1:22 PM, Olivier Matz wrote:
> On Thu, Nov 22, 2018 at 11:32:23AM +0100, Thomas Monjalon wrote:
>> After processing a kvlist in rte_kvargs_process(),
>> it may be needed to loop again over kvlist in order to know
>> whether the key is matched or not.
>> In order to simplify implementation of kvargs checks,
>> a new pointer parameter may be used to get the match count.
>>
>> The change of the function prototype would be as below:
>>
>>  int
>>  rte_kvargs_process(const struct rte_kvargs *kvlist,
>>  		const char *key_match,
>> +		int *match_count,
>>  		arg_handler_t handler,
>>  		void *opaque_arg)
>>
>> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> 
> Maybe "unsigned int" instead of "int".
> 
> Apart from this,
> Acked-by: Olivier Matz <olivier.matz@6wind.com>
> 

Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
  
Jerin Jacob Nov. 23, 2018, 4:31 p.m. UTC | #4
-----Original Message-----
> Date: Thu, 22 Nov 2018 17:08:56 +0000
> From: Ferruh Yigit <ferruh.yigit@intel.com>
> To: Olivier Matz <olivier.matz@6wind.com>, Thomas Monjalon
>  <thomas@monjalon.net>
> CC: dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v2] doc: announce kvargs API change
> User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101
>  Thunderbird/60.3.1
> 
> 
> On 11/22/2018 1:22 PM, Olivier Matz wrote:
> > On Thu, Nov 22, 2018 at 11:32:23AM +0100, Thomas Monjalon wrote:
> >> After processing a kvlist in rte_kvargs_process(),
> >> it may be needed to loop again over kvlist in order to know
> >> whether the key is matched or not.
> >> In order to simplify implementation of kvargs checks,
> >> a new pointer parameter may be used to get the match count.
> >>
> >> The change of the function prototype would be as below:
> >>
> >>  int
> >>  rte_kvargs_process(const struct rte_kvargs *kvlist,
> >>              const char *key_match,
> >> +            int *match_count,
> >>              arg_handler_t handler,
> >>              void *opaque_arg)
> >>
> >> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> >
> > Maybe "unsigned int" instead of "int".
> >
> > Apart from this,
> > Acked-by: Olivier Matz <olivier.matz@6wind.com>
> >
> 
> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>

Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
  
Thomas Monjalon Nov. 24, 2018, 5:12 p.m. UTC | #5
23/11/2018 17:31, Jerin Jacob:
> From: Ferruh Yigit <ferruh.yigit@intel.com>
> > On 11/22/2018 1:22 PM, Olivier Matz wrote:
> > > On Thu, Nov 22, 2018 at 11:32:23AM +0100, Thomas Monjalon wrote:
> > >> After processing a kvlist in rte_kvargs_process(),
> > >> it may be needed to loop again over kvlist in order to know
> > >> whether the key is matched or not.
> > >> In order to simplify implementation of kvargs checks,
> > >> a new pointer parameter may be used to get the match count.
> > >>
> > >> The change of the function prototype would be as below:
> > >>
> > >>  int
> > >>  rte_kvargs_process(const struct rte_kvargs *kvlist,
> > >>              const char *key_match,
> > >> +            int *match_count,
> > >>              arg_handler_t handler,
> > >>              void *opaque_arg)
> > >>
> > >> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> > >
> > > Maybe "unsigned int" instead of "int".
> > >
> > > Apart from this,
> > > Acked-by: Olivier Matz <olivier.matz@6wind.com>
> > >
> > 
> > Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
> 
> Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>

Applied
  

Patch

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 34b28234c..dccf7bee6 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -11,6 +11,9 @@  API and ABI deprecation notices are to be posted here.
 Deprecation Notices
 -------------------
 
+* kvargs: The function ``rte_kvargs_process`` will get a new parameter
+  for returning key match count. It will ease handling of no-match case.
+
 * 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