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

Message ID 1441364325-4965-1-git-send-email-jasvinder.singh@intel.com (mailing list archive)
State Changes Requested, archived
Headers

Commit Message

Jasvinder Singh Sept. 4, 2015, 10:58 a.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 ----
 doc/guides/rel_notes/release_2_2.rst | 7 ++++++-
 lib/librte_cfgfile/Makefile          | 2 +-
 lib/librte_cfgfile/rte_cfgfile.h     | 9 +++++++--
 4 files changed, 14 insertions(+), 8 deletions(-)
  

Comments

Cristian Dumitrescu Sept. 7, 2015, 11:23 a.m. UTC | #1
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Jasvinder Singh
> Sent: Friday, September 4, 2015 1:59 PM
> To: dev@dpdk.org
> Subject: [dpdk-dev] [PATCH v3] librte_cfgfile(rte_cfgfile.h): modify the
> macros values
> 
> 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>
> ---

Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
  
Thomas Monjalon Oct. 19, 2015, 3:54 p.m. UTC | #2
2015-09-04 11:58, Jasvinder Singh:
> -#define CFG_NAME_LEN 32
> -#define CFG_VALUE_LEN 64
> +#ifndef CFG_NAME_LEN
> +#define CFG_NAME_LEN 64
> +#endif

Build fails:
examples/qos_sched/cfg_file.h:40:0: error: "CFG_NAME_LEN" redefined
  
Jasvinder Singh Oct. 22, 2015, 2:03 p.m. UTC | #3
This patchset is modifying two macros in rte_cfgfile
library thus ABI needs versioning. To meet requirements
of ABI compatibility release notes and Makefile is also
modified. Additionally a fix for qos_sched application is
send as previously it was incomplete in 2.1 and application
was redefining that macros.

v2:
*changed commit message
*removed deprecation notice
*updated makefile

v3:
*updated release note.

v4:
*fixed build error for qos_sched sample app.
*supplement incomplete implementation in 2.1

Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>

Michal Jastrzebski (1):
  qos_sched: fix example modification to use librte_cfgfile

Jasvinder Singh (1):
  librte_cfgfile(rte_cfgfile.h): modify the macros values


 doc/guides/rel_notes/deprecation.rst |   4 -
 doc/guides/rel_notes/release_2_2.rst |   6 +-
 examples/qos_sched/cfg_file.c        | 183 -----------------------------------
 examples/qos_sched/cfg_file.h        |  29 ------
 lib/librte_cfgfile/Makefile          |   2 +-
 lib/librte_cfgfile/rte_cfgfile.h     |   9 +-
 6 files changed, 13 insertions(+), 220 deletions(-)
  
Thomas Monjalon Oct. 22, 2015, 4:35 p.m. UTC | #4
> Michal Jastrzebski (1):
>   qos_sched: fix example modification to use librte_cfgfile
> 
> Jasvinder Singh (1):
>   librte_cfgfile(rte_cfgfile.h): modify the macros values

Applied with more meaningful titles:
	examples/qos_sched: remove duplicated cfgfile library
	cfgfile: increase entry name and value sizes
  
Jasvinder Singh Oct. 23, 2015, 8:12 a.m. UTC | #5
> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
> Sent: Thursday, October 22, 2015 5:36 PM
> To: Singh, Jasvinder
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v4 0/2] cfgfile: modify the macros values
> 
> > Michal Jastrzebski (1):
> >   qos_sched: fix example modification to use librte_cfgfile
> >
> > Jasvinder Singh (1):
> >   librte_cfgfile(rte_cfgfile.h): modify the macros values
> 
> Applied with more meaningful titles:
> 	examples/qos_sched: remove duplicated cfgfile library
> 	cfgfile: increase entry name and value sizes

Thank you, Thomas. I will work on having more precise titles in future.
  

Patch

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 5f6079b..2fbdee2 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -53,10 +53,6 @@  Deprecation Notices
 * The scheduler statistics structure will change to allow keeping track of
   RED actions.
 
-* 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/doc/guides/rel_notes/release_2_2.rst b/doc/guides/rel_notes/release_2_2.rst
index abe57b4..ff64da8 100644
--- a/doc/guides/rel_notes/release_2_2.rst
+++ b/doc/guides/rel_notes/release_2_2.rst
@@ -44,6 +44,11 @@  ABI Changes
 
 * The LPM structure is changed. The deprecated field mem_location is removed.
 
+* librte_cfgfile: In order to allow for longer names and values,
+  the value of macros CFG_NAME_LEN and CFG_NAME_VAL is increased,
+  the new values are 64 and 256, respectively
+
+
 
 Shared Library Versions
 -----------------------
@@ -54,7 +59,7 @@  The libraries prepended with a plus sign were incremented in this version.
 
    + libethdev.so.2
    + librte_acl.so.2
-     librte_cfgfile.so.1
+   + librte_cfgfile.so.2
      librte_cmdline.so.1
      librte_distributor.so.1
    + librte_eal.so.2
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;