[dpdk-dev,v2] librte_cfgfile (rte_cfgfile.h): modify the macros values

Message ID 1441289888-7035-1-git-send-email-jasvinder.singh@intel.com (mailing list archive)
State Superseded, archived
Headers

Commit Message

Jasvinder Singh Sept. 3, 2015, 2:18 p.m. UTC
  This patch refers to the ABI change proposed for librte_cfgfile (rte_cfgfile.h).
In order to allow for longer names and values, the new values of macros CFG_NAME_LEN and CFG_NAME_VAL are set.

Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
---
 doc/guides/rel_notes/deprecation.rst | 4 ----
 lib/librte_cfgfile/Makefile          | 2 +-
 lib/librte_cfgfile/rte_cfgfile.h     | 9 +++++++--
 3 files changed, 8 insertions(+), 7 deletions(-)
  

Comments

Thomas Monjalon Sept. 3, 2015, 2:33 p.m. UTC | #1
2015-09-03 15:18, Jasvinder Singh:
> This patch refers to the ABI change proposed for librte_cfgfile (rte_cfgfile.h).
> In order to allow for longer names and values, the new values of macros CFG_NAME_LEN and CFG_NAME_VAL are set.

Please wrap the commit message.
CFG_NAME_VAL should be CFG_VALUE_LEN.
The title should start with "cfgfile:".
Instead of talking about macros changes, saying "increase maximum" would give
more clue about the goal of the change.

> Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
> ---
>  doc/guides/rel_notes/deprecation.rst | 4 ----
>  lib/librte_cfgfile/Makefile          | 2 +-
>  lib/librte_cfgfile/rte_cfgfile.h     | 9 +++++++--
>  3 files changed, 8 insertions(+), 7 deletions(-)

You have forgotten to update doc/guides/rel_notes/release_2_2.rst.
  
John McNamara Sept. 3, 2015, 3:46 p.m. UTC | #2
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Thomas Monjalon
> Sent: Thursday, September 3, 2015 3:34 PM
> To: Singh, Jasvinder
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v2] librte_cfgfile (rte_cfgfile.h): modify
> the macros values
> 
> >  doc/guides/rel_notes/deprecation.rst | 4 ----
> >  lib/librte_cfgfile/Makefile          | 2 +-
> >  lib/librte_cfgfile/rte_cfgfile.h     | 9 +++++++--
> >  3 files changed, 8 insertions(+), 7 deletions(-)
> 
> You have forgotten to update doc/guides/rel_notes/release_2_2.rst.

The new release notes file hasn't been merged yet.

John.
--
  
Thomas Monjalon Sept. 3, 2015, 5:22 p.m. UTC | #3
2015-09-03 15:46, Mcnamara, John:
> > -----Original Message-----
> > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Thomas Monjalon
> > Sent: Thursday, September 3, 2015 3:34 PM
> > To: Singh, Jasvinder
> > Cc: dev@dpdk.org
> > Subject: Re: [dpdk-dev] [PATCH v2] librte_cfgfile (rte_cfgfile.h): modify
> > the macros values
> > 
> > >  doc/guides/rel_notes/deprecation.rst | 4 ----
> > >  lib/librte_cfgfile/Makefile          | 2 +-
> > >  lib/librte_cfgfile/rte_cfgfile.h     | 9 +++++++--
> > >  3 files changed, 8 insertions(+), 7 deletions(-)
> > 
> > You have forgotten to update doc/guides/rel_notes/release_2_2.rst.
> 
> The new release notes file hasn't been merged yet.

Right! It will be merged shortly.
  

Patch

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index da17880..ec049e7 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -86,10 +86,6 @@  Deprecation Notices
   be removed as well as the associated functions rte_acl_ipv4vlan_add_rules
   and rte_acl_ipv4vlan_build.
 
-* librte_cfgfile: In order to allow for longer names and values,
-  the value of macros CFG_NAME_LEN and CFG_NAME_VAL will be increased.
-  Most likely, the new values will be 64 and 256, respectively.
-
 * librte_port: Macros to access the packet meta-data stored within the
   packet buffer will be adjusted to cover the packet mbuf structure as well,
   as currently they are able to access any packet buffer location except the
diff --git a/lib/librte_cfgfile/Makefile b/lib/librte_cfgfile/Makefile
index 032c240..616aef0 100644
--- a/lib/librte_cfgfile/Makefile
+++ b/lib/librte_cfgfile/Makefile
@@ -41,7 +41,7 @@  CFLAGS += $(WERROR_FLAGS)
 
 EXPORT_MAP := rte_cfgfile_version.map
 
-LIBABIVER := 1
+LIBABIVER := 2
 
 #
 # all source are stored in SRCS-y
diff --git a/lib/librte_cfgfile/rte_cfgfile.h b/lib/librte_cfgfile/rte_cfgfile.h
index 7c9fc91..d443782 100644
--- a/lib/librte_cfgfile/rte_cfgfile.h
+++ b/lib/librte_cfgfile/rte_cfgfile.h
@@ -47,8 +47,13 @@  extern "C" {
 *
 ***/
 
-#define CFG_NAME_LEN 32
-#define CFG_VALUE_LEN 64
+#ifndef CFG_NAME_LEN
+#define CFG_NAME_LEN 64
+#endif
+
+#ifndef CFG_VALUE_LEN
+#define CFG_VALUE_LEN 256
+#endif
 
 /** Configuration file */
 struct rte_cfgfile;