[dpdk-dev] lcore: make semantics of lcore role function more intuitive

Message ID BE54F058557D9A4FAC1D84E2FC6D87570EE2DACC@fmsmsx115.amr.corp.intel.com (mailing list archive)
State Not Applicable, archived
Headers

Checks

Context Check Description
ci/checkpatch warning coding style issues
ci/Intel-compilation success Compilation OK

Commit Message

Carrillo, Erik G April 26, 2018, 2:44 p.m. UTC
  Thanks,  Anatoly and Thomas.  I had also considered the following chunk for the release notes:


Do we want this note?  Also, it looks like the Doxygen documentation of the function in the header file didn't get updated.

Regards,
Erik

> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas@monjalon.net]
> Sent: Thursday, April 26, 2018 9:31 AM
> To: Burakov, Anatoly <anatoly.burakov@intel.com>
> Cc: dev@dpdk.org; Neil Horman <nhorman@tuxdriver.com>; Mcnamara,
> John <john.mcnamara@intel.com>; Kovacevic, Marko
> <marko.kovacevic@intel.com>; Robert Sanford <rsanford@akamai.com>;
> Carrillo, Erik G <erik.g.carrillo@intel.com>; olivier.matz@6wind.com;
> shreyansh.jain@nxp.com
> Subject: Re: [dpdk-dev] [PATCH] lcore: make semantics of lcore role function
> more intuitive
> 
> 26/04/2018 15:42, Anatoly Burakov:
> > rte_lcore_has_role() returns 0 if role of lcore matches requested
> > role. The return value of the API is confusing, and this is a known
> > problem with a deprecation notice announcing the change to more
> > intuitive semantics:
> >
> > Commit 064518f68d48 ("doc: announce EAL API change to lcore role
> > function")
> > Cc: erik.g.carrillo@intel.com
> >
> > Implement changes announced in the deprecation notice, and remove it.
> > Also, fix usages of this API to reflect the change. Control thread
> > patches expected new behavior and were broken before, now they are
> fixed as well.
> >
> > Fixes: d651ee4919cd ("eal: set affinity for control threads")
> > Cc: olivier.matz@6wind.com
> >
> > Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
> 
> Applied, thanks
> 
>
  

Patch

diff --git a/doc/guides/rel_notes/release_18_05.rst b/doc/guides/rel_notes/release_18_05.rst
index 04ff4fe..127a7e2 100644                                                   
--- a/doc/guides/rel_notes/release_18_05.rst                                    
+++ b/doc/guides/rel_notes/release_18_05.rst                                    
@@ -72,6 +72,11 @@  API Changes                                                  
    Also, make sure to start the actual text at the margin.                     
    =========================================================                   
                                                                                
+* **rte_lcore_has_role() return values changed**                               
+                                                                               
+  This function now returns 1 or 0 for true or false, respectively, rather        
+  than 0 or <0 for success or failure to make use of the function more         
+  intuitive.                                                                   
                                                                                
 ABI Changes                                                                    
 -----------