Re: [lng-odp] [API-NEXT PATCHv7 5/5] linux-gen: drv_drivers: loading modules from config file

2016-12-30 Thread Anders Roxell
On 2016-12-30 10:09, Christophe Milard wrote:
> The shared objects listed in the ODP configuration files are
> loaded at init time. The odp configuration file list the
> shared objects to be loaded as shown in the following example:
> module = {
> modules = ["enumerator1.so", "driver1.so"];
> };
> 
> Signed-off-by: Christophe Milard 
> ---
>  configure.ac  |  4 +--
>  platform/linux-generic/drv_driver.c   | 41 
> +++
>  platform/linux-generic/include/odp_internal.h |  3 ++
>  platform/linux-generic/m4/configure.m4|  1 +
>  platform/linux-generic/m4/odp_drivers.m4  | 11 +++
>  platform/linux-generic/odp_init.c |  7 +
>  6 files changed, 65 insertions(+), 2 deletions(-)
>  create mode 100644 platform/linux-generic/m4/odp_drivers.m4
> 
> diff --git a/configure.ac b/configure.ac
> index 3a20959..e2b4f9d 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -55,7 +55,7 @@ AC_PROG_MAKE_SET
>  
>  AM_PROG_AR
>  #Use libtool
> -LT_INIT([])
> +LT_INIT([dlopen])
>  AC_SUBST([LIBTOOL_DEPS])
>  AM_PROG_LIBTOOL
>  
> @@ -66,7 +66,7 @@ AC_CHECK_FUNCS([bzero clock_gettime gethostbyname 
> getpagesize gettimeofday memse
>  
>  # Checks for header files.
>  AC_HEADER_RESOLV
> -AC_CHECK_HEADERS([arpa/inet.h fcntl.h inttypes.h limits.h netdb.h 
> netinet/in.h stddef.h stdint.h stdlib.h string.h sys/ioctl.h sys/socket.h 
> sys/time.h unistd.h])
> +AC_CHECK_HEADERS([arpa/inet.h fcntl.h inttypes.h limits.h netdb.h 
> netinet/in.h stddef.h stdint.h stdlib.h string.h sys/ioctl.h sys/socket.h 
> sys/time.h unistd.h dlfcn.h])

Alphabetic order

>  
>  # Checks for typedefs, structures, and compiler characteristics.
>  AC_HEADER_STDBOOL
> diff --git a/platform/linux-generic/drv_driver.c 
> b/platform/linux-generic/drv_driver.c
> index b3ec5af..29d9c47 100644
> --- a/platform/linux-generic/drv_driver.c
> +++ b/platform/linux-generic/drv_driver.c
> @@ -9,6 +9,8 @@
>  #include 
>  #include 
>  #include 
> +#include 
> +#include 

Alphabetic order?

>  
>  int odpdrv_enumr_class_register(odpdrv_enumr_class_t *enumr_class)
>  {
> @@ -41,3 +43,42 @@ int odpdrv_driver_register(odpdrv_driver_t *driver)
>  
>   return 0;
>  }
> +
 +static int load_modules(void)

load_modules vs. load_drivers?

If we want to load other modules except the "driver" module maybe we
need to move this code to a generic file?

> +{
> + const config_setting_t *modules_section;
> + const char *drv_name;

and change this to module_name

> + int i;
> + config_t *cf;
> + int drv_count;

and module_count


Cheers,
Anders


Re: [lng-odp] [API-NEXT PATCHv7 3/5] linux-gen: init: adding configuration file parsing

2016-12-30 Thread Anders Roxell
 
> +#include 
>  #include 
>  #include 
>  #include 
> @@ -21,6 +23,15 @@
>  #define _ODP_FILES_FMT "odp-%d-"
>  #define _ODP_TMPDIR"/tmp"
>  
> +/* the name of the ODP configuration file: */
> +#define CONFIGURATION_FILE_ENV_NONE "none"
> +#define CONFIGURATION_FILE "odp.conf"
> +#define CONFIGURATION_FILE_REL ("./" CONFIGURATION_FILE)
> +#define CONFIGURATION_FILE_ABS (SYSCONFDIR "/" CONFIGURATION_FILE)
> +
> +/* the ODP configuration file name can also be oveerwritten by env. 
> variable: */
> +#define ODP_SYSCONFIG_FILE_ENV "ODP_SYSCONFIG_FILE"
> +
>  struct odp_global_data_s odp_global_data;
>  
>  /* remove all files staring with "odp-" from a directory "dir" */
> @@ -65,6 +76,62 @@ static int cleanup_files(const char *dirpath, int odp_pid)
>   return 0;
>  }
>  
> +/* read the odp configuration file
> + *
> + * the configuration file is read from:
> + * 1) Wherever env variable ODP_SYSCONFIG_FILE says (or "none")
> + * 2) ./odp.conf

1 and 2 solves the same thing since you can start ODP from
different directories.
if you want a user specific file place that in $HOME/.odp.conf ?

Cheers,
Anders

> + * 3) the @sysconfig@/odp.conf
> + * (checked in reversed order overwritting each-other)
> + * So the environment variable setting supperseeds any other file.
> + * If the environment variable exists and set to the string "none"
> + * the configuration file reading is inibited (used to prevent
> + * test which do not need a file to read the user or system files)
> + */
> +static int read_configfile(void)
> +{
> + char *env_config_filename;
> + const char *config_filename;
> + config_t *cf;
> +
> + /* initialize and read the configuration file if any: */
> + cf = &odp_global_data.configuration;
> + config_init(cf);
> + config_filename = NULL;
> + if (access(CONFIGURATION_FILE_ABS, R_OK) != -1)
> + config_filename = CONFIGURATION_FILE_ABS;
> + if (access(CONFIGURATION_FILE_REL, R_OK) != -1)
> + config_filename = CONFIGURATION_FILE_REL;
> + env_config_filename = getenv(ODP_SYSCONFIG_FILE_ENV);
> + if (env_config_filename) {
> + if (!strcmp(env_config_filename, CONFIGURATION_FILE_ENV_NONE))
> + return 0;
> + if (access(env_config_filename, R_OK) != -1) {
> + config_filename = env_config_filename;
> + } else {
> + ODP_ERR("Cannot read ODP configurattion file %s "
> + "(set by env variable "
> + ODP_SYSCONFIG_FILE_ENV ")\n",
> + env_config_filename);
> + config_filename = NULL;
> + return -1;
> + }
> + }
> + if (config_filename) {
> + ODP_DBG("Reading configuration file: %s\n", config_filename);
> + if (!config_read_file(cf, config_filename)) {
> +     ODP_ERR("%s:%d - %s\n",
> + config_error_file(cf),
> + config_error_line(cf),
> + config_error_text(cf));
> + config_destroy(cf);
> + return(-1);
> + }
> + }
> +
> + return 0;
> +}
> +
>  int odp_init_global(odp_instance_t *instance,
>   const odp_init_t *params,
>   const odp_platform_init_t *platform_params ODP_UNUSED)
> @@ -86,6 +153,9 @@ int odp_init_global(odp_instance_t *instance,
>   odp_global_data.abort_fn = params->abort_fn;
>   }
>  
> + if (read_configfile())
> + goto init_failed;
> +
>   if (odp_cpumask_init_global(params)) {
>   ODP_ERR("ODP cpumask init failed.\n");
>   goto init_failed;
> -- 
> 2.7.4
> 

-- 
Anders Roxell
anders.rox...@linaro.org
M: +46 709 71 42 85 | IRC: roxell


Re: [lng-odp] [PATCH] enable shared library for non-abi compat mode

2016-12-05 Thread Anders Roxell
On 5 December 2016 at 08:43, Savolainen, Petri (Nokia - FI/Espoo)
 wrote:
>> -Original Message-
>> From: lng-odp [mailto:lng-odp-boun...@lists.linaro.org] On Behalf Of Maxim
>> Uvarov
>> Sent: Friday, December 02, 2016 4:31 PM
>> To: lng-odp@lists.linaro.org
>> Subject: [lng-odp] [PATCH] enable shared library for non-abi compat mode
>>
>> Signed-off-by: Maxim Uvarov 
>> ---
>>  configure.ac | 1 -
>>  1 file changed, 1 deletion(-)
>>
>> diff --git a/configure.ac b/configure.ac
>> index 3e89b0a..57edd33 100644
>> --- a/configure.ac
>> +++ b/configure.ac
>> @@ -253,7 +253,6 @@ AC_ARG_ENABLE([abi-compat],
>>  [if test "x$enableval" = "xno"; then
>>   ODP_ABI_COMPAT=0
>>   abi_compat=no
>> - enable_shared=no
>>  fi])
>>  AC_SUBST(ODP_ABI_COMPAT)
>
>
>> @@ -336,6 +334,7 @@ AC_MSG_RESULT([
>> static libraries:   ${enable_static}
>> shared libraries:   ${enable_shared}
>> ABI compatible: ${abi_compat}
>> +   ODP_ABI_COMPAT: ${ODP_ABI_COMPAT}
>
> Revert also this extra print of ABI compat. One status print is enough.

agree.

>
> After these reverts, only --enable-abi-compat is changed to 
> --disable-abi-compat (in ./configure --help). Autotools define both 
> (enable/disable) automatically, so --disable-abi-compat was always there

Right, thats true.

> (the one I was using anyway).

OK.

Anders

>
> -Petri
>


Re: [lng-odp] [PATCH] enable shared library for non-abi compat mode

2016-12-02 Thread Anders Roxell
On 2 December 2016 at 15:30, Maxim Uvarov  wrote:
> Signed-off-by: Maxim Uvarov 
> ---
>  configure.ac | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/configure.ac b/configure.ac
> index 3e89b0a..57edd33 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -253,7 +253,6 @@ AC_ARG_ENABLE([abi-compat],
>  [if test "x$enableval" = "xno"; then
> ODP_ABI_COMPAT=0
> abi_compat=no
> -   enable_shared=no

If we replace the the shared lib (--abi-compat) with the shared lib
built without abi-comapt, we can't tell that they are incompatible.
The SO number may be forced to be changed for the abi-compat version.
However, we have not changed the SO version for the non-abi-compat.

Inline for a shared library isn't bad if the inline code for all
platforms on the same architecture is the same. If it is not the same
it should be a static library.

Cheers,
Anders


Re: [lng-odp] [PATCHv10 3/3] configure.ac update version numbers

2016-12-01 Thread Anders Roxell
On 2016-12-01 17:29, Maxim Uvarov wrote:
> On 12/01/16 17:25, Mike Holmes wrote:
> >Thanks Steve
> >
> >In an effort to close on this
> >
> >Steve and Anders both say it should be
> >
> >-ODPHELPER_LIBSO_VERSION=110:0:1
> >+ODPHELPER_LIBSO_VERSION=110:1:1
> >
> >And they are our best resourse I consider my self educated :)
> >Maxim / Anders can we take the CURL  text and add any extra explanation we
> >need before  adding it to our docs ?
> >
> >Mike
> 
> ok, if first two patches ok then please add review-by and I will resping the
> latest with that changes and comment from curl.

Please add a link to the gnu [1] describes it as well.
[1] 
https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html

Cheers,
Anders

> 
> Maxim.
> 
> >
> >On 1 December 2016 at 09:17, Steve McIntyre  ><mailto:steve.mcint...@linaro.org>> wrote:
> >
> >On Thu, Dec 01, 2016 at 04:05:14PM +0300, Maxim Uvarov wrote:
> >>On 12/01/16 01:09, Anders Roxell wrote:
> >>> Since the ABI isn't changed we shouldn't bump the age only the 
> > revision.
> >>> The curl project [1] describes the rules in a easier way.
> >>>
> >>>[1]https://github.com/curl/curl/blob/master/lib/Makefile.am#L95
> ><https://github.com/curl/curl/blob/master/lib/Makefile.am#L95>
> >>
> >>curl project is not official documentation for autotools. So we
> >can take this
> >>under account but can not just follow it.
> >>
> >>So we have 2 official links describing that numbers:
> >>
> >>1. https://autotools.io/libtool/version.html
> ><https://autotools.io/libtool/version.html>
> >>2.
> >
> > https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
> >
> > <https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html>
> >>
> >>From link 1:
> >>"Always increase the revision value. "
> >>
> >>From link 2:
> >>"If the library source code has changed at all since the last
> >update, then
> >>increment revision (‘c:r:a’ becomes ‘c:/r+1/:a’). "
> >
> >Hi guys,
> >
> >Two things here...
> >
> >1. Maxim's two docs say exactly what the curl doc says - just in
> >   different language. Also from link 1:
> >
> >   """
> >   Warning
> >
> >   A common mistake is to assume that the three values passed to
> >   -version-info map directly into the three numbers at the end of the
> >   library name. This is not the case, and indeed, current, revision
> >   and age are applied differently depending on the operating system
> >   that one is using.
> >   """
> >
> >   The libtool -version_info stuff is *horrendously* confusing for
> >   many people precisely because of this awful mismatch :-( WTF
> >   they've defined things this way I have no idea...
> >
> >2. That just describes the *revision*, however. You've also increased
> >   the *age* by 2, and that's what Anders was complaining about. From
> >   the doc you have referenced here (link 1), increasing the *age* but
> >   not touching *current* makes no sense:
> >
> >   * Increase the current value whenever an interface has been
> >added, removed or changed.
> >   * Increase the age value only if the changes made to the ABI
> >are backward compatible.
> >
> >   The curl doc again agrees with that.
> >
> >Do these two points make sense to people?
> >
> >Cheers,
> >--
> >Steve McIntyre steve.mcint...@linaro.org
> ><mailto:steve.mcint...@linaro.org>
> ><http://www.linaro.org/> Linaro.org | Open source software for ARM
> >SoCs
> >
> >
> >
> >
> >-- 
> >Mike Holmes
> >Program Manager - Linaro Networking Group
> >Linaro.org <http://www.linaro.org/>***│ *Open source software for ARM SoCs
> >"Work should be fun and collaborative, the rest follows"
> >
> 

-- 
Anders Roxell
anders.rox...@linaro.org
M: +46 709 71 42 85 | IRC: roxell


Re: [lng-odp] [PATCHv10 3/3] configure.ac update version numbers

2016-11-30 Thread Anders Roxell
On 30 November 2016 at 22:02, Mike Holmes  wrote:
> I just CC'ed you in Steve.
>
> My head is spinning but I think we have this straight now, perhaps you have
> time to sync with Maxim and  possibly Anders if he has time to check this
> from ytour Debian background?
>
> I think if we can get the next couple of release out correctly the pattern
> will establish and it will be easier by the time we get to TigerMoth.
>
> Mike
>
> On 30 November 2016 at 15:32, Maxim Uvarov  wrote:
>
>> Default is abi compat mode, all interface functions changed,
>> so increase first number of .so
>>
>> Signed-off-by: Maxim Uvarov 
>> ---
>>  configure.ac | 6 +++---
>>  1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/configure.ac b/configure.ac
>> index b460a65..fe7e47d 100644
>> --- a/configure.ac
>> +++ b/configure.ac
>> @@ -3,7 +3,7 @@ AC_PREREQ([2.5])
>>  # Set correct API version
>>  
>> ##
>>  m4_define([odpapi_generation_version], [1])
>> -m4_define([odpapi_major_version], [11])
>> +m4_define([odpapi_major_version], [12])
>>  m4_define([odpapi_minor_version], [0])
>>  m4_define([odpapi_point_version], [0])
>>  m4_define([odpapi_version],
>> @@ -30,10 +30,10 @@ AM_SILENT_RULES([yes])
>>  
>> ##
>>  # Set correct platform library version
>>  
>> ##
>> -ODP_LIBSO_VERSION=111:0:0
>> +ODP_LIBSO_VERSION=112:0:0
>>  AC_SUBST(ODP_LIBSO_VERSION)
>>
>> -ODPHELPER_LIBSO_VERSION=110:0:1
>> +ODPHELPER_LIBSO_VERSION=110:1:2

Since the ABI isn't changed we shouldn't bump the age only the revision.
The curl project [1] describes the rules in a easier way.

Cheers,
Anders
[1] https://github.com/curl/curl/blob/master/lib/Makefile.am#L95

>>  AC_SUBST(ODPHELPER_LIBSO_VERSION)
>>
>>  # Checks for programs.
>> --
>> 2.7.1.250.gff4ea60
>>
>>
>
>
> --
> Mike Holmes
> Program Manager - Linaro Networking Group
> Linaro.org  *│ *Open source software for ARM SoCs
> "Work should be fun and collaborative, the rest follows"


Re: [lng-odp] [PATCHv7 3/3] configure.ac update version numbers

2016-11-29 Thread Anders Roxell
On 2016-11-24 23:24, Maxim Uvarov wrote:
> Default is abi compat mode, all interface functions changed,
> so increase first number of .so
> 
> Signed-off-by: Maxim Uvarov 
> ---
>  configure.ac | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/configure.ac b/configure.ac
> index b460a65..e7b8f8a 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -3,7 +3,7 @@ AC_PREREQ([2.5])
>  # Set correct API version
>  ##
>  m4_define([odpapi_generation_version], [1])
> -m4_define([odpapi_major_version], [11])
> +m4_define([odpapi_major_version], [12])
>  m4_define([odpapi_minor_version], [0])
>  m4_define([odpapi_point_version], [0])
>  m4_define([odpapi_version],
> @@ -30,10 +30,10 @@ AM_SILENT_RULES([yes])
>  ##
>  # Set correct platform library version
>  ##
> -ODP_LIBSO_VERSION=111:0:0
> +ODP_LIBSO_VERSION=112:0:0
>  AC_SUBST(ODP_LIBSO_VERSION)
>  
> -ODPHELPER_LIBSO_VERSION=110:0:1
> +ODPHELPER_LIBSO_VERSION=112:0:0

Unless libodphelper is exposing specific things about libodp, then no.
Is that the case?

Cheers,
Anders


Re: [lng-odp] [PATCHv6 1/3] configure.ac: disable shared library for non abi compat mode

2016-11-24 Thread Anders Roxell
On 24 November 2016 at 17:03, Maxim Uvarov  wrote:
> original configure.ac enables abi compat mode by default,
> even without --enable-abi-compat provided. And has broken
> logic to disable abi compat mode. Correct logic to build abi
> compat mode and option to disable it. Shared library is not
> needed for non abi compat mode, so turn it off.
>
> Signed-off-by: Maxim Uvarov 
> ---
>  configure.ac | 9 ++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index be5a292..7cb0c7a 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -241,16 +241,19 @@ ODP_CFLAGS="$ODP_CFLAGS -DODP_DEBUG=$ODP_DEBUG"
>  ODP_ABI_COMPAT=1
>  abi_compat=yes
>  AC_ARG_ENABLE([abi-compat],
> -[  --enable-abi-compat build all targets in ABI compatible mode 
> (default=yes)],
> +[  --disable-abi-compatdisable build all targets in ABI compatible 
> mode (default=no)],
>  [if test "x$enableval" = "xyes"; then
> ODP_ABI_COMPAT=1
> -   abi_compat=yes
>   else
> ODP_ABI_COMPAT=0
> -   abi_compat=no
>  fi])
>  AC_SUBST(ODP_ABI_COMPAT)
>
> +if test $ODP_ABI_COMPAT -eq 0; then
> +   enable_shared=no
> +   abi_compat=no
> +fi
> +
>  ##
>  # Default warning setup
>  ##
> --
> 2.7.1.250.gff4ea60
>

I think it should look something like this:
$ git df
diff --git a/configure.ac b/configure.ac
index be5a292..7becc2a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -241,13 +241,11 @@ ODP_CFLAGS="$ODP_CFLAGS -DODP_DEBUG=$ODP_DEBUG"
 ODP_ABI_COMPAT=1
 abi_compat=yes
 AC_ARG_ENABLE([abi-compat],
-[  --enable-abi-compat build all targets in ABI compatible
mode (default=yes)],
-[if test "x$enableval" = "xyes"; then
-   ODP_ABI_COMPAT=1
-   abi_compat=yes
- else
+[  --disable-abi-compat disables ABI compatible mode, enables
inline code in header files],
+[if test "x$enableval" = "xno"; then
ODP_ABI_COMPAT=0
abi_compat=no
+   enable_shared=no
 fi])
 AC_SUBST(ODP_ABI_COMPAT)

@@ -336,6 +334,7 @@ AC_MSG_RESULT([
static libraries:   ${enable_static}
shared libraries:   ${enable_shared}
ABI compatible: ${abi_compat}
+   ODP_ABI_COMPAT: ${ODP_ABI_COMPAT}
cunit:  ${cunit_support}
test_vald:  ${test_vald}
test_perf:  ${test_perf}


Re: [lng-odp] [PATCHv2] changelog: summary of changes for odp v1.11.1.0

2016-11-23 Thread Anders Roxell
On 2016-11-19 22:54, Maxim Uvarov wrote:
> Anders,
> 
> can you please send proposal patch for changing versions? I think it will be
> more easy to discuss it if we will have some working patch.
> 
> I also looked to numbering issue one more time and think that it will be
> good to have version in both abi and not abi compact library.
> 
> Our original version numbers in shipped files are:
> dynamic:
> libodp-linux.so -> libodp-linux.so.111.0.0
> libodp-linux.so.111 -> libodp-linux.so.111.0.0
> libodp-linux.so.111.0.0
> static:
> libodp-linux.a
> 
> 
> After reset it will be:
> dynamic:
> libodp-linux.so -> libodp-linux.so.0.0.0
> libodp-linux.so.0 -> libodp-linux.so.0.0.0
> libodp-linux.so.0.0.0
> static:
> libodphelper-linux.a
> 
> Reset I think you asked for such change:
> --- a/configure.ac
> +++ b/configure.ac
> @@ -245,6 +245,12 @@ AC_ARG_ENABLE([abi-compat],
>  [if test "x$enableval" = "xyes"; then
> ODP_ABI_COMPAT=1
> abi_compat=yes
> +
> +   # Reset library versions
> +   ODP_LIBSO_VERSION=0:0:0
> +   AC_SUBST(ODP_LIBSO_VERSION)
> +   ODPHELPER_LIBSO_VERSION=0:0:0
> +   AC_SUBST(ODPHELPER_LIBSO_VERSION)

This should be after else if we want this.

>   else
> ODP_ABI_COMPAT=0
> abi_compat=no

Instead of resetting the SO-version to 0:0:0 maybe we should just not
produce the shared libs?
Something like this:
AC_ENABLE_SHARED(no)

Cheers,
Anders

> 
> For both static and dynamic libraries API version will be reported as
> previous but .so version will be different.
> 
> I think that  it might be useful for debugging to see from which exactly
> version is used in file system. And more
> logically abi compat so should have name libodp-linux.so and non abi compat
> libodp-linux-generic.so. And keep
> all their numbers. In that case Cavium, Freescale, Odp-dpdk also sheep
> libodp-linux.so in abi compat mode and
> some other library name is non compat mode. (I.e. abi compat application
> uses libodp-linux.so on any platforms,
> and non abi application uses libodp-linux-plat.so only on platform where it
> was compiled.).
> 
> What do you think?
> 
> Thank you,
> Maxim.
> 
> 
> On 11/18/16 22:52, Anders Roxell wrote:
> >On 18 November 2016 at 01:34, Bill Fischofer  
> >wrote:libodp-linux.so.111.0.0
> >>Signed-off-by: Bill Fischofer 
> >>---
> >>Changes for v2:
> >>- Changed release level to v1.11.1.0 per Mike
> >>
> >>  CHANGELOG | 211 
> >> ++
> >>  1 file changed, 211 insertions(+)
> >>
> >>diff --git a/CHANGELOG b/CHANGELOG
> >>index d8230cd..66488e5 100644
> >>--- a/CHANGELOG
> >>+++ b/CHANGELOG
> >>@@ -1,3 +1,214 @@
> >>+== OpenDataPlane (1.11.1.0)
> >>+
> >>+=== New Features
> >>+
> >>+ APIs
> >>+ODP v1.11.1.0 is a minor API revision level beyond the Monarch Long Term
> >>+Support (LTS) release and introduces a small change to the Traffic Manager 
> >>API
> >>+as well as some documentation clarification surrounding other APIs.
> >>+
> >>+ Traffic Manager Egress Function
> >>+The `odp_tm_egress_t` struct has been changed to add an explicit Boolean
> >>+(`egress_fcn_supported`) that indicates whether the TM system supports
> >>+a user-provided egress function. When specified this function is called to
> >>+"output" a packet rather than having TM transmit it directly to a PktIO
> >>+interface.
> >>+
> >>+ Traffic Manager Coupling Change
> >>+The `odp_tm_egress_t` struct has been changed to associate a TM system 
> >>with an
> >>+output `odp_pktio_t` rather than the previous `odp_pktout_queue_t`. This 
> >>makes
> >>+an explicit 1-to-1 map between a TM system and a PktIO interface.
> >This means that we should bump the ODP's SO-version as well, since
> >we changed the struct that you mention + that we added "odp_bool_t
> >egress_fcn_supported;" to the same struct.
> >
> >>+
> >>+ Default huge page size clarification
> >>+The documentation for the `odp_sys_huge_page_size()` API has been reworded 
> >>to
> >>+clarify that this API refers to default huge page size.
> >>+
> >>+ Strict Priority (SP) Scheduler
> >>+Building on the modular scheduler framework added in v1.10.1.0, an 
> >>alternate
> >>+Strict Priority (SP) Scheduler is now available for latency-sensitive
> >&

Re: [lng-odp] [PATCHv5 2/2] configure.ac update version numbers

2016-11-22 Thread Anders Roxell
On 2016-11-22 21:25, Maxim Uvarov wrote:
> Signed-off-by: Maxim Uvarov 
> ---
>  configure.ac | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/configure.ac b/configure.ac
> index be5a292..287e478 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -3,7 +3,7 @@ AC_PREREQ([2.5])
>  # Set correct API version
>  ##
>  m4_define([odpapi_generation_version], [1])
> -m4_define([odpapi_major_version], [11])
> +m4_define([odpapi_major_version], [12])
>  m4_define([odpapi_minor_version], [0])
>  m4_define([odpapi_point_version], [0])
>  m4_define([odpapi_version],
> @@ -30,10 +30,10 @@ AM_SILENT_RULES([yes])
>  ##
>  # Set correct platform library version
>  ##
> -ODP_LIBSO_VERSION=111:0:0
> +ODP_LIBSO_VERSION=111:1:0

So the flag ABI-compat mode, if that is set to yes, that don't change
any function to not be inlined?

So my question is, whats the difference between setting that flag to yes
or no today? have we added more inline functions when setting the
abi-compat to no?

Cheers,
Anders

>  AC_SUBST(ODP_LIBSO_VERSION)
>  
> -ODPHELPER_LIBSO_VERSION=110:0:1
> +ODPHELPER_LIBSO_VERSION=110:1:1
>  AC_SUBST(ODPHELPER_LIBSO_VERSION)
>  
>  # Checks for programs.
> -- 
> 2.7.1.250.gff4ea60
> 


Re: [lng-odp] [PATCHv4 0/2] changelog: summary of changes for odp v1.12.0.0

2016-11-22 Thread Anders Roxell
On 2016-11-22 19:04, Maxim Uvarov wrote:
> going to merge is very soon, any objection?

Features already in monarch that should not be in the change log
Hello world
thread local

Documentation
examples added l2fwd
Implementers guide - updated
Release guide - updated

Cheers,
Anders

> 
> Maxim.
> 
> On 11/21/16 20:00, Maxim Uvarov wrote:
> >v4: no api changes from Monarch, I removed all entries for that in previous 
> >patch.
> >
> >Update only 'revision' according to that link:
> >https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
> >
> >Bill Fischofer (1):
> >   changelog: summary of changes for odp v1.12.0.0
> >
> >Maxim Uvarov (1):
> >   configure.ac update version numbers
> >
> >  CHANGELOG| 186 
> > +++
> >  configure.ac |   6 +-
> >  2 files changed, 189 insertions(+), 3 deletions(-)
> >
> 


Re: [lng-odp] [PATCHv2] changelog: summary of changes for odp v1.11.1.0

2016-11-18 Thread Anders Roxell
On 18 November 2016 at 01:34, Bill Fischofer  wrote:
> Signed-off-by: Bill Fischofer 
> ---
> Changes for v2:
> - Changed release level to v1.11.1.0 per Mike
>
>  CHANGELOG | 211 
> ++
>  1 file changed, 211 insertions(+)
>
> diff --git a/CHANGELOG b/CHANGELOG
> index d8230cd..66488e5 100644
> --- a/CHANGELOG
> +++ b/CHANGELOG
> @@ -1,3 +1,214 @@
> +== OpenDataPlane (1.11.1.0)
> +
> +=== New Features
> +
> + APIs
> +ODP v1.11.1.0 is a minor API revision level beyond the Monarch Long Term
> +Support (LTS) release and introduces a small change to the Traffic Manager 
> API
> +as well as some documentation clarification surrounding other APIs.
> +
> + Traffic Manager Egress Function
> +The `odp_tm_egress_t` struct has been changed to add an explicit Boolean
> +(`egress_fcn_supported`) that indicates whether the TM system supports
> +a user-provided egress function. When specified this function is called to
> +"output" a packet rather than having TM transmit it directly to a PktIO
> +interface.
> +
> + Traffic Manager Coupling Change
> +The `odp_tm_egress_t` struct has been changed to associate a TM system with 
> an
> +output `odp_pktio_t` rather than the previous `odp_pktout_queue_t`. This 
> makes
> +an explicit 1-to-1 map between a TM system and a PktIO interface.

This means that we should bump the ODP's SO-version as well, since
we changed the struct that you mention + that we added "odp_bool_t
egress_fcn_supported;" to the same struct.

> +
> + Default huge page size clarification
> +The documentation for the `odp_sys_huge_page_size()` API has been reworded to
> +clarify that this API refers to default huge page size.
> +
> + Strict Priority (SP) Scheduler
> +Building on the modular scheduler framework added in v1.10.1.0, an alternate
> +Strict Priority (SP) Scheduler is now available for latency-sensitive
> +workloads. Applications wishing to use the SP scheduler should specify
> +the `./configure` option `--enable-schedule-sp`. This scheduler emphasizes 
> low
> +latency processing of high priority events at the expense of throughput. This
> +alternate scheduler is considered experimental and should not be used for
> +production at this time.
> +
> + Application Binary Interface (ABI) Support
> +Support is added to enable ODP applications to be binary compatible across
> +different implementations of ODP sharing the same Instruction Set 
> Architecture
> +(ISA). This support introduces a new `configure` option:
> +
> +`--enable-abi-compat=yes`::
> +This is the default and specifies that the ODP library is to be built to
> +support ABI compatibility mode. In this mode ODP APIs are never inlined. ABI
> +compatibility ensures maximum application portability in cloud environments.
> +
> +`--enable-abi-compat=no`::
> +Specify this option to enable the inlining of ODP APIs. This may result in
> +improved performance at the cost of ABI compatibility and is suitable for
> +applications running in embedded environments.

before we do a new release I think we need to resolve what we
talked about in this thread [1].
Basically, if we disable ABI compat mode I think we should set the
SO-version to 0:0:0, to make it clear that we don't try to be ABI
compatible.

Cheers,
Anders
[1] https://lists.linaro.org/pipermail/lng-odp/2016-September/025734.html

> +
> +Note that ODP applications retain source code portability between ODP
> +implementations regardless of the ABI mode chosen. To move to a different ODP
> +application running on a different ISA, code need simply be recompiled 
> against
> +that target ODP implementation.
> +
> + SCTP Parsing Support
> +The ODP classifier adds support for recognizing Stream Control Transmission
> +Protocol (SCTP) packets. The APIs for this were previously not implemented.
> +
> +=== Packaging and Implementation Refinements
> +
> + Remove dependency on Linux headers
> +ODP no longer has a dependency on Linux headers. This will help make the
> +odp-linux reference implementation more easily portable to non-Linux
> +environments.
> +
> + Remove dependency on helpers
> +The odp-linux implementation has been made independent of the helper library
> +to avoid circular dependency issues with packaging. Helper functions may use
> +ODP APIs, however ODP implementations should not use helper functions.
> +
> + Reorganization of `test` directory
> +The `test` directory has been reorganized to better support a unified 
> approach
> +to ODP component testing. API tests now live in
> +`test/common_plat/validation/api` instead of the former
> +`test/validation`. With this change performance and validation tests, as well
> +as common and platform-specific tests can all be part of a unified test
> +hierarchy.
> +
> +The resulting test tree now looks like:
> +
> +.New `test` directory hierarchy
> +-
> +test
> +├── common_plat
> +│   ├── common
> +│   ├── m4
> +│   ├── miscellaneous
> +│   ├── per

Re: [lng-odp] [PATCH] travis: linux-gen: add dpdk pktio

2016-11-18 Thread Anders Roxell
On 18 November 2016 at 14:05, Maxim Uvarov  wrote:
> On 11/18/16 12:06, Anders Roxell wrote:
>>
>> On 7 November 2016 at 16:49, Maxim Uvarov  wrote:
>>>
>>> Turn on linux-generic dpdk and pcap pktios with their validation
>>> tests.
>>>
>>> Signed-off-by: Maxim Uvarov 
>>> ---
>>>   .travis.yml | 22 ++
>>>   1 file changed, 18 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/.travis.yml b/.travis.yml
>>> index 0d1add3..1092cd0 100644
>>> --- a/.travis.yml
>>> +++ b/.travis.yml
>>> @@ -11,6 +11,7 @@ sudo: required
>>>   before_install:
>>>   - sudo apt-get -qq update
>>>   - sudo apt-get install automake autoconf libtool libssl-dev
>>> graphviz mscgen doxygen
>>> +- sudo apt-get install libpcap-dev linux-headers-`uname -r`
>>>   - gem install asciidoctor
>>>
>>>   #   Install cunit for the validation tests because distro version
>>> is too old and fails C99 compile
>>> @@ -24,12 +25,25 @@ before_install:
>>>   - sudo make install
>>>   - cd ..
>>>   - export LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH"
>>> -
>>> -install:
>>> -- ./bootstrap
>>> +#  DPDK pktio
>>> +- TARGET=${TARGET:-"x86_64-native-linuxapp-gcc"}
>>> +- git clone http://dpdk.org/git/dpdk dpdk
>>> +- pushd dpdk
>>> +- git checkout -b bv16.07 v16.07
>>> +- make config T=${TARGET} O=${TARGET}
>>> +- pushd ${TARGET}
>>> +- sed -ri 's,(CONFIG_RTE_LIBRTE_PMD_PCAP=).*,\1y,' .config
>>> +- popd
>>> +- make install T=${TARGET} EXTRA_CFLAGS="-fPIC"
>>> +- popd
>>
>> why do we build DPDK from source and not just consume the deb package
>> with apt-get install?
>>
>> Cheers,
>> Anders
>>
> my ubuntu does not have dpdk deb package in apt repository. Especially
> v16.07 with PMD_PCAP and -fPIC.


Why did you push this patch while we still discuss the patch?

deb.opendataplane.org/... should have what you need.

>
> Current script follows steps from README.

OK, so maybe we should update the README.

> But I don't object if you want
> speed up tests with pre built dpdk package.

I guess someone want to do that.

Cheers,
Anders

>
> Maxim.
>
>
>>>   script:
>>> -- ./configure --enable-test-cpp --enable-test-vald
>>> --enable-test-helper --enable-test-perf --enable-user-guides
>>> --enable-test-perf-proc --enable-test-example
>>> +
>>> +- ./bootstrap
>>> +- ./configure --enable-test-cpp --enable-test-vald
>>> --enable-test-helper --enable-test-perf --enable-user-guides
>>> --enable-test-perf-proc --enable-test-example
>>> --with-dpdk-path=`pwd`/dpdk/${TARGET}
>>>   - make check
>>> +- git clean -f -d -x && rm -rf dpdk
>>> +- ./bootstrap
>>> +- ./configure
>>>   - make doxygen-doc
>>>   - make distcheck
>>> --
>>> 2.7.1.250.gff4ea60
>>>
>


Re: [lng-odp] [PATCH] travis: linux-gen: add dpdk pktio

2016-11-18 Thread Anders Roxell
On 7 November 2016 at 16:49, Maxim Uvarov  wrote:
> Turn on linux-generic dpdk and pcap pktios with their validation
> tests.
>
> Signed-off-by: Maxim Uvarov 
> ---
>  .travis.yml | 22 ++
>  1 file changed, 18 insertions(+), 4 deletions(-)
>
> diff --git a/.travis.yml b/.travis.yml
> index 0d1add3..1092cd0 100644
> --- a/.travis.yml
> +++ b/.travis.yml
> @@ -11,6 +11,7 @@ sudo: required
>  before_install:
>  - sudo apt-get -qq update
>  - sudo apt-get install automake autoconf libtool libssl-dev graphviz 
> mscgen doxygen
> +- sudo apt-get install libpcap-dev linux-headers-`uname -r`
>  - gem install asciidoctor
>
>  #   Install cunit for the validation tests because distro version is too 
> old and fails C99 compile
> @@ -24,12 +25,25 @@ before_install:
>  - sudo make install
>  - cd ..
>  - export LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH"
> -
> -install:
> -- ./bootstrap
> +#  DPDK pktio
> +- TARGET=${TARGET:-"x86_64-native-linuxapp-gcc"}
> +- git clone http://dpdk.org/git/dpdk dpdk
> +- pushd dpdk
> +- git checkout -b bv16.07 v16.07
> +- make config T=${TARGET} O=${TARGET}
> +- pushd ${TARGET}
> +- sed -ri 's,(CONFIG_RTE_LIBRTE_PMD_PCAP=).*,\1y,' .config
> +- popd
> +- make install T=${TARGET} EXTRA_CFLAGS="-fPIC"
> +- popd

why do we build DPDK from source and not just consume the deb package
with apt-get install?

Cheers,
Anders

>
>  script:
> -- ./configure --enable-test-cpp --enable-test-vald 
> --enable-test-helper --enable-test-perf --enable-user-guides 
> --enable-test-perf-proc --enable-test-example
> +
> +- ./bootstrap
> +- ./configure --enable-test-cpp --enable-test-vald 
> --enable-test-helper --enable-test-perf --enable-user-guides 
> --enable-test-perf-proc --enable-test-example 
> --with-dpdk-path=`pwd`/dpdk/${TARGET}
>  - make check
> +- git clean -f -d -x && rm -rf dpdk
> +- ./bootstrap
> +- ./configure
>  - make doxygen-doc
>  - make distcheck
> --
> 2.7.1.250.gff4ea60
>


Re: [lng-odp] [PATCH v2] linux-gen: build: de-couple abi compatibility from shared lib

2016-09-29 Thread Anders Roxell
On 30 September 2016 at 01:46, Petri Savolainen
 wrote:
> Building ABI compatible or shared library are two different
> targets. A shared library may be used also without ABI
> compatibility. A new --enable-abi-compat configuration option
> is introduced. By default libraries are not built in ABI compat
> mode to enable function inlining. There is a noticeable
> performance difference when e.g. odp_atomic_xxx calls
> are not inlined.
>
> Signed-off-by: Petri Savolainen 
> ---
>  configure.ac   | 26 -
>  platform/linux-generic/.gitignore  |  2 +-
>  platform/linux-generic/Makefile.am |  2 +-
>  platform/linux-generic/include/odp/api/atomic.h|  4 +--
>  platform/linux-generic/include/odp/api/byteorder.h |  4 +--
>  .../include/odp/api/plat/inlines.h.in  | 33 
> --
>  .../include/odp/api/plat/static_inline.h.in| 32 +
>  platform/linux-generic/include/odp/api/std_clib.h  |  4 +--
>  platform/linux-generic/include/odp/api/sync.h  |  4 +--
>  platform/linux-generic/m4/configure.m4 |  2 +-
>  platform/linux-generic/odp_atomic.c|  2 +-
>  platform/linux-generic/odp_byteorder.c |  2 +-
>  platform/linux-generic/odp_std_clib.c  |  2 +-
>  platform/linux-generic/odp_sync.c  |  2 +-
>  14 files changed, 66 insertions(+), 55 deletions(-)
>  delete mode 100644 platform/linux-generic/include/odp/api/plat/inlines.h.in
>  create mode 100644 
> platform/linux-generic/include/odp/api/plat/static_inline.h.in
>
> diff --git a/configure.ac b/configure.ac
> index 982aff7..f081c51 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -176,13 +176,6 @@ AM_CONDITIONAL([test_example], [test x$test_example = 
> xyes ])
>  AM_CONDITIONAL([HAVE_DOXYGEN], [test "x${DOXYGEN}" = "xdoxygen"])
>  AM_CONDITIONAL([user_guide], [test "x${user_guides}" = "xyes" ])
>  AM_CONDITIONAL([HAVE_MSCGEN], [test "x${MSCGEN}" = "xmscgen"])
> -if test x$enable_shared != xyes;
> -then
> -   _ODP_INLINES="_ODP_INLINES"
> -else
> -   _ODP_INLINES="_ODP_NO_INLINES"
> -fi
> -AC_SUBST(_ODP_INLINES)
>
>  ##
>  # Setup doxygen documentation
> @@ -225,6 +218,22 @@ AC_ARG_ENABLE([debug],
>  ODP_CFLAGS="$ODP_CFLAGS -DODP_DEBUG=$ODP_DEBUG"
>
>  ##
> +# Enable/disable ABI compatible build
> +##
> +ODP_ABI_COMPAT=1
> +abi_compat=yes
> +AC_ARG_ENABLE([abi-compat],
> +[  --enable-abi-compat build all targets in ABI compatible mode 
> (default=yes)],
> +[if test "x$enableval" = "xyes"; then
> +   ODP_ABI_COMPAT=1
> +   abi_compat=yes
> + else
> +   ODP_ABI_COMPAT=0
> +   abi_compat=no
> +fi])
> +AC_SUBST(ODP_ABI_COMPAT)

I'm sorry for the late reply but to recap, I had a comment that we
must have a way
to tell users that we built a shared lib that isn't ABI-compatible,
one way to do that
would be to reset SO-version to 0:0:0 [1] and you replied that we weren't
ABI-compatible [2] and that you were not sure how libs version number could
indicate that [2].

So what I propose is that we reset the SO-version number to 0:0:0 if we build a
library with ODP_ABI_COMPAT=0, then the consumers know that they have to
rebuild their code if they wan't to build against this library.
And you are correct about that we aren't ABI-compatible yet, however, I see that
as another issue that we need to work towards.
For this patch where we introduce a new configure flag that will for sure break
for project that consumes ODP I think we need to find a way to tell them how
the library have been built.

Cheers,
Anders
[1] https://lists.linaro.org/pipermail/lng-odp/2016-September/025608.html
[2] https://lists.linaro.org/pipermail/lng-odp/2016-September/025619.html

> +
> +##
>  # Default warning setup
>  ##
>  ODP_CFLAGS="$ODP_CFLAGS -W -Wall -Werror -Wstrict-prototypes 
> -Wmissing-prototypes"
> @@ -307,6 +316,9 @@ AC_MSG_RESULT([
> am_ldflags: ${AM_LDFLAGS}
> libs:   ${LIBS}
> defs:   ${DEFS}
> +   static libraries:   ${enable_static}
> +   shared libraries:   ${enable_shared}
> +   ABI compatible: ${abi_compat}
> cunit:  ${cunit_support}
> test_vald:  ${test_vald}
> test_perf:  ${test_perf}
> diff --git a/platform/linux-generic/.gitignore 
> b/platform/linux-generic/.gitignore
> index ec6ca37..909756a 100644
> --- a/platform/linux-generic/.gitignore
> +++ b/platform/linux-generic/.gitignore
> @@ -1 +1 @@
> -include/odp/api/plat/i

Re: [lng-odp] [PATCHv3] test: linux-gen: add pcap playback test

2016-09-14 Thread Anders Roxell
> > >> +
> > >> +   if (packet_flags.all != args->appl.expected_bits.all) {
> > >> +   LOG_ERR("Flags %" PRIu64 " expected %" PRIu64 "\n",
> > >> +   packet_flags.all, args->appl.expected_bits.all);
> > >> +   free(args);
> > >> +   return -1;
> > >> +   }
> > >> +
> > >> +   free(args);
> > >> +   return 0;
> > >> +}
> > >> diff --git a/test/linux-generic/cls/cls_main.c
> > >> b/test/linux-generic/cls/cls_main.c
> > >> new file mode 100644
> > >> index 000..40179b9
> > >> --- /dev/null
> > >> +++ b/test/linux-generic/cls/cls_main.c
> > >> @@ -0,0 +1,12 @@
> > >> +/* Copyright (c) 2016, Linaro Limited
> > >> + * All rights reserved.
> > >> + *
> > >> + * SPDX-License-Identifier: BSD-3-Clause
> > >> + */
> > >> +
> > >> +#include "cls_suites.h"
> > >> +
> > >> +int main(int argc, char *argv[])
> > >> +{
> > >> +   return cls_main(argc, argv);
> > >> +}
> > >> diff --git a/test/linux-generic/cls/cls_suites.h
> > >> b/test/linux-generic/cls/cls_suites.h
> > >> new file mode 100644
> > >> index 000..94c9b55
> > >> --- /dev/null
> > >> +++ b/test/linux-generic/cls/cls_suites.h
> > >> @@ -0,0 +1 @@
> > >> +int cls_main(int argc, char *argv[]);
> > >> diff --git a/test/linux-generic/cls/vlan.pcap
> > >> b/test/linux-generic/cls/vlan.pcap
> > >> new file mode 100644
> > >> index ..106ccb682e51495b40
> > >> 25337518a0bce63c2c7681
> > >> GIT binary patch
> > >> literal 9728
> > >> zcmeHNeQXrR6@Rikyh3QAN~9xK+}$
> > >> z4T)^-QnlAgC4W>Yk*X>mRlo92km}Nw!c|oiNTn)LBLcyK0BKSYLZiA0xI}f|@6FEc
> > >> z&CT8}Zu4i?dS2hYnK$pf`MuxF&iVB}9(>lN6zOYfipb#)S3BqRK6jeva#{)P%KZ4H
> > >> z2`Z!uf1f`})Rm#nP-l2Nx8d?iyv8ohr8v56pV)=ly+yzZvNmzS?$(tvQ({
> > >> zN`3H(bKv=xSCLCcs6x0O=6jaXv{mjz%{=NyEc#gk|LwB0u=KHqz1)uIAM9Usn@mg_
> > >> zk2Z3jR&?;MUcTp8vTSb+>k8B@8d$;SEO~No<@;@ZpT?k%M|X%lk9|?s`aqYWyx8+Z
> > >> z0ekoid$_k!Cq3- > >> zljw+U^mWzt`dC-+XBzhK8TN2Tj(!$l@3W%oreFHHd@xpu)``6eKOy$gmCxBdp4?km
> > >> zcOk;wono&-@A$eG`7XZiNzwWmd-x3haEHC`0}y;QvZ#0!b{bfxaRTgY=FeI7XemDg
> > >> zrt~v(2bR#*#*@ZM8*9~NW2GVr#A;%NVz9F1ZjF^e?ya$>uoBL#iIo(6N4XHj>S(MG
> > >> zeb3ib&#l6WQUqAxJ_;+1G%sQ<6jmy<(AQPlQ& > >> ztzC_u6q?Ejk-3sTiy%
> > >> zJLqU*1*lbZW@5#)vBLROyi$q5N@&mI6<4qV_HQ01DswYP6#Khh&#x#j`~T|OCi|bb
> > >> zN3;J^@0;w82*T>sY!!z<-^(tatsc~D<=O~jv?n9bxA(ZuR@_G+(2YT0#YW(iMxbxc
> > >> zLZBOiz%;k6x2kCtQg)HA>t~@#46@u{#j=rA!7#$$CbB9q$Z}(l71}eARf%CCH-?2m
> > >> zdtf0!=0&0c`wW?qD??ss=9y8V-J`2{2h$^47+;s#M(N!gA6oF=4y70DLnrRc7wjFF
> > >> zOx)+JEMT8A&qVskA84dEJRcza81^~gx*CC0u1|&3bPQLjeGd2o2!%a`RQ9+oSCWm?
> > >> zfGfKtTAM4q7^HeU`u~Dd8B&mS{p)1}QkhfLdKua?kxJ7;D%*=(FFD6*y`l^
> > >> zmt?b5fB`qaKtG2kYe<9MTZQq~VxY+d#f#X
> > >> zC-1F%$Jh;<)qLNa>FllkkCp7lgq7o*eqgVOD_&tEZf{L=#F~HiI`-D;-3T*n&wsd=
> > >> zGr8jW-oxxwEwpEHg=cUD*#9!K|9#A > >> zg?TY+W$2}>m0g;Fych=ZV%Eygp6u8k*ZU > >> z$o3L`#oxqmOo3LGZ$h?rzm4+*WW0SiRYs-+A&1
> > >> z6<~FR > >> zhdl$C?4;5|r=G9K9Q(-%d8OMrIdwGG^Oqt{A0Ybbl^XN=lhQ-iCC@izetSZ-RQ+Es
> > >> zq7ope$T_TPtm>cZIbrB=T4CznDB`pN0v}Lu>#O=_=?(F(i=TJYjDJ}CKUqZOK;XlW
> > >> zW&ce>|FES$T?GCi@Bt?r&luyM7XKF29e=!tnt;HE4=wv=3_VUm%=ph1@rDb54>%Dq
> > >> z$3H9n?W;TfTSe3m1U~Gy?4LLEI6X1Pzfi<34+0->f|57lzaakAAOGzlY7PP){$$yI
> > >> z$I#=n#T@_LB6b82_<$3a7acH@#^1Z*-@Ll<|E&nzLEyuqyhAYUUo`YMoiX*7ia3dZ
> > >> z;A-ItTIyoYpzG&S@h;ZoU6)S)@O)!t$5R`F`pHhJ{%EiI)z;Ss3HYC|@IPqeU+H0A
> > >> z)kSUn{WAgI9~yd`*qHHOG4PL58xwz5#6O%M&W^0Vs|oo2m!ZcAk2(G|1OGVXF~`3q
> > >> z{ykZD{Ergw{cl5$6Crc_DFgo%)|>dB694LtPo--7+xT`x5BA^1?EeJsNFY&biu+J`
> > >> z4%q)ozcAT<=luh-6#JLUCj0BE!@HIlRYR$|s&F=CR#ig@)wZy1R#T > >> z%N##bs;#PSqpC6`RMm2>s%&Icss8L9pLwC`YO5++s$O;MRi&*|y(-wKpH-@6Z5x#x
> > >> zrD|5SQFF5~>vsOT67sV!!T-ex{x3`L|JGRlfyPUW#!Z}ANYs9kR_0d$jlVvQ-3<__
> > >> zzBM_!y}xhg{UdE(-nw?Pv7elP)eUZ<)zxD4m~D0Fz)0JJ9Z^=tXR=k^G(w^(C$+LX
> > >> z7girQXI9S80aZDBhZpdHIlkcu_f4x3W^hfy3>Fe*@Q#ETyfa}2H^uwJ*p
> > >> zTm8nmq4bzs#b>qa#@2-RKWFH%k2WiOo53*HOPdU{P5i^@`pn36V=y7VpEvY)^Eb!e
> > >> zVKGe3V3-}kF!PyVnj;xT^+$eGzgmVFN|@hW3G@3v!u;+|nBRvI^1sK*|8Zmfl^*e_
> > >> z=jQy+d~7(#FE;^v&LjLw8
> > >> zLcwAy~ > >> zy~CGxnpQXQw}sm|hc~d`YNjsQ!0+vN*2Ln_T-HGxxocg > >> z4RoIL>tx#yoVIkz`Sa8B9XijSA(4^2mR}>0-BJ_Tss29B7e_YvoEaIu-^}r7-=$^F
> > >> z6~cGXX+DRoz`pSeQC2_O!0pfvZ7;gZocCA|HJ+)q%N#r>S}s!E9?#x$mpi>Ywi-))
> > >> zzlqPPulkI+{1I=!jps-HaGs&hb6xvm83*LP+jfr{?Bf
> > >> zI_W|jxoaKf2D63d>gQgWH`vr!f<1NJC-ZiBu|or#2S`*D&f5H1L^1ZenkfFNqp0wI
> > >> zSNQ)QAvgyjv46|5;Cj<-r46np&s0uZI3frlYYB8{@6ZhP9)c)li1)B%M;7X4_~V3;
> > >> zweY?r!UwhjTaiBax{uQbVC0ia6YITCFtX0f?z#7McFRAtvy0s`aDWT^itOSU<``9e
> > >> z*o8Q9*E$t7pW+Ae-z3@9wtyG(Q9m~XI#usY+z*2OO@f;?E}jJRuan5`F(W(w6&+cA
> > >> zwHX;uyoe*XMIvi=PPq_Zq+RM4y2TP<&N=BqfRS9F>k(Zw`a|6ku?bs}H2&4@V19 > >> zID}Ini24?e_AhE5T`)?NmT%$iQtg$F&ri|}c4@KSDc;0y{aiISvdwh*S?0(k1@)&>
> > >> zQ7plIU*=6|dR#J=D > >> zQO3ei&J^yz0(2S+l^`1m3)&VifIih&fKFqf!Wckb+_euHkKzNjM0<@#!v|j%=L2j_
> > >> H$A|v_$relS
> > >>
> > >> literal 0
> > >> HcmV?d1
> > >>
> > >> diff --git a/test/linux-generic/cls/vlan_run.sh
> > >> b/test/linux-generic/cls/vlan_run.sh
> > >> new file mode 100755
> > >> index 000..7875eaf
> > >> --- /dev/null
> > >> +++ b/test/linux-generic/cls/vlan_run.sh
> > >> @@ -0,0 +1,49 @@
> > >> +#!/bin/sh
> > >> +#
> > >> +# Copyright (c) 2016, Linaro Limited
> > >> +# All rights reserved.
> > >> +#
> > >> +# SPDX-License-Identifier:  BSD-3-Clause
> > >> +#
> > >> +
> > >> +# directories where binary can be found:
> > >> +# -in the validation dir when running make check (intree or out of
> > tree)
> > >> +# -in the script directory, when running after 'make install', or
> > >> +# -in the validation when running standalone intree,
> > >> +# -in the _build directory, when running after 'make distcheck',
> > >> +# -in the current directory.
> > >> +# running stand alone out of tree requires setting PATH
> > >> +PATH=${TEST_DIR}/linux-generic/cls:$PATH
> > >> +PATH=$(dirname $0):$PATH
> > >> +PATH=$(dirname $0)/../../../../test/linux-generic/cls:$PATH
> > >> +PATH=$(dirname $0)/../../../../_build/test/linux-generic/cls:$PATH
> > >> +PATH=.:$PATH
> > >> +
> > >> +bin_path=$(which cls_main${EXEEXT})
> > >> +if [ -x "$bin_path" ] ; then
> > >> +   echo "Running with $bin_path"
> > >> +else
> > >> +   echo "Cannot find cls_main${EXEEXT}"
> > >> +   echo "Please set you PATH for it. PATH=$PATH"
> > >> +fi
> > >> +
> > >> +# Test1: find vlan packets in pcap file and test internal
> > >> pkt_mmap_vlan_insert()
> > >> +#   function. Load packets from vlan.pcap file and check that
> > >> classifier
> > >> +#   set vlan bits fisible with odp_packet_has_vlan().
> > >> +
> > >> +PCAP=`find . ${TEST_DIR} $(dirname $0) -name vlan.pcap -print -quit`
> > >> +
> > >> +cls_main -i $PCAP -e 4097
> > >> +ret=$?
> > >> +
> > >> +PCAP_IN_SIZE=`stat -c %s $PCAP`
> > >> +PCAP_OUT_SIZE=`stat -c %s test_out.pcap`
> > >> +
> > >> +rm -f test_out.pcap
> > >> +
> > >> +if [ ${ret} -ne 0 ] || [ ${PCAP_IN_SIZE} -ne ${PCAP_OUT_SIZE} ]; then
> > >> +   echo "Error: status ${ret}, in:${PCAP_IN_SIZE}
> > >> out:${PCAP_OUT_SIZE}"
> > >> +   exit 3
> > >> +fi
> > >> +
> > >> +echo "PASS: test 1 passed"
> > >> diff --git a/test/linux-generic/m4/configure.m4
> > >> b/test/linux-generic/m4/configure.m4
> > >> index 6b92201..1b722f6 100644
> > >> --- a/test/linux-generic/m4/configure.m4
> > >> +++ b/test/linux-generic/m4/configure.m4
> > >> @@ -3,6 +3,7 @@ m4_include([test/linux-generic/m4/performance.m4])
> > >>   AC_CONFIG_FILES([test/linux-generic/Makefile
> > >>  test/linux-generic/validation/api/shmem/Makefile
> > >>  test/linux-generic/validation/api/pktio/Makefile
> > >> +test/linux-generic/cls/Makefile
> > >>  test/linux-generic/pktio_ipc/Makefile
> > >>  test/linux-generic/ring/Makefile
> > >>  test/linux-generic/performance/Makefile])
> > >>
> > >
> > >
> >
> >
> > --
> > Mike Holmes
> > Program Manager - Linaro Networking Group
> > Linaro.org <http://www.linaro.org/> *│ *Open source software for ARM SoCs
> > "Work should be fun and collaborative, the rest follows"
> >

-- 
Anders Roxell
anders.rox...@linaro.org
M: +46 709 71 42 85 | IRC: roxell


Re: [lng-odp] [PATCH] linux-gen: build: de-couple abi compatibility from shared lib

2016-09-13 Thread Anders Roxell
On 8 September 2016 at 16:24, Petri Savolainen
 wrote:
> Building ABI compatible or shared library are two different
> targets. A shared library may be used also without ABI
> compatibility. A new --enable-abi-compat configuration option
> is introduced. By default libraries are not built in ABI compat
> mode to enable function inlining. There is a noticeable
> performance difference when e.g. odp_atomic_xxx calls
> are not inlined.
>
> Signed-off-by: Petri Savolainen 
> ---
>  configure.ac   | 20 -
>  platform/linux-generic/.gitignore  |  1 -
>  platform/linux-generic/include/odp/api/atomic.h|  2 +-
>  platform/linux-generic/include/odp/api/byteorder.h |  2 +-
>  .../linux-generic/include/odp/api/plat/inlines.h   | 16 +++
>  .../include/odp/api/plat/inlines.h.in  | 33 
> --
>  platform/linux-generic/include/odp/api/std_clib.h  |  2 +-
>  platform/linux-generic/include/odp/api/sync.h  |  2 +-
>  platform/linux-generic/m4/configure.m4 |  3 +-
>  platform/linux-generic/odp_atomic.c|  2 +-
>  platform/linux-generic/odp_byteorder.c |  2 +-
>  platform/linux-generic/odp_std_clib.c  |  2 +-
>  platform/linux-generic/odp_sync.c  |  2 +-
>  13 files changed, 38 insertions(+), 51 deletions(-)
>  delete mode 100644 platform/linux-generic/.gitignore
>  create mode 100644 platform/linux-generic/include/odp/api/plat/inlines.h
>  delete mode 100644 platform/linux-generic/include/odp/api/plat/inlines.h.in
>
> diff --git a/configure.ac b/configure.ac
> index 982aff7..583542f 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -176,13 +176,6 @@ AM_CONDITIONAL([test_example], [test x$test_example = 
> xyes ])
>  AM_CONDITIONAL([HAVE_DOXYGEN], [test "x${DOXYGEN}" = "xdoxygen"])
>  AM_CONDITIONAL([user_guide], [test "x${user_guides}" = "xyes" ])
>  AM_CONDITIONAL([HAVE_MSCGEN], [test "x${MSCGEN}" = "xmscgen"])
> -if test x$enable_shared != xyes;
> -then
> -   _ODP_INLINES="_ODP_INLINES"
> -else
> -   _ODP_INLINES="_ODP_NO_INLINES"
> -fi
> -AC_SUBST(_ODP_INLINES)
>
>  ##
>  # Setup doxygen documentation
> @@ -225,6 +218,19 @@ AC_ARG_ENABLE([debug],
>  ODP_CFLAGS="$ODP_CFLAGS -DODP_DEBUG=$ODP_DEBUG"
>
>  ##
> +# Enable/disable ABI compatible build
> +##
> +ODP_ABI_COMPAT=0
> +AC_ARG_ENABLE([abi-compat],
> +[  --enable-abi-compat build in ABI specification compatible mode],
> +[if test "x$enableval" = "xyes"; then
> +   ODP_ABI_COMPAT=1
> + else
> +   ODP_ABI_COMPAT=0

if we disable ABI compat mode I think we should set the SO-version to
0:0:0, to make
it clear that we don't try to be ABI compatible.

Cheers,
Anders

> +fi])
> +ODP_CFLAGS="$ODP_CFLAGS -DODP_ABI_COMPAT=$ODP_ABI_COMPAT"
> +
> +##
>  # Default warning setup
>  ##
>  ODP_CFLAGS="$ODP_CFLAGS -W -Wall -Werror -Wstrict-prototypes 
> -Wmissing-prototypes"
> diff --git a/platform/linux-generic/.gitignore 
> b/platform/linux-generic/.gitignore
> deleted file mode 100644
> index ec6ca37..000
> --- a/platform/linux-generic/.gitignore
> +++ /dev/null
> @@ -1 +0,0 @@
> -include/odp/api/plat/inlines.h
> diff --git a/platform/linux-generic/include/odp/api/atomic.h 
> b/platform/linux-generic/include/odp/api/atomic.h
> index c18e68b..66cfef7 100644
> --- a/platform/linux-generic/include/odp/api/atomic.h
> +++ b/platform/linux-generic/include/odp/api/atomic.h
> @@ -25,7 +25,7 @@ extern "C" {
>   */
>
>  #include 
> -#ifdef _ODP_INLINES
> +#if ODP_ABI_COMPAT == 0
>  #include 
>  #endif
>
> diff --git a/platform/linux-generic/include/odp/api/byteorder.h 
> b/platform/linux-generic/include/odp/api/byteorder.h
> index 84d1173..37f5636 100644
> --- a/platform/linux-generic/include/odp/api/byteorder.h
> +++ b/platform/linux-generic/include/odp/api/byteorder.h
> @@ -26,7 +26,7 @@ extern "C" {
>   */
>
>  #include 
> -#ifdef _ODP_INLINES
> +#if ODP_ABI_COMPAT == 0
>  #include 
>  #endif
>
> diff --git a/platform/linux-generic/include/odp/api/plat/inlines.h 
> b/platform/linux-generic/include/odp/api/plat/inlines.h
> new file mode 100644
> index 000..e042bd7
> --- /dev/null
> +++ b/platform/linux-generic/include/odp/api/plat/inlines.h
> @@ -0,0 +1,16 @@
> +/* Copyright (c) 2016, Linaro Limited
> + * All rights reserved.
> + *
> + * SPDX-License-Identifier: BSD-3-Clause
> + */
> +
> +/**
> + * @file
> + *
> + * Macro for static inline functions
> + */
> +#if ODP_ABI_COMPAT == 0
> +#define _STATIC static inline
> +#else
> +#define _STATIC
> +#endif
> diff --git a/platform/linux-generic/include/odp/api/plat/inlines.h

Re: [lng-odp] [PATCHv2] test: linux-gen: add pcap playback test

2016-08-26 Thread Anders Roxell
On 25 August 2016 at 10:14, Maxim Uvarov  wrote:
> On 08/25/16 00:34, Anders Roxell wrote:
>>>>>
>>>>> +#include 
>>>>
>>>> > >why do we include an internal header file?
>>>> > >
>>>
>>> >
>>> >because we need access to classifier bits, that is why this test is
>>> > under
>>> >linux-generic.
>>
>> OK, but do we really have to fiddle with internal classifier bits?
>>
>
> That is good question. For linux-generic it's bit's for other platform it
> might be something else.
> I would like to change input_flags_t (linux-generic internal) to something
> else which might be common
> for all platforms.

By definition if we want to extend something that will be useful for
all platforms
it should be in the public API.

> From other point of view if bit field will be changed in
> linux-generic we should not
> loose testing functionality. I'm not sure that all platforms support now
> pcap so that removing internal
> header might be not needed as this is internal platform test. When we will
> move to common then
> of course we need to remove internals. How about make it separate patch?

Yes if you include that first I'm all for it.

Anders


Re: [lng-odp] [PATCHv2] test: linux-gen: add pcap playback test

2016-08-24 Thread Anders Roxell
On 2016-08-09 15:46, Maxim Uvarov wrote:
> On 08/06/16 22:30, Anders Roxell wrote:
> >--- a/test/linux-generic/m4/configure.m4
> >>+++ b/test/linux-generic/m4/configure.m4
> >>@@ -1,5 +1,6 @@
> >>  AC_CONFIG_FILES([test/linux-generic/Makefile
> >> test/linux-generic/validation/api/shmem/Makefile
> >> test/linux-generic/validation/api/pktio/Makefile
> >>+test/linux-generic/cls/Makefile
> here is validation group and all non validation tests are in alphabetic
> order bellow.

Basically, they are in some order. I see what you are trying to achieve.
Then we need some more patches to fix it.

Cheers,
Anders


Re: [lng-odp] [PATCHv2] test: linux-gen: add pcap playback test

2016-08-24 Thread Anders Roxell
On 2016-08-08 09:59, Maxim Uvarov wrote:
> Hello Anders,
> 
> thanks for review, there are 2 comments bellow. Will send v2.
> 
> Maxim.
> 
> On 08/06/16 22:30, Anders Roxell wrote:
> >On 2016-08-02 19:08, Maxim Uvarov wrote:
> >>add pcap play back test which takes 2 arguments: 1 - pcap file,
> >>2 - packet mask to match. Intend is to test odp with different
> >>input traffic to check internal implementation functions. In
> >>current case it's test for vlan tag instertion for packet mmap:
> >>pkt_mmap_vlan_insert().
> >>
> >>Signed-off-by: Maxim Uvarov 
> >>---
> >>  v2: up the patch, dirrect execution looks like works.
> >>
> >>  test/linux-generic/.gitignore   |   1 +
> >>  test/linux-generic/Makefile.am  |  10 +-
> >>  test/linux-generic/cls/.gitignore   |   3 +
> >>  test/linux-generic/cls/Makefile.am  |  13 ++
> >>  test/linux-generic/cls/cls.c| 349 
> >> 
> >>  test/linux-generic/cls/cls_main.c   |  12 ++
> >>  test/linux-generic/cls/cls_suites.h |   1 +
> >>  test/linux-generic/cls/vlan.pcap| Bin 0 -> 9728 bytes
> >>  test/linux-generic/cls/vlan_run.sh  |  49 +
> >>  test/linux-generic/m4/configure.m4  |   1 +
> >>  10 files changed, 435 insertions(+), 4 deletions(-)
> >>  create mode 100644 test/linux-generic/cls/.gitignore
> >>  create mode 100644 test/linux-generic/cls/Makefile.am
> >>  create mode 100644 test/linux-generic/cls/cls.c
> >>  create mode 100644 test/linux-generic/cls/cls_main.c
> >>  create mode 100644 test/linux-generic/cls/cls_suites.h
> >>  create mode 100644 test/linux-generic/cls/vlan.pcap
> >>  create mode 100755 test/linux-generic/cls/vlan_run.sh
> >>
> >>diff --git a/test/linux-generic/.gitignore b/test/linux-generic/.gitignore
> >>index 5dabf91..f65c7c1 100644
> >>--- a/test/linux-generic/.gitignore
> >>+++ b/test/linux-generic/.gitignore
> >>@@ -1,3 +1,4 @@
> >>  *.log
> >>  *.trs
> >>  tests-validation.env
> >>+test_out.pcap
> >>diff --git a/test/linux-generic/Makefile.am b/test/linux-generic/Makefile.am
> >>index f5cc52d..9acbab0 100644
> >>--- a/test/linux-generic/Makefile.am
> >>+++ b/test/linux-generic/Makefile.am
> >>@@ -1,5 +1,8 @@
> >>  include $(top_srcdir)/test/Makefile.inc
> >>  TESTS_ENVIRONMENT += TEST_DIR=${top_builddir}/test/common_plat/validation
> >>+TEST_EXTENSIONS = .sh
> >>+
> >>+dist_check_SCRIPTS = run-test tests-validation.env $(LOG_COMPILER)
> >>  ALL_API_VALIDATION_DIR = ${top_builddir}/test/common_plat/validation/api
> >>@@ -37,11 +40,14 @@ TESTS = validation/api/pktio/pktio_run.sh \
> >>  SUBDIRS += validation/api/pktio\
> >>   validation/api/shmem\
> >>+  cls\
> >>   pktio_ipc\
> >>   ring
> >>  if HAVE_PCAP
> >>  TESTS += validation/api/pktio/pktio_run_pcap.sh
> >>+TESTS += cls/vlan_run.sh
> >>+dist_check_SCRIPTS += cls/vlan_run.sh cls/vlan.pcap
> >>  endif
> >>  if netmap_support
> >>  TESTS += validation/api/pktio/pktio_run_netmap.sh
> >>@@ -61,10 +67,6 @@ SUBDIRS += validation/api/pktio
> >>  endif
> >>  endif
> >>-TEST_EXTENSIONS = .sh
> >>-
> >>-dist_check_SCRIPTS = run-test tests-validation.env $(LOG_COMPILER)
> >>-
> >>  test_SCRIPTS = $(dist_check_SCRIPTS)
> >>  tests-validation.env:
> >>diff --git a/test/linux-generic/cls/.gitignore 
> >>b/test/linux-generic/cls/.gitignore
> >>new file mode 100644
> >>index 000..9447625
> >>--- /dev/null
> >>+++ b/test/linux-generic/cls/.gitignore
> >>@@ -0,0 +1,3 @@
> >>+cls_main
> >>+*.log
> >>+*.trs
> >log and trs shouldn't be needed here, since its in
> >test/linux-generic/.gitignore.
> >
> >This isn't done in a common way anywhere... Maybe we need to look into
> >it?
> >
> >>diff --git a/test/linux-generic/cls/Makefile.am 
> >>b/test/linux-generic/cls/Makefile.am
> >>new file mode 100644
> >>index 000..43fb0bc
> >>--- /dev/null
> >>+++ b/test/linux-generic/cls/Makefile.am
> >>@@ -0,0 +1,13 @@
> >>+include ../Makefile.inc
> >>+
> >>+noinst_LTLIBRARIES = libtestcls.la
> >Why do we need to create a library?
> 
> we do it everywhere, I just follow existence Makefiles. As Christophe
> explained me it&

Re: [lng-odp] [MONARCH PATCHv3 2/2] configure.ac update version

2016-08-18 Thread Anders Roxell
On 2016-08-17 22:25, Maxim Uvarov wrote:
> Signed-off-by: Maxim Uvarov 

Reviewed-by: Anders Roxell 

> ---
>  configure.ac | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/configure.ac b/configure.ac
> index c0eb207..48fe0be 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -12,7 +12,7 @@ AM_SILENT_RULES([yes])
>  ##
>  # Set correct platform library version
>  ##
> -ODP_LIBSO_VERSION=110:0:1
> +ODP_LIBSO_VERSION=111:0:0
>  AC_SUBST(ODP_LIBSO_VERSION)
>  
>  ODPHELPER_LIBSO_VERSION=110:0:1
> -- 
> 2.7.1.250.gff4ea60
> 

-- 
Anders Roxell
anders.rox...@linaro.org
M: +46 709 71 42 85 | IRC: roxell


Re: [lng-odp] [MONARCH PATCHv3 1/2] api: version update from 1.10.1 to 1.11.0

2016-08-18 Thread Anders Roxell
On 2016-08-17 22:25, Maxim Uvarov wrote:
> Signed-off-by: Maxim Uvarov 

Reviewed-by: Anders Roxell 

> ---
>  include/odp/api/spec/version.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/include/odp/api/spec/version.h b/include/odp/api/spec/version.h
> index aa3f3ab..1ddb9ce 100644
> --- a/include/odp/api/spec/version.h
> +++ b/include/odp/api/spec/version.h
> @@ -45,7 +45,7 @@ extern "C" {
>   * Introduction of major new features or changes. APIs with different major
>   * versions are likely not backward compatible.
>   */
> -#define ODP_VERSION_API_MAJOR 10
> +#define ODP_VERSION_API_MAJOR 11
>  
>  /**
>   * ODP API minor version
> @@ -54,7 +54,7 @@ extern "C" {
>   * to the API. For an API with common generation and major version, but with
>   * different minor numbers the two versions are backward compatible.
>   */
> -#define ODP_VERSION_API_MINOR 1
> +#define ODP_VERSION_API_MINOR 0
>  
>  /**
>   * ODP API version string
> -- 
> 2.7.1.250.gff4ea60
> 


Re: [lng-odp] [MONARCH_LTS PATCHv2 2/2] configure.ac update version

2016-08-17 Thread Anders Roxell
On 2016-08-10 18:25, Maxim Uvarov wrote:
> Signed-off-by: Maxim Uvarov 
> ---
>  configure.ac | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/configure.ac b/configure.ac
> index 6551287..0285b0a 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -12,7 +12,7 @@ AM_SILENT_RULES([yes])
>  ##
>  # Set correct platform library version
>  ##
> -ODP_LIBSO_VERSION=110:0:1
> +ODP_LIBSO_VERSION=110:0:2

In v1 [1] you pointed out that we changed a union in the TM API [2].
And since that union is used in TM's interface we need to bump to the
major number to 111.

If we only had added new interface we should only change the age number
to 2.

I'm missing a patch to change the version.h file.

Cheers,
Anders
[1] https://lists.linaro.org/pipermail/lng-odp/2016-August/025021.html
[2] 
https://git.linaro.org/lng/odp.git/commitdiff/a560c609e78716421e782aa388805937d177ef0e?hp=524987a32f9873e59ce265ffba6e831e756a2441


Re: [lng-odp] [MONARCH_LTS PATCHv2 1/2] scripts/git_hash.sh: to support monarch_lts tags

2016-08-17 Thread Anders Roxell
On 2016-08-10 18:25, Maxim Uvarov wrote:
> Signed-off-by: Maxim Uvarov 
> ---
>  scripts/git_hash.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/scripts/git_hash.sh b/scripts/git_hash.sh
> index 336eb01..35b8749 100755
> --- a/scripts/git_hash.sh
> +++ b/scripts/git_hash.sh
> @@ -7,7 +7,7 @@ fi
>  ROOTDIR=${1}
>  
>  if [ -d ${ROOTDIR}/.git ]; then
> - hash=$(git --git-dir=${ROOTDIR}/.git describe --match 
> 'v[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*'\
> + hash=$(git --git-dir=${ROOTDIR}/.git describe --match 
> 'v[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*-monarch'\
>  | tr -d "\n")
>   if [[ $(git --git-dir=${ROOTDIR}/.git diff --shortstat 2> /dev/null \
>   | tail -n1) != "" ]]; then
> -- 
> 2.7.1.250.gff4ea60
> 

We don't need this patch if we change the monarch_lts tag to
v1.11.0.0_monarch_lts and not v1.11.0.0-monarch_lts.

Use an underscore and not a dash before monarch_lts.

See my comment in you v1 of this patch [1].

Cheers,
Anders
[1] https://lists.linaro.org/pipermail/lng-odp/2016-August/025139.html


Re: [lng-odp] [MONARCH_LTS PATCH PATCH 2/2] configure.ac update version

2016-08-10 Thread Anders Roxell
On 10 August 2016 at 09:33, Maxim Uvarov  wrote:
> On 08/09/16 22:26, Anders Roxell wrote:
>>
>> On 9 August 2016 at 08:54, Maxim Uvarov  wrote:
>>>
>>> On 08/09/16 02:36, Mike Holmes wrote:
>>>>
>>>>
>>>>
>>>> On 8 August 2016 at 03:01, Maxim Uvarov >>> <mailto:maxim.uva...@linaro.org>> wrote:
>>>>
>>>>  On 08/05/16 21:27, Anders Roxell wrote:
>>>>
>>>>  On 2016-08-03 11:40, Maxim Uvarov wrote:
>>>>
>>>>  Signed-off-by: Maxim Uvarov >>>  <mailto:maxim.uva...@linaro.org>>
>>>>  ---
>>>>  configure.ac <http://configure.ac> | 4 ++--
>>>>1 file changed, 2 insertions(+), 2 deletions(-)
>>>>
>>>>  diff --git a/configure.ac <http://configure.ac>
>>>>  b/configure.ac <http://configure.ac>
>>>>  index c0eb207..bd16370 100644
>>>>  --- a/configure.ac <http://configure.ac>
>>>>  +++ b/configure.ac <http://configure.ac>
>>>>
>>>>  @@ -12,10 +12,10 @@ AM_SILENT_RULES([yes])
>>>>
>>>>
>>>> ##
>>>># Set correct platform library version
>>>>
>>>>
>>>> ##
>>>>  -ODP_LIBSO_VERSION=110:0:1
>>>>  +ODP_LIBSO_VERSION=111:0:0
>>>>AC_SUBST(ODP_LIBSO_VERSION)
>>>>-ODPHELPER_LIBSO_VERSION=110:0:1
>>>>  +ODPHELPER_LIBSO_VERSION=111:0:0
>>>>AC_SUBST(ODPHELPER_LIBSO_VERSION)
>>>>
>>>>  The SO-version doesn't need to change. The SO-version only
>>>>  needs to be
>>>>  changed when an interface has been added, removed, or modified
>>>>  since
>>>>  the last update [1].
>>>>
>>>>  For this release the API version should be changed and we
>>>>  should change
>>>>  the version in include/odp/api/spec/version.h.
>>>>
>>>>  Cheers,
>>>>  Anders
>>>>  [1]
>>>>
>>>>
>>>> https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
>>>>
>>>>
>>>> <https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html>
>>>>
>>>>
>>>>  Yes, but it's looks like very strange for me if .so version
>>>>  110:0:0 and odp version is 1.11.0.0.
>>>>  I think that also can be confusing for other people and not clear
>>>>  how to patch .so version
>>>>  to tag in git repo.
>>>>
>>>>
>>>> It should not be confusing for people, linux is very specific about the
>>>> rules for a .so version.
>>>> We are trying to be very specific in our API release numbering doc.
>>>> On OS "wherever" you can be completely sure the API number will not
>>>> match
>>>> that OS'es mechanisms for version libraries.
>>>>
>>> I'm not big expert in deploying .so to mainline. But I'm agree with Bill
>>> that .so version should match to api and tar ball name.
>>
>> No it should not.
>> Projects building on top of ODP shouldn't have to rebuild if we do a
>> new release that only adds new APIs.
>
> ok, that is logical.
>
>> The only time they should have to rebuild is if we break ABI (delete
>> or rename an API).
>
> ok, we change TM API:
> https://git.linaro.org/lng/odp.git/commitdiff/a560c609e78716421e782aa388805937d177ef0e?hp=524987a32f9873e59ce265ffba6e831e756a2441

I didn't know that this was in.
aha tricky, the deb build process should notice changes like this but since it
was in a union it got hidden or the size was the same it didn't find it.

>>
>> When a new version of a library is binary-incompatible with the old
>> one the SO-version needs to change.
>
>
> yes, 1.10 is incompatible to 1.11, we need to change version.

I agree, since we did the change in the union.

Thank you for pointing that out.

if we only added this "odp_bool_t egress_fcn_supported;",
that would only be a "age" bump.

Cheers,
Anders

>
>>
>> Again, did you read the link I pasted in the other email [1] ?
>> Especially this snippet: "Never try to set the interface numbers so
>> that they correspond to the release number of your package. ..."
>>
>>
>> Cheers,
>> Anders
>> [1]
>> https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
>
>
> Ok, than numbers has to correspond only to API. I.e. first 2 digits in our
> API code.
>
> From doc -release option is not clear where is has to be set.
> """
> Instead, use the -release flag (see Release numbers
> <https://www.gnu.org/software/libtool/manual/html_node/Release-numbers.html#Release-numbers>),
> but be warned that every release of your package will not be binary
> compatible with any other release.
> """
> is it set by autotools automatically somewhere or we should add it to
> configure.ac also?
>
> Maxim.
>


Re: [lng-odp] [MONARCH_LTS PATCH PATCH 2/2] configure.ac update version

2016-08-09 Thread Anders Roxell
On 9 August 2016 at 08:54, Maxim Uvarov  wrote:
> On 08/09/16 02:36, Mike Holmes wrote:
>>
>>
>>
>> On 8 August 2016 at 03:01, Maxim Uvarov > <mailto:maxim.uva...@linaro.org>> wrote:
>>
>> On 08/05/16 21:27, Anders Roxell wrote:
>>
>> On 2016-08-03 11:40, Maxim Uvarov wrote:
>>
>> Signed-off-by: Maxim Uvarov > <mailto:maxim.uva...@linaro.org>>
>> ---
>> configure.ac <http://configure.ac> | 4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/configure.ac <http://configure.ac>
>> b/configure.ac <http://configure.ac>
>> index c0eb207..bd16370 100644
>> --- a/configure.ac <http://configure.ac>
>> +++ b/configure.ac <http://configure.ac>
>>
>> @@ -12,10 +12,10 @@ AM_SILENT_RULES([yes])
>>
>> ##
>>   # Set correct platform library version
>>
>> ##
>> -ODP_LIBSO_VERSION=110:0:1
>> +ODP_LIBSO_VERSION=111:0:0
>>   AC_SUBST(ODP_LIBSO_VERSION)
>>   -ODPHELPER_LIBSO_VERSION=110:0:1
>> +ODPHELPER_LIBSO_VERSION=111:0:0
>>   AC_SUBST(ODPHELPER_LIBSO_VERSION)
>>
>> The SO-version doesn't need to change. The SO-version only
>> needs to be
>> changed when an interface has been added, removed, or modified
>> since
>> the last update [1].
>>
>> For this release the API version should be changed and we
>> should change
>> the version in include/odp/api/spec/version.h.
>>
>> Cheers,
>> Anders
>> [1]
>>
>> https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
>>
>> <https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html>
>>
>>
>> Yes, but it's looks like very strange for me if .so version
>> 110:0:0 and odp version is 1.11.0.0.
>> I think that also can be confusing for other people and not clear
>> how to patch .so version
>> to tag in git repo.
>>
>>
>> It should not be confusing for people, linux is very specific about the
>> rules for a .so version.
>> We are trying to be very specific in our API release numbering doc.
>> On OS "wherever" you can be completely sure the API number will not match
>> that OS'es mechanisms for version libraries.
>>
>
> I'm not big expert in deploying .so to mainline. But I'm agree with Bill
> that .so version should match to api and tar ball name.

No it should not.
Projects building on top of ODP shouldn't have to rebuild if we do a
new release that only adds new APIs.
The only time they should have to rebuild is if we break ABI (delete
or rename an API).
When a new version of a library is binary-incompatible with the old
one the SO-version needs to change.

Again, did you read the link I pasted in the other email [1] ?
Especially this snippet: "Never try to set the interface numbers so
that they correspond to the release number of your package. ..."


Cheers,
Anders
[1] 
https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html


Re: [lng-odp] [MONARCH_LTS PATCH PATCH 1/2] scripts/git_hash.sh: to support monarch_lts tags

2016-08-09 Thread Anders Roxell
On 8 August 2016 at 09:50, Maxim Uvarov  wrote:
> On 08/05/16 21:33, Anders Roxell wrote:
>>
>> On 2016-08-03 11:40, Maxim Uvarov wrote:
>>>
>>> Signed-off-by: Maxim Uvarov 
>>> ---
>>>   scripts/git_hash.sh | 2 +-
>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/scripts/git_hash.sh b/scripts/git_hash.sh
>>> index 336eb01..83123f4 100755
>>> --- a/scripts/git_hash.sh
>>> +++ b/scripts/git_hash.sh
>>> @@ -7,7 +7,7 @@ fi
>>>   ROOTDIR=${1}
>>> if [ -d ${ROOTDIR}/.git ]; then
>>> -   hash=$(git --git-dir=${ROOTDIR}/.git describe --match
>>> 'v[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*'\
>>> +   hash=$(git --git-dir=${ROOTDIR}/.git describe --match
>>> 'v[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*-monarch_lts'\
>>
>> If we change the tag from v1.11.0.0-monarch_lts to v1.11.0.0_monarch_lts
>> we don't have to add release specific patches to specify the name.
>>
>> Cheers,
>> Anders
>
> Tags in master branch are:
> v1.12.0
> ..
> v1.13.0
> ...
> v1.14.0

Yes the tags in the master branch will be v...
v1.12.0.0
..
v1.13.0.0
...
v1.14.0.0

This is what you've done from verstion v1.1.0.0, so I'm not sure why you want to
change it to only three digits going forward?

>
>
> tags in monarch_lts branch are:
> v1.11.0.0-monarch_lts
> v1.11.1.0-monarch_lts
> v1.11.2.0-monarch_lts
> v1.11.3.0-monarch_lts

What I'm suggesting are if we change  the tags in the monarch_lts branch to:
v1.11.0.0_monarch_lts
v1.11.1.0_monarch_lts

>
> We need this change to not overlap with master branch.

and we do not need to change as long as we use an underscore
"_monarch_lts" after the four digits.

Cheers,
Anders


Re: [lng-odp] [PATCHv2] test: linux-gen: add pcap playback test

2016-08-06 Thread Anders Roxell
On 2016-08-02 19:08, Maxim Uvarov wrote:
> add pcap play back test which takes 2 arguments: 1 - pcap file,
> 2 - packet mask to match. Intend is to test odp with different
> input traffic to check internal implementation functions. In
> current case it's test for vlan tag instertion for packet mmap:
> pkt_mmap_vlan_insert().
> 
> Signed-off-by: Maxim Uvarov 
> ---
>  v2: up the patch, dirrect execution looks like works.
> 
>  test/linux-generic/.gitignore   |   1 +
>  test/linux-generic/Makefile.am  |  10 +-
>  test/linux-generic/cls/.gitignore   |   3 +
>  test/linux-generic/cls/Makefile.am  |  13 ++
>  test/linux-generic/cls/cls.c| 349 
> 
>  test/linux-generic/cls/cls_main.c   |  12 ++
>  test/linux-generic/cls/cls_suites.h |   1 +
>  test/linux-generic/cls/vlan.pcap| Bin 0 -> 9728 bytes
>  test/linux-generic/cls/vlan_run.sh  |  49 +
>  test/linux-generic/m4/configure.m4  |   1 +
>  10 files changed, 435 insertions(+), 4 deletions(-)
>  create mode 100644 test/linux-generic/cls/.gitignore
>  create mode 100644 test/linux-generic/cls/Makefile.am
>  create mode 100644 test/linux-generic/cls/cls.c
>  create mode 100644 test/linux-generic/cls/cls_main.c
>  create mode 100644 test/linux-generic/cls/cls_suites.h
>  create mode 100644 test/linux-generic/cls/vlan.pcap
>  create mode 100755 test/linux-generic/cls/vlan_run.sh
> 
> diff --git a/test/linux-generic/.gitignore b/test/linux-generic/.gitignore
> index 5dabf91..f65c7c1 100644
> --- a/test/linux-generic/.gitignore
> +++ b/test/linux-generic/.gitignore
> @@ -1,3 +1,4 @@
>  *.log
>  *.trs
>  tests-validation.env
> +test_out.pcap
> diff --git a/test/linux-generic/Makefile.am b/test/linux-generic/Makefile.am
> index f5cc52d..9acbab0 100644
> --- a/test/linux-generic/Makefile.am
> +++ b/test/linux-generic/Makefile.am
> @@ -1,5 +1,8 @@
>  include $(top_srcdir)/test/Makefile.inc
>  TESTS_ENVIRONMENT += TEST_DIR=${top_builddir}/test/common_plat/validation
> +TEST_EXTENSIONS = .sh
> +
> +dist_check_SCRIPTS = run-test tests-validation.env $(LOG_COMPILER)
>  
>  ALL_API_VALIDATION_DIR = ${top_builddir}/test/common_plat/validation/api
>  
> @@ -37,11 +40,14 @@ TESTS = validation/api/pktio/pktio_run.sh \
>  
>  SUBDIRS += validation/api/pktio\
>  validation/api/shmem\
> +cls\
>  pktio_ipc\
>  ring
>  
>  if HAVE_PCAP
>  TESTS += validation/api/pktio/pktio_run_pcap.sh
> +TESTS += cls/vlan_run.sh
> +dist_check_SCRIPTS += cls/vlan_run.sh cls/vlan.pcap
>  endif
>  if netmap_support
>  TESTS += validation/api/pktio/pktio_run_netmap.sh
> @@ -61,10 +67,6 @@ SUBDIRS += validation/api/pktio
>  endif
>  endif
>  
> -TEST_EXTENSIONS = .sh
> -
> -dist_check_SCRIPTS = run-test tests-validation.env $(LOG_COMPILER)
> -
>  test_SCRIPTS = $(dist_check_SCRIPTS)
>  
>  tests-validation.env:
> diff --git a/test/linux-generic/cls/.gitignore 
> b/test/linux-generic/cls/.gitignore
> new file mode 100644
> index 000..9447625
> --- /dev/null
> +++ b/test/linux-generic/cls/.gitignore
> @@ -0,0 +1,3 @@
> +cls_main
> +*.log
> +*.trs

log and trs shouldn't be needed here, since its in
test/linux-generic/.gitignore.

This isn't done in a common way anywhere... Maybe we need to look into
it?

> diff --git a/test/linux-generic/cls/Makefile.am 
> b/test/linux-generic/cls/Makefile.am
> new file mode 100644
> index 000..43fb0bc
> --- /dev/null
> +++ b/test/linux-generic/cls/Makefile.am
> @@ -0,0 +1,13 @@
> +include ../Makefile.inc
> +
> +noinst_LTLIBRARIES = libtestcls.la

Why do we need to create a library?

> +libtestcls_la_SOURCES = cls.c
> +libtestcls_la_CFLAGS = $(AM_CFLAGS) $(INCCUNIT_COMMON) $(INCODP)
> +
> +test_PROGRAMS = cls_main$(EXEEXT)
> +dist_cls_main_SOURCES = cls_main.c
> +
> +cls_main_LDFLAGS = $(AM_LDFLAGS)
> +cls_main_LDADD = libtestcls.la $(LIBCUNIT_COMMON) $(LIBODP)
> +
> +noinst_HEADERS = cls_suites.h
> diff --git a/test/linux-generic/cls/cls.c b/test/linux-generic/cls/cls.c
> new file mode 100644
> index 000..d527ec8
> --- /dev/null
> +++ b/test/linux-generic/cls/cls.c
> @@ -0,0 +1,349 @@
> +/* Copyright (c) 2016, Linaro Limited
> + * All rights reserved.
> + *
> + * SPDX-License-Identifier: BSD-3-Clause
> + */
> +
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +
> +#include 
> +
> +#include 
> +#include 
> +#include 
> +#include 
> +
> +#include 

why do we include an internal header file?

> +
> +#include "cls_suites.h"
> +
> +/** Get rid of path in filename - only for unix-type paths using '/' */
> +#define NO_PATH(file_name) (strrchr((file_name), '/') ? \
> + strrchr((file_name), '/') + 1 : (file_name))

Maybe its enough basename?
http://linux.die.net/man/3/basename

> +
> +/**
> + * Print usage information
> + */
> +static void usage(char *progname)
> +{
> + printf("\n"
> +"This is test application to verify that linux-generic 
> classifier\n"
> +"correctly classifies packets on input. Main intend

Re: [lng-odp] [MONARCH_LTS PATCH PATCH 1/2] scripts/git_hash.sh: to support monarch_lts tags

2016-08-05 Thread Anders Roxell
On 2016-08-03 11:40, Maxim Uvarov wrote:
> Signed-off-by: Maxim Uvarov 
> ---
>  scripts/git_hash.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/scripts/git_hash.sh b/scripts/git_hash.sh
> index 336eb01..83123f4 100755
> --- a/scripts/git_hash.sh
> +++ b/scripts/git_hash.sh
> @@ -7,7 +7,7 @@ fi
>  ROOTDIR=${1}
>  
>  if [ -d ${ROOTDIR}/.git ]; then
> - hash=$(git --git-dir=${ROOTDIR}/.git describe --match 
> 'v[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*'\
> + hash=$(git --git-dir=${ROOTDIR}/.git describe --match 
> 'v[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*-monarch_lts'\

If we change the tag from v1.11.0.0-monarch_lts to v1.11.0.0_monarch_lts
we don't have to add release specific patches to specify the name.

Cheers,
Anders


Re: [lng-odp] [MONARCH_LTS PATCH PATCH 2/2] configure.ac update version

2016-08-05 Thread Anders Roxell
On 2016-08-03 11:40, Maxim Uvarov wrote:
> Signed-off-by: Maxim Uvarov 
> ---
>  configure.ac | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/configure.ac b/configure.ac
> index c0eb207..bd16370 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -12,10 +12,10 @@ AM_SILENT_RULES([yes])
>  ##
>  # Set correct platform library version
>  ##
> -ODP_LIBSO_VERSION=110:0:1
> +ODP_LIBSO_VERSION=111:0:0
>  AC_SUBST(ODP_LIBSO_VERSION)
>  
> -ODPHELPER_LIBSO_VERSION=110:0:1
> +ODPHELPER_LIBSO_VERSION=111:0:0
>  AC_SUBST(ODPHELPER_LIBSO_VERSION)

The SO-version doesn't need to change. The SO-version only needs to be
changed when an interface has been added, removed, or modified since
the last update [1].

For this release the API version should be changed and we should change
the version in include/odp/api/spec/version.h.

Cheers,
Anders
[1] 
https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html


Re: [lng-odp] [PATCH] helper/hashtable: use static to hide private functions

2016-08-03 Thread Anders Roxell
On 2 August 2016 at 17:27, Mike Holmes  wrote:
> On 2 August 2016 at 04:44, Maxim Uvarov  wrote:
>
>> On 08/02/16 10:54, Anders Roxell wrote:
>>
>>> Signed-off-by: Anders Roxell 
>>> ---
>>>   helper/hashtable.c | 6 +++---
>>>   1 file changed, 3 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/helper/hashtable.c b/helper/hashtable.c
>>> index 8bb1ae5..f17b80f 100644
>>> --- a/helper/hashtable.c
>>> +++ b/helper/hashtable.c
>>> @@ -164,7 +164,7 @@ odph_table_t odph_hash_table_lookup(const char *name)
>>>* This hash algorithm is the most simple one, so we choose it as an
>>> DEMO
>>>* User can use any other algorithm, like CRC...
>>>*/
>>> -uint16_t odp_key_hash(void *key, uint32_t key_size)
>>> +static uint16_t odp_key_hash(void *key, uint32_t key_size)
>>>
>> odph_
>>
>>>   {
>>> register uint32_t hash = 0;
>>> uint32_t idx = (key_size == 0 ? 1 : key_size);
>>> @@ -181,7 +181,7 @@ uint16_t odp_key_hash(void *key, uint32_t key_size)
>>>   /**
>>>* Get an available node from pool
>>>*/
>>> -odph_hash_node *odp_hashnode_take(odph_table_t table)
>>> +static odph_hash_node *odp_hashnode_take(odph_table_t table)
>>>   {
>>> odph_hash_table_imp *tbl = (odph_hash_table_imp *)table;
>>> uint32_t idx;
>>> @@ -208,7 +208,7 @@ odph_hash_node *odp_hashnode_take(odph_table_t table)
>>>   /**
>>>* Release an node to the pool
>>>*/
>>> -void odp_hashnode_give(odph_table_t table, odph_hash_node *node)
>>> +static void odp_hashnode_give(odph_table_t table, odph_hash_node *node)
>>>
>>>
>> odph_
>
>
> Should this patch change the name as well ?

I would say no. =)

> The fix appears to be to correctly make internal functions static whist
> converting to a naming scheme is a separate fix

agree.

Cheers,
Anders

>
>
>>
>> {
>>> odph_hash_table_imp *tbl = (odph_hash_table_imp *)table;
>>>
>>>
>>
>>
>
>
> --
> Mike Holmes
> Technical Manager - Linaro Networking Group
> Linaro.org <http://www.linaro.org/> *│ *Open source software for ARM SoCs
> "Work should be fun and collaborative, the rest follows"


Re: [lng-odp] [MONARCH_LTS PATCHv2] changelog: update for v1.11.0.0

2016-08-02 Thread Anders Roxell
On 2 August 2016 at 20:53, Bill Fischofer  wrote:
> Signed-off-by: Bill Fischofer 
> ---
>  CHANGELOG | 114 
> ++
>  1 file changed, 114 insertions(+)
>
> diff --git a/CHANGELOG b/CHANGELOG
> index d8230cd..94f6e96 100644
> --- a/CHANGELOG
> +++ b/CHANGELOG
> @@ -1,3 +1,117 @@
> +== OpenDataPlane (1.11.0.0)
> +ODP v1.11.0 is the base tag and branch for the Monarch LTS (Long Term 
> Support)

v1.11.0.0

> +release of ODP.
> +
> +=== New Features
> + APIs
> +As part of the final Monarch LTS API set, a minor change to the
> +`odp_tm_egress_t` struct was made to better reflect the capabilities of
> +SoC platforms targeting Monarch support. This change adds the boolean
> +`egress_fcn_supported` that indicates whether TM  systems support an egress
> +function. In addition, each TM system is now associated with a PktIO rather
> +than a PktOUT queue. This struct is input to the `odp_tm_create()` API and
> +output from the `odp_tm_find()` API.
> +
> + Strict Priority (SP) Scheduler
> +Building on the modular scheduler framework introduced in v1.10.1.0, An
> +alternate Strict Priority (SP) scheduler is now available. The SP scheduler
> +is selected when ODP is configured with the `--enable_schedule_sp` option.
> +
> +The SP scheduler is designed to favor low-latency processing of high priority
> +work at the expense of throughput. This is considered experimental code at
> +this point and should be treated as such by those wishing to use it.
> +
> +=== Bug Fixes
> + Scheduler PktIO Cleanup
> +The scheduler now properly cleans up PktIOs operating in SCHEDULE mode 
> following
> +`odp_pktio_close()` calls. This resolves
> +https://bugs.linaro.org/show_bug.cgi?id=2301[Bug 2301].

links don't work.

look through all links.

Cheers,
Anders

> +
> + Chksum Routine C++ conformance
> +The odph_chksum() helper routine is now C++ conformant. This resolves
> +https://bugs.linaro.org/show_bug.cgi?id=2302[Bug 2302].
> +
> + User Area Copying
> +The `odp_packet_copy()` API now copies the packet user area as part of its
> +processing and the packet validation test has been enhanced to verify that 
> this
> +is done properly. This resolves
> +https://bugs.linaro.org/show_bug.cgi?id=2310[Bug 2310].
> +
> + Use of Pool 0 as a Timeout Pool
> +The internal definition of `ODP_TIMEOUT_INVALID` was changed in `odp-linux` 
> to
> +enable the use of Pool 0 as a timeout pool. This resolves
> +https://bugs.linaro.org/show_bug.cgi?id=2316[Bug 2316].
> +
> +=== Packaging
> + libodphelper
> +To facilitate API tracking, `libodphelper.so` has been split out from
> +`libodp.so`.
> +
> + Helper dependencies
> +To avoid circular dependencies that cause issues when packaging ODP as a
> +shared library, the `odp-linux` implementation no longer makes and use of
> +the ODP helper library.
> +
> +=== Performance
> +Performance enhancements in the `odp-linux` reference implementation have 
> been
> +made in PktIO routines and the packet classifier.
> +
> +=== General Cleanup
> +General cleanup throughout has resulted in adding proper termination calls to
> +ODP examples as well as miscellaneous Doxygen corrections.  Additionally, the
> +`odp-linux` code base has been cleaned up by removing "To Dos" as well as
> +extraneous `#includes` for extra C headers and dependencies on linux headers
> +for improved portability.
> +
> +=== Validation
> + Queue Capability Test
> +The Queue validation test now properly exercises the `odp_queue_capability()`
> +API and attempts to create the maximum reported number of supported queues.
> +
> + Platform Tests
> +The platform-specific tests have been moved from 
> `platform/linux-generic/test`
> +to `test/platform/linux-generc` so that all tests are now found under a
> +single `test` directory.
> +
> +=== Documentation
> + Pure API Guide
> +The Doxygen API guide has been split so that both a "pure" version that is
> +platform-independent and retains unresolved ODP abstract types as well as
> +an implementation-specific version (for `odp-linux`) that shows
> +platform-specific `typedef` and `enum` values.
> +
> + Implementation Guide Improvements
> +The _ODP Implementer's Guide_ has been enhanced with a section on
> +implementation considerations, including issues surrounding the definition of
> +Application Binary Interfaces (ABIs).
> +
> +=== Known Issues
> + https://bugs.linaro.org/show_bug.cgi?id=2309[Bug 2309]
> +The timer validation tests have seen occasional failures when run on systems
> +containing a larger number of CPUs (typically 24 or more).
> +
> + https://bugs.linaro.org/show_bug.cgi?id=2386[Bug 2386]
> +ODP cannot be compiled using the -m32 option to generate 32-bit code on a
> +64-bit platform when using GCC 4.9 (the default GCC found in Ubuntu 15.04).
> +This is due to a known bug in GCC 4.9 and is closed as a permanent 
> restriction.
> +
> + https://bugs.linaro.org/show_bug.cgi?id=2402[Bu

[lng-odp] [PATCH] helper/hashtable: use static to hide private functions

2016-08-02 Thread Anders Roxell
Signed-off-by: Anders Roxell 
---
 helper/hashtable.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/helper/hashtable.c b/helper/hashtable.c
index 8bb1ae5..f17b80f 100644
--- a/helper/hashtable.c
+++ b/helper/hashtable.c
@@ -164,7 +164,7 @@ odph_table_t odph_hash_table_lookup(const char *name)
  * This hash algorithm is the most simple one, so we choose it as an DEMO
  * User can use any other algorithm, like CRC...
  */
-uint16_t odp_key_hash(void *key, uint32_t key_size)
+static uint16_t odp_key_hash(void *key, uint32_t key_size)
 {
register uint32_t hash = 0;
uint32_t idx = (key_size == 0 ? 1 : key_size);
@@ -181,7 +181,7 @@ uint16_t odp_key_hash(void *key, uint32_t key_size)
 /**
  * Get an available node from pool
  */
-odph_hash_node *odp_hashnode_take(odph_table_t table)
+static odph_hash_node *odp_hashnode_take(odph_table_t table)
 {
odph_hash_table_imp *tbl = (odph_hash_table_imp *)table;
uint32_t idx;
@@ -208,7 +208,7 @@ odph_hash_node *odp_hashnode_take(odph_table_t table)
 /**
  * Release an node to the pool
  */
-void odp_hashnode_give(odph_table_t table, odph_hash_node *node)
+static void odp_hashnode_give(odph_table_t table, odph_hash_node *node)
 {
odph_hash_table_imp *tbl = (odph_hash_table_imp *)table;
 
-- 
2.1.4



[lng-odp] [PATCHv3] linux-gen: Makefile: Move EXTRA_DIST to to platform/Makefile.inc

2016-07-22 Thread Anders Roxell
Make it easier for other platforms like odp-dpdk to reuse arch specific
files in EXTRA_DIST for "free".

Reported-by: Fathi Boudra 
Signed-off-by: Anders Roxell 
---
 platform/Makefile.inc  | 17 +
 platform/linux-generic/Makefile.am | 17 -
 2 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/platform/Makefile.inc b/platform/Makefile.inc
index 053bd12..a44f88f 100644
--- a/platform/Makefile.inc
+++ b/platform/Makefile.inc
@@ -60,3 +60,20 @@ odpapispecinclude_HEADERS = \
  $(top_srcdir)/include/odp/api/spec/timer.h \
  $(top_srcdir)/include/odp/api/spec/traffic_mngr.h \
  $(top_srcdir)/include/odp/api/spec/version.h
+
+EXTRA_DIST = \
+arch/arm/odp/api/cpu_arch.h \
+arch/arm/odp_cpu_arch.c \
+arch/arm/odp_sysinfo_parse.c \
+arch/default/odp/api/cpu_arch.h \
+arch/default/odp_cpu_arch.c \
+arch/default/odp_sysinfo_parse.c \
+arch/mips64/odp/api/cpu_arch.h \
+arch/mips64/odp_cpu_arch.c \
+arch/mips64/odp_sysinfo_parse.c \
+arch/powerpc/odp/api/cpu_arch.h \
+arch/powerpc/odp_cpu_arch.c \
+arch/powerpc/odp_sysinfo_parse.c \
+arch/x86/odp/api/cpu_arch.h \
+arch/x86/odp_cpu_arch.c \
+arch/x86/odp_sysinfo_parse.c
diff --git a/platform/linux-generic/Makefile.am 
b/platform/linux-generic/Makefile.am
index c8fd8cb..0cfd0fe 100644
--- a/platform/linux-generic/Makefile.am
+++ b/platform/linux-generic/Makefile.am
@@ -186,23 +186,6 @@ __LIB__libodp_linux_la_SOURCES = \
   arch/@ARCH_DIR@/odp_cpu_arch.c \
   arch/@ARCH_DIR@/odp_sysinfo_parse.c
 
-EXTRA_DIST = \
-arch/default/odp/api/cpu_arch.h \
-arch/default/odp_cpu_arch.c \
-arch/default/odp_sysinfo_parse.c \
-arch/mips64/odp/api/cpu_arch.h \
-arch/mips64/odp_cpu_arch.c \
-arch/mips64/odp_sysinfo_parse.c \
-arch/powerpc/odp/api/cpu_arch.h \
-arch/powerpc/odp_cpu_arch.c \
-arch/powerpc/odp_sysinfo_parse.c \
-arch/x86/odp/api/cpu_arch.h \
-arch/x86/odp_cpu_arch.c \
-arch/x86/odp_sysinfo_parse.c \
-arch/arm/odp/api/cpu_arch.h \
-arch/arm/odp_cpu_arch.c \
-arch/arm/odp_sysinfo_parse.c
-
 if HAVE_PCAP
 __LIB__libodp_linux_la_SOURCES += pktio/pcap.c
 endif
-- 
2.1.4



[lng-odp] [PATCH] linux-dpdk/m4/configure.m4: move m4_include above ac_check_*

2016-07-21 Thread Anders Roxell
Signed-off-by: Anders Roxell 
---
 platform/linux-dpdk/m4/configure.m4 | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/platform/linux-dpdk/m4/configure.m4 
b/platform/linux-dpdk/m4/configure.m4
index 1d04fd0..f370afb 100644
--- a/platform/linux-dpdk/m4/configure.m4
+++ b/platform/linux-dpdk/m4/configure.m4
@@ -28,6 +28,12 @@ AC_LINK_IFELSE(
 echo "Use newer version. For gcc > 4.7.0"
 exit -1)
 
+# linux-generic PCAP support is not relevant as the code doesn't use
+# linux-generic pktio at all. And DPDK has its own PCAP support anyway
+AM_CONDITIONAL([HAVE_PCAP], [false])
+m4_include([platform/linux-dpdk/m4/odp_pthread.m4])
+m4_include([platform/linux-dpdk/m4/odp_openssl.m4])
+
 #
 # Check that SDK_INSTALL_PATH provided to right dpdk version
 #
@@ -67,12 +73,6 @@ AC_CHECK_HEADERS([rte_config.h], [],
 LDFLAGS=$OLD_LDFLAGS
 CPPFLAGS=$OLD_CPPFLAGS
 
-# linux-generic PCAP support is not relevant as the code doesn't use
-# linux-generic pktio at all. And DPDK has its own PCAP support anyway
-AM_CONDITIONAL([HAVE_PCAP], [false])
-m4_include([platform/linux-dpdk/m4/odp_pthread.m4])
-m4_include([platform/linux-dpdk/m4/odp_openssl.m4])
-
 AC_CONFIG_FILES([platform/linux-dpdk/Makefile
 platform/linux-dpdk/test/Makefile
 platform/linux-dpdk/test/pktio/Makefile
-- 
2.1.4



Re: [lng-odp] [PATCH 1/2] linux-gen: Makefile: Move EXTRA_DIST to to platform/Makefile.inc

2016-07-21 Thread Anders Roxell
On 21 July 2016 at 15:12, Mike Holmes  wrote:
>
>
> On 21 July 2016 at 05:42, Anders Roxell  wrote:
>>
>> Make it easier for other platforms like odp-dpdk to reuse arch specific
>> files in EXTRA_DIST for "free".
>>
>> Reported-by: Fathi Boudra 
>> Signed-off-by: Anders Roxell 
>>
>> Signed-off-by: Anders Roxell 
>
>
> Maxim can you delete the duplicate signoff above form Anders ?
>
> Reviewd-by: Mike Holmes 

Maxim, you should be able to take my v2 I cleaned up the duplicated sob.

Cheers,
Anders

>
>>
>> ---
>>  platform/Makefile.inc  | 17 +
>>  platform/linux-generic/Makefile.am | 17 -
>>  2 files changed, 17 insertions(+), 17 deletions(-)
>>
>> diff --git a/platform/Makefile.inc b/platform/Makefile.inc
>> index 053bd12..370383b 100644
>> --- a/platform/Makefile.inc
>> +++ b/platform/Makefile.inc
>> @@ -60,3 +60,20 @@ odpapispecinclude_HEADERS = \
>>   $(top_srcdir)/include/odp/api/spec/timer.h \
>>   $(top_srcdir)/include/odp/api/spec/traffic_mngr.h \
>>   $(top_srcdir)/include/odp/api/spec/version.h
>> +
>> +EXTRA_DIST = \
>> +arch/default/odp/api/cpu_arch.h \
>> +arch/default/odp_cpu_arch.c \
>> +arch/default/odp_sysinfo_parse.c \
>> +arch/mips64/odp/api/cpu_arch.h \
>> +arch/mips64/odp_cpu_arch.c \
>> +arch/mips64/odp_sysinfo_parse.c \
>> +arch/powerpc/odp/api/cpu_arch.h \
>> +arch/powerpc/odp_cpu_arch.c \
>> +arch/powerpc/odp_sysinfo_parse.c \
>> +arch/x86/odp/api/cpu_arch.h \
>> +arch/x86/odp_cpu_arch.c \
>> +arch/x86/odp_sysinfo_parse.c \
>> +arch/arm/odp/api/cpu_arch.h \
>> +arch/arm/odp_cpu_arch.c \
>> +arch/arm/odp_sysinfo_parse.c
>> diff --git a/platform/linux-generic/Makefile.am
>> b/platform/linux-generic/Makefile.am
>> index c8fd8cb..0cfd0fe 100644
>> --- a/platform/linux-generic/Makefile.am
>> +++ b/platform/linux-generic/Makefile.am
>> @@ -186,23 +186,6 @@ __LIB__libodp_linux_la_SOURCES = \
>>arch/@ARCH_DIR@/odp_cpu_arch.c \
>>arch/@ARCH_DIR@/odp_sysinfo_parse.c
>>
>> -EXTRA_DIST = \
>> -arch/default/odp/api/cpu_arch.h \
>> -arch/default/odp_cpu_arch.c \
>> -arch/default/odp_sysinfo_parse.c \
>> -arch/mips64/odp/api/cpu_arch.h \
>> -arch/mips64/odp_cpu_arch.c \
>> -arch/mips64/odp_sysinfo_parse.c \
>> -arch/powerpc/odp/api/cpu_arch.h \
>> -arch/powerpc/odp_cpu_arch.c \
>> -arch/powerpc/odp_sysinfo_parse.c \
>> -arch/x86/odp/api/cpu_arch.h \
>> -arch/x86/odp_cpu_arch.c \
>> -arch/x86/odp_sysinfo_parse.c \
>> -arch/arm/odp/api/cpu_arch.h \
>> -arch/arm/odp_cpu_arch.c \
>> -arch/arm/odp_sysinfo_parse.c
>> -
>>  if HAVE_PCAP
>>  __LIB__libodp_linux_la_SOURCES += pktio/pcap.c
>>  endif
>> --
>> 2.1.4
>>
>
>
>
> --
> Mike Holmes
> Technical Manager - Linaro Networking Group
> Linaro.org │ Open source software for ARM SoCs
> "Work should be fun and collaborative, the rest follows"
>
>


[lng-odp] [PATCHv2] linux-gen: Makefile: Move EXTRA_DIST to to platform/Makefile.inc

2016-07-21 Thread Anders Roxell
Make it easier for other platforms like odp-dpdk to reuse arch specific
files in EXTRA_DIST for "free".

Reported-by: Fathi Boudra 
Signed-off-by: Anders Roxell 
---
 platform/Makefile.inc  | 17 +
 platform/linux-generic/Makefile.am | 17 -
 2 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/platform/Makefile.inc b/platform/Makefile.inc
index 053bd12..370383b 100644
--- a/platform/Makefile.inc
+++ b/platform/Makefile.inc
@@ -60,3 +60,20 @@ odpapispecinclude_HEADERS = \
  $(top_srcdir)/include/odp/api/spec/timer.h \
  $(top_srcdir)/include/odp/api/spec/traffic_mngr.h \
  $(top_srcdir)/include/odp/api/spec/version.h
+
+EXTRA_DIST = \
+arch/default/odp/api/cpu_arch.h \
+arch/default/odp_cpu_arch.c \
+arch/default/odp_sysinfo_parse.c \
+arch/mips64/odp/api/cpu_arch.h \
+arch/mips64/odp_cpu_arch.c \
+arch/mips64/odp_sysinfo_parse.c \
+arch/powerpc/odp/api/cpu_arch.h \
+arch/powerpc/odp_cpu_arch.c \
+arch/powerpc/odp_sysinfo_parse.c \
+arch/x86/odp/api/cpu_arch.h \
+arch/x86/odp_cpu_arch.c \
+arch/x86/odp_sysinfo_parse.c \
+arch/arm/odp/api/cpu_arch.h \
+arch/arm/odp_cpu_arch.c \
+arch/arm/odp_sysinfo_parse.c
diff --git a/platform/linux-generic/Makefile.am 
b/platform/linux-generic/Makefile.am
index c8fd8cb..0cfd0fe 100644
--- a/platform/linux-generic/Makefile.am
+++ b/platform/linux-generic/Makefile.am
@@ -186,23 +186,6 @@ __LIB__libodp_linux_la_SOURCES = \
   arch/@ARCH_DIR@/odp_cpu_arch.c \
   arch/@ARCH_DIR@/odp_sysinfo_parse.c
 
-EXTRA_DIST = \
-arch/default/odp/api/cpu_arch.h \
-arch/default/odp_cpu_arch.c \
-arch/default/odp_sysinfo_parse.c \
-arch/mips64/odp/api/cpu_arch.h \
-arch/mips64/odp_cpu_arch.c \
-arch/mips64/odp_sysinfo_parse.c \
-arch/powerpc/odp/api/cpu_arch.h \
-arch/powerpc/odp_cpu_arch.c \
-arch/powerpc/odp_sysinfo_parse.c \
-arch/x86/odp/api/cpu_arch.h \
-arch/x86/odp_cpu_arch.c \
-arch/x86/odp_sysinfo_parse.c \
-arch/arm/odp/api/cpu_arch.h \
-arch/arm/odp_cpu_arch.c \
-arch/arm/odp_sysinfo_parse.c
-
 if HAVE_PCAP
 __LIB__libodp_linux_la_SOURCES += pktio/pcap.c
 endif
-- 
2.1.4



Re: [lng-odp] [PATCH 2/2] platform: Makefile.inc: add wildcards

2016-07-21 Thread Anders Roxell
On 21 July 2016 at 11:43, Anders Roxell  wrote:
> Reported-by: Fathi Boudra 
> Signed-off-by: Anders Roxell 
> ---
>  platform/Makefile.inc | 18 +++---
>  1 file changed, 3 insertions(+), 15 deletions(-)
>
> diff --git a/platform/Makefile.inc b/platform/Makefile.inc
> index 370383b..0a6600c 100644
> --- a/platform/Makefile.inc
> +++ b/platform/Makefile.inc
> @@ -62,18 +62,6 @@ odpapispecinclude_HEADERS = \
>   $(top_srcdir)/include/odp/api/spec/version.h
>
>  EXTRA_DIST = \
> -arch/default/odp/api/cpu_arch.h \
> -arch/default/odp_cpu_arch.c \
> -arch/default/odp_sysinfo_parse.c \
> -arch/mips64/odp/api/cpu_arch.h \
> -arch/mips64/odp_cpu_arch.c \
> -arch/mips64/odp_sysinfo_parse.c \
> -arch/powerpc/odp/api/cpu_arch.h \
> -arch/powerpc/odp_cpu_arch.c \
> -arch/powerpc/odp_sysinfo_parse.c \
> -arch/x86/odp/api/cpu_arch.h \
> -arch/x86/odp_cpu_arch.c \
> -arch/x86/odp_sysinfo_parse.c \
> -arch/arm/odp/api/cpu_arch.h \
> -arch/arm/odp_cpu_arch.c \
> -arch/arm/odp_sysinfo_parse.c
> +$(wildcard arch/*/odp/api/cpu_arch.h) \
> +$(wildcard arch/*/odp_cpu_arch.c) \
> +$(wildcard arch/*/odp_sysinfo_parse.c)
> --
> 2.1.4
>

hmphf, saw that I introduced non-POSIX warnings [1] with this patch.
So please ignore this patch 2/2.

Cheers,
Anders
[1] http://hastebin.com/rikoricodu.md


Re: [lng-odp] [API-NEXT PATCHv3 01/18] linux-generic: Makefile: reintroducing lost change for drv

2016-07-21 Thread Anders Roxell
On 21 July 2016 at 14:06, Christophe Milard
 wrote:
> The change done for commit id 1fcd2369be88a6f4f7a7a93e9bb315d0e65ab128
> in the Makefile, and  delated after is reintroduced here.
>
> Signed-off-by: Christophe Milard 
> ---
>  platform/linux-generic/Makefile.am | 4 
>  1 file changed, 4 insertions(+)
>
> diff --git a/platform/linux-generic/Makefile.am 
> b/platform/linux-generic/Makefile.am
> index c8fd8cb..9ea6afa 100644
> --- a/platform/linux-generic/Makefile.am
> +++ b/platform/linux-generic/Makefile.am
> @@ -88,6 +88,10 @@ odpapiplatinclude_HEADERS = \
>   $(srcdir)/include/odp/api/plat/traffic_mngr_types.h \
>   $(srcdir)/include/odp/api/plat/version_types.h
>
> +odpdrvincludedir = $(includedir)/odp/drv
> +odpdrvinclude_HEADERS = \
> + $(srcdir)/include/odp/drv/compiler.h
> +

did we figure out which commit that removed this?

Cheers,
Anders

>  noinst_HEADERS = \
>   ${srcdir}/include/odp_align_internal.h \
>   ${srcdir}/include/odp_atomic_internal.h \
> --
> 2.7.4
>


[lng-odp] [PATCH 2/2] platform: Makefile.inc: add wildcards

2016-07-21 Thread Anders Roxell
Reported-by: Fathi Boudra 
Signed-off-by: Anders Roxell 
---
 platform/Makefile.inc | 18 +++---
 1 file changed, 3 insertions(+), 15 deletions(-)

diff --git a/platform/Makefile.inc b/platform/Makefile.inc
index 370383b..0a6600c 100644
--- a/platform/Makefile.inc
+++ b/platform/Makefile.inc
@@ -62,18 +62,6 @@ odpapispecinclude_HEADERS = \
  $(top_srcdir)/include/odp/api/spec/version.h
 
 EXTRA_DIST = \
-arch/default/odp/api/cpu_arch.h \
-arch/default/odp_cpu_arch.c \
-arch/default/odp_sysinfo_parse.c \
-arch/mips64/odp/api/cpu_arch.h \
-arch/mips64/odp_cpu_arch.c \
-arch/mips64/odp_sysinfo_parse.c \
-arch/powerpc/odp/api/cpu_arch.h \
-arch/powerpc/odp_cpu_arch.c \
-arch/powerpc/odp_sysinfo_parse.c \
-arch/x86/odp/api/cpu_arch.h \
-arch/x86/odp_cpu_arch.c \
-arch/x86/odp_sysinfo_parse.c \
-arch/arm/odp/api/cpu_arch.h \
-arch/arm/odp_cpu_arch.c \
-arch/arm/odp_sysinfo_parse.c
+$(wildcard arch/*/odp/api/cpu_arch.h) \
+$(wildcard arch/*/odp_cpu_arch.c) \
+$(wildcard arch/*/odp_sysinfo_parse.c)
-- 
2.1.4



[lng-odp] [PATCH 1/2] linux-gen: Makefile: Move EXTRA_DIST to to platform/Makefile.inc

2016-07-21 Thread Anders Roxell
Make it easier for other platforms like odp-dpdk to reuse arch specific
files in EXTRA_DIST for "free".

Reported-by: Fathi Boudra 
Signed-off-by: Anders Roxell 

Signed-off-by: Anders Roxell 
---
 platform/Makefile.inc  | 17 +
 platform/linux-generic/Makefile.am | 17 -
 2 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/platform/Makefile.inc b/platform/Makefile.inc
index 053bd12..370383b 100644
--- a/platform/Makefile.inc
+++ b/platform/Makefile.inc
@@ -60,3 +60,20 @@ odpapispecinclude_HEADERS = \
  $(top_srcdir)/include/odp/api/spec/timer.h \
  $(top_srcdir)/include/odp/api/spec/traffic_mngr.h \
  $(top_srcdir)/include/odp/api/spec/version.h
+
+EXTRA_DIST = \
+arch/default/odp/api/cpu_arch.h \
+arch/default/odp_cpu_arch.c \
+arch/default/odp_sysinfo_parse.c \
+arch/mips64/odp/api/cpu_arch.h \
+arch/mips64/odp_cpu_arch.c \
+arch/mips64/odp_sysinfo_parse.c \
+arch/powerpc/odp/api/cpu_arch.h \
+arch/powerpc/odp_cpu_arch.c \
+arch/powerpc/odp_sysinfo_parse.c \
+arch/x86/odp/api/cpu_arch.h \
+arch/x86/odp_cpu_arch.c \
+arch/x86/odp_sysinfo_parse.c \
+arch/arm/odp/api/cpu_arch.h \
+arch/arm/odp_cpu_arch.c \
+arch/arm/odp_sysinfo_parse.c
diff --git a/platform/linux-generic/Makefile.am 
b/platform/linux-generic/Makefile.am
index c8fd8cb..0cfd0fe 100644
--- a/platform/linux-generic/Makefile.am
+++ b/platform/linux-generic/Makefile.am
@@ -186,23 +186,6 @@ __LIB__libodp_linux_la_SOURCES = \
   arch/@ARCH_DIR@/odp_cpu_arch.c \
   arch/@ARCH_DIR@/odp_sysinfo_parse.c
 
-EXTRA_DIST = \
-arch/default/odp/api/cpu_arch.h \
-arch/default/odp_cpu_arch.c \
-arch/default/odp_sysinfo_parse.c \
-arch/mips64/odp/api/cpu_arch.h \
-arch/mips64/odp_cpu_arch.c \
-arch/mips64/odp_sysinfo_parse.c \
-arch/powerpc/odp/api/cpu_arch.h \
-arch/powerpc/odp_cpu_arch.c \
-arch/powerpc/odp_sysinfo_parse.c \
-arch/x86/odp/api/cpu_arch.h \
-arch/x86/odp_cpu_arch.c \
-arch/x86/odp_sysinfo_parse.c \
-arch/arm/odp/api/cpu_arch.h \
-arch/arm/odp_cpu_arch.c \
-arch/arm/odp_sysinfo_parse.c
-
 if HAVE_PCAP
 __LIB__libodp_linux_la_SOURCES += pktio/pcap.c
 endif
-- 
2.1.4



[lng-odp] [PATCH 0/2] make it easy for other platform to reuse the arch dir

2016-07-21 Thread Anders Roxell
This patchset makes it easier for platforms like odp-dpdk to reuse the arch
dir.

While building odp-dpdk tarball on an arm64 machine we only got the arch/arm64
dir in the tarball, when trying to build on other architectures I get an error
like the one below:
In file included from ./include/odp_packet_internal.h:21:0,
 from odp_packet.c:8:
./include/odp/api/align.h:55:30: fatal error: odp/api/cpu_arch.h: No such file 
or directory
 #include 
  ^
compilation terminated.
In file included from ../../include/odp_api.h:24:0,
 from ../../helper/include/odp/helper/eth.h:20,
 from ./include/odp_packet_dpdk.h:13,
 from odp_init.c:8:
./include/odp/api/align.h:55:30: fatal error: odp/api/cpu_arch.h: No such file 
or directory
 #include 
  ^
compilation terminated.
In file included from ./include/odp/api/atomic.h:20:0,

Cheers,
Anders

Anders Roxell (2):
  linux-gen: Makefile: Move EXTRA_DIST to to platform/Makefile.inc
  platform: Makefile.inc: add wildcards

 platform/Makefile.inc  |  5 +
 platform/linux-generic/Makefile.am | 17 -
 2 files changed, 5 insertions(+), 17 deletions(-)

-- 
2.1.4



[lng-odp] [PATCH 2/2] platform: Makefile.inc: add wildcards

2016-07-21 Thread Anders Roxell
Reported-by: Fathi Boudra 
Signed-off-by: Anders Roxell 
---
 platform/Makefile.inc | 18 +++---
 1 file changed, 3 insertions(+), 15 deletions(-)

diff --git a/platform/Makefile.inc b/platform/Makefile.inc
index 370383b..0a6600c 100644
--- a/platform/Makefile.inc
+++ b/platform/Makefile.inc
@@ -62,18 +62,6 @@ odpapispecinclude_HEADERS = \
  $(top_srcdir)/include/odp/api/spec/version.h
 
 EXTRA_DIST = \
-arch/default/odp/api/cpu_arch.h \
-arch/default/odp_cpu_arch.c \
-arch/default/odp_sysinfo_parse.c \
-arch/mips64/odp/api/cpu_arch.h \
-arch/mips64/odp_cpu_arch.c \
-arch/mips64/odp_sysinfo_parse.c \
-arch/powerpc/odp/api/cpu_arch.h \
-arch/powerpc/odp_cpu_arch.c \
-arch/powerpc/odp_sysinfo_parse.c \
-arch/x86/odp/api/cpu_arch.h \
-arch/x86/odp_cpu_arch.c \
-arch/x86/odp_sysinfo_parse.c \
-arch/arm/odp/api/cpu_arch.h \
-arch/arm/odp_cpu_arch.c \
-arch/arm/odp_sysinfo_parse.c
+$(wildcard arch/*/odp/api/cpu_arch.h) \
+$(wildcard arch/*/odp_cpu_arch.c) \
+$(wildcard arch/*/odp_sysinfo_parse.c)
-- 
2.1.4



[lng-odp] [PATCH 1/2] linux-gen: Makefile: Move EXTRA_DIST to to platform/Makefile.inc

2016-07-21 Thread Anders Roxell
Make it easier for other platforms like odp-dpdk to reuse arch specific
files in EXTRA_DIST for "free".

Reported-by: Fathi Boudra 
Signed-off-by: Anders Roxell 

Signed-off-by: Anders Roxell 
---
 platform/Makefile.inc  | 17 +
 platform/linux-generic/Makefile.am | 17 -
 2 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/platform/Makefile.inc b/platform/Makefile.inc
index 053bd12..370383b 100644
--- a/platform/Makefile.inc
+++ b/platform/Makefile.inc
@@ -60,3 +60,20 @@ odpapispecinclude_HEADERS = \
  $(top_srcdir)/include/odp/api/spec/timer.h \
  $(top_srcdir)/include/odp/api/spec/traffic_mngr.h \
  $(top_srcdir)/include/odp/api/spec/version.h
+
+EXTRA_DIST = \
+arch/default/odp/api/cpu_arch.h \
+arch/default/odp_cpu_arch.c \
+arch/default/odp_sysinfo_parse.c \
+arch/mips64/odp/api/cpu_arch.h \
+arch/mips64/odp_cpu_arch.c \
+arch/mips64/odp_sysinfo_parse.c \
+arch/powerpc/odp/api/cpu_arch.h \
+arch/powerpc/odp_cpu_arch.c \
+arch/powerpc/odp_sysinfo_parse.c \
+arch/x86/odp/api/cpu_arch.h \
+arch/x86/odp_cpu_arch.c \
+arch/x86/odp_sysinfo_parse.c \
+arch/arm/odp/api/cpu_arch.h \
+arch/arm/odp_cpu_arch.c \
+arch/arm/odp_sysinfo_parse.c
diff --git a/platform/linux-generic/Makefile.am 
b/platform/linux-generic/Makefile.am
index c8fd8cb..0cfd0fe 100644
--- a/platform/linux-generic/Makefile.am
+++ b/platform/linux-generic/Makefile.am
@@ -186,23 +186,6 @@ __LIB__libodp_linux_la_SOURCES = \
   arch/@ARCH_DIR@/odp_cpu_arch.c \
   arch/@ARCH_DIR@/odp_sysinfo_parse.c
 
-EXTRA_DIST = \
-arch/default/odp/api/cpu_arch.h \
-arch/default/odp_cpu_arch.c \
-arch/default/odp_sysinfo_parse.c \
-arch/mips64/odp/api/cpu_arch.h \
-arch/mips64/odp_cpu_arch.c \
-arch/mips64/odp_sysinfo_parse.c \
-arch/powerpc/odp/api/cpu_arch.h \
-arch/powerpc/odp_cpu_arch.c \
-arch/powerpc/odp_sysinfo_parse.c \
-arch/x86/odp/api/cpu_arch.h \
-arch/x86/odp_cpu_arch.c \
-arch/x86/odp_sysinfo_parse.c \
-arch/arm/odp/api/cpu_arch.h \
-arch/arm/odp_cpu_arch.c \
-arch/arm/odp_sysinfo_parse.c
-
 if HAVE_PCAP
 __LIB__libodp_linux_la_SOURCES += pktio/pcap.c
 endif
-- 
2.1.4



[lng-odp] [PATCH 0/2] make it easy for other platform to reuse the arch dir

2016-07-21 Thread Anders Roxell
This patchset makes it easier for platforms like odp-dpdk to reuse the arch
dir.

While building odp-dpdk tarball on an arm64 machine we only got the arch/arm64
dir in the tarball, when trying to build on other architectures I get an error
like the one below:
In file included from ./include/odp_packet_internal.h:21:0,
 from odp_packet.c:8:
./include/odp/api/align.h:55:30: fatal error: odp/api/cpu_arch.h: No such file 
or directory
 #include 
  ^
compilation terminated.
In file included from ../../include/odp_api.h:24:0,
 from ../../helper/include/odp/helper/eth.h:20,
 from ./include/odp_packet_dpdk.h:13,
 from odp_init.c:8:
./include/odp/api/align.h:55:30: fatal error: odp/api/cpu_arch.h: No such file 
or directory
 #include 
  ^
compilation terminated.
In file included from ./include/odp/api/atomic.h:20:0,

Cheers,
Anders

Anders Roxell (2):
  linux-gen: Makefile: Move EXTRA_DIST to to platform/Makefile.inc
  platform: Makefile.inc: add wildcards

 platform/Makefile.inc  |  5 +
 platform/linux-generic/Makefile.am | 17 -
 2 files changed, 5 insertions(+), 17 deletions(-)

-- 
2.1.4



Re: [lng-odp] [API-NEXT PATCH 12/18] linux-generic: drv: adding align.h

2016-07-21 Thread Anders Roxell
On 21 July 2016 at 09:20, Maxim Uvarov  wrote:
> On 07/21/16 10:01, Christophe Milard wrote:
>>
>> On 21 July 2016 at 08:45, Maxim Uvarov  wrote:
>>>
>>> On 07/20/16 23:07, Christophe Milard wrote:

 I am not sure I understand the problem ?
 The files were originated from the following commit ID which was the
 last commit ID in the api-next branch when I did the patch...

 I have had a review from Anders and will send a v2 anyway now

 Christophe.


 Christophe
 commit 77a27212b563299959fb2a609b86bb9117a8f918
 Author: Barry Spinney 
 Date:   Wed Jul 13 11:59:40 2016 -0500

   api: tm: resolve todo

   This todo just asks a question which is no longer important.

   Signed-off-by: Barry Spinney 
   Signed-off-by: Bill Fischofer 
   Signed-off-by: Maxim Uvarov 
>>>
>>>
>>> Do no understand you also. You say in commit log:
>>> """
>>>
>>> duplicated from the API side
>>> (hash: 77a27212b563299959fb2a609b86bb9117a8f918.)
>>> """
>>>
>>> Commit refers to this "api: tm: resolve todo" but it adds some aling.h
>>> So it's not duplicate of api 77a23212 but for drivers.
>>>
>>> If your patch set is bases on some commit id in api-next, that
>>> information
>>> should
>>> not be in git log.
>>
>> The point is to remember the version of the API files my new drv files
>> are based on.
>> Are you saying that you do not want this information in the commit
>> message.
>> Do you want me to remove the hash from the commit messages??
>>
>> Christophe.
>
>
> yes, please remove them. I think you can fetch this information from mailing
> list if it will be needed.

its better to have a changelog with more information than too little so that you
have to search the ML to find whats been going on.

Cheers,
Anders

>
> btw, I tested your patches and all tests passed.
>
> Maxim.
>
>
>
>>
>>> Maxim.
>>>
>>>
>>>
 On 20 July 2016 at 20:49, Maxim Uvarov  wrote:
>
> On 07/18/16 20:49, Christophe Milard wrote:
>>
>> duplicated from the API side
>> (hash: 77a27212b563299959fb2a609b86bb9117a8f918.)
>
> all commits have reference to this hash which looks like not very
> correlate
> with what should it be
>
> Maxim.
>
>
>> Signed-off-by: Christophe Milard 
>> ---
>> include/odp_drv.h  |  1 +
>> platform/linux-generic/Makefile.am |  1 +
>> platform/linux-generic/include/odp/drv/align.h | 60
>> ++
>> 3 files changed, 62 insertions(+)
>> create mode 100644 platform/linux-generic/include/odp/drv/align.h
>>
>> diff --git a/include/odp_drv.h b/include/odp_drv.h
>> index e2c3bda..6d2f7ff 100644
>> --- a/include/odp_drv.h
>> +++ b/include/odp_drv.h
>> @@ -18,6 +18,7 @@
>> extern C {
>> #endif
>> +#include 
>> #include 
>> #include 
>> #include 
>> diff --git a/platform/linux-generic/Makefile.am
>> b/platform/linux-generic/Makefile.am
>> index 68db647..20b4b29 100644
>> --- a/platform/linux-generic/Makefile.am
>> +++ b/platform/linux-generic/Makefile.am
>> @@ -93,6 +93,7 @@ odpapiplatinclude_HEADERS = \
>>   odpdrvincludedir = $(includedir)/odp/drv
>> odpdrvinclude_HEADERS = \
>> + $(srcdir)/include/odp/drv/align.h \
>> $(srcdir)/include/odp/drv/byteorder.h \
>> $(srcdir)/include/odp/drv/compiler.h \
>> $(srcdir)/include/odp/drv/std_types.h \
>> diff --git a/platform/linux-generic/include/odp/drv/align.h
>> b/platform/linux-generic/include/odp/drv/align.h
>> new file mode 100644
>> index 000..9ae3e19
>> --- /dev/null
>> +++ b/platform/linux-generic/include/odp/drv/align.h
>> @@ -0,0 +1,60 @@
>> +/* Copyright (c) 2013, Linaro Limited
>> + * All rights reserved.
>> + *
>> + * SPDX-License-Identifier:BSD-3-Clause
>> + */
>> +
>> +/**
>> + * @file
>> + *
>> + * ODPDRV alignments
>> + */
>> +
>> +#ifndef ODPDRV_PLAT_ALIGN_H_
>> +#define ODPDRV_PLAT_ALIGN_H_
>> +
>> +#ifdef __cplusplus
>> +extern "C" {
>> +#endif
>> +
>> +/** @ingroup odpdrv_compiler_optim
>> + *  @{
>> + */
>> +
>> +#ifdef __GNUC__
>> +
>> +#define ODPDRV_ALIGNED(x) __attribute__((__aligned__(x)))
>> +
>> +#define ODPDRV_PACKED __attribute__((__packed__))
>> +
>> +#define ODPDRV_OFFSETOF(type, member) __builtin_offsetof(type,
>> member)
>> +
>> +#define ODPDRV_FIELD_SIZEOF(type, member) sizeof(((type *)0)->member)
>> +
>> +#if defined __arm__ || defined __aarch64__
>> +
>> +#define ODPDRV_CACHE_LINE_SIZE 64
>> +
>> +#endif
>> +
>> +#else
>> +#error Non-gcc compatible compiler
>> +#endif
>> +
>> +#def

Re: [lng-odp] [PATCHv3 0/4] Restructuring tests for clarity and new interfaces.

2016-07-15 Thread Anders Roxell
On 2016-07-15 05:46, Christophe Milard wrote:
> Cannot see them here when doing normal builds. you must be more
> accurate on what you do. Moreover, these warnings seems to relate to
> helper tests, which this serie doesn't touch.
> confused.

Don't be confused... Maxim commented on the wrong patch. =)

Cheers,
Anders

> 
> /C
> 
> On 15 July 2016 at 05:21, Christophe Milard
>  wrote:
> > Hi Maxim,
> > Warning when doing what?
> >
> > On 14 July 2016 at 22:31, Maxim Uvarov  wrote:
> >> I see that warnings:
> >>
> >> helper/test/Makefile.am:27: warning: variable 'dist_chksum_SOURCES' is
> >> defined but no program or
> >> helper/test/Makefile.am:27: library has 'chksum' as canonical name 
> >> (possible
> >> typo)
> >> helper/test/Makefile.am:28: warning: variable 'dist_odpthreads_SOURCES' is
> >> defined but no program or
> >> helper/test/Makefile.am:28: library has 'odpthreads' as canonical name
> >> (possible typo)
> >> helper/test/Makefile.am:33: warning: variable 'dist_parse_SOURCES' is
> >> defined but no program or
> >> helper/test/Makefile.am:33: library has 'parse' as canonical name (possible
> >> typo)
> >> helper/test/Makefile.am:32: warning: variable 'dist_process_SOURCES' is
> >> defined but no program or
> >> helper/test/Makefile.am:32: library has 'process' as canonical name
> >> (possible typo)
> >> helper/test/Makefile.am:35: warning: variable 'dist_table_SOURCES' is
> >> defined but no program or
> >> helper/test/Makefile.am:35: library has 'table' as canonical name (possible
> >> typo)
> >> helper/test/Makefile.am:30: warning: variable 'dist_thread_SOURCES' is
> >> defined but no program or
> >> helper/test/Makefile.am:30: library has 'thread' as canonical name 
> >> (possible
> >> typo)
> >> helper/test/Makefile.am:29: warning: variable 'odpthreads_LDADD' is defined
> >> but no program or
> >> helper/test/Makefile.am:29: library has 'odpthreads' as canonical name
> >> (possible typo)
> >> helper/test/Makefile.am:34: warning: variable 'process_LDADD' is defined 
> >> but
> >> no program or
> >> helper/test/Makefile.am:34: library has 'process' as canonical name
> >> (possible typo)
> >> helper/test/Makefile.am:31: warning: variable 'thread_LDADD' is defined but
> >> no program or
> >> helper/test/Makefile.am:31: library has 'thread' as canonical name 
> >> (possible
> >> typo)
> >>
> >>
> >> Maxim.
> >>
> >>
> >>
> >> On 07/14/16 14:58, Mike Holmes wrote:
> >>>
> >>> For this series:
> >>>
> >>> Reviewd-by: Mike Holmes 
> >>>
> >>> On 14 July 2016 at 01:18, Yi He  wrote:
> >>>
>  For this series:
> 
>  Reviewed-and-tested-by: Yi He 
> 
>  Best Regards, Yi
> 
>  On 14 July 2016 at 03:52, Bill Fischofer 
>  wrote:
> 
> > For this series:
> >
> > Reviewed-by: Bill Fischofer 
> >
> > On Wed, Jul 13, 2016 at 2:50 PM, Christophe Milard <
> > christophe.mil...@linaro.org> wrote:
> >
> >> since V2:
> >>   -typo fix in implementers guide (Bill)
> >>
> >> since V1:
> >>   -new cosmetic fixes in patch 1 (Christophe)
> >>   -fixed patch 2's l2_fwd_run.sh patch (Yi)
> >>   -fixed implementers guide (Bill, Mike)
> >>   -comment regarding patch4 in this cover-letter (Bill).
> >>   -"all-platforms" directory now named "common_plat"
> >>
> >> This patch series introduces a test directory restructuration needed
> >> to make room for future new interface tests:
> >>
> >> *Patch 1 is just fixing a bunch of cosmetic things to calm down
> >>   check-odp which runs checkpatch on whole moved files. These fixes are
> >> things
> >>   that were not caught before or that were deliberately left as is.
> >>   Still, check-odp cathes a few things: I thing there are meant to be
> >> so
> >>   (volatile usage, camelcase for cunit, and a couple of line > 80 char
> >>   obviously left on purpose (strings)...)
> >>
> >> *patch 2 moves down test/validation/* to
> >> test/common_plat/validation/api/*
> >>   hence making room for future new interface validation (and clearly
> >> defining
> >>   the plaform agnostic side).
> >>
> >> *Patch 3 moves most of odp/test/platform// to
> >>   odp/test//validation/api/*  hence making room
> >>   for other test groups in platform dependant things (e.g. lauching
> >>   perf test with specific platform parameters...) or making room for
> >> other
> >>   interface tests.
> >>
> >> *Patch 4 updates the implementers guide with this new structure
> >>
> >>   The structure under odp/test/ becomes:
> >>   +-- m4
> >>   +-- pktio_ipc//specific stuff
> >>   +-- ring //specific stuff
> >>   +-- validation   //the platform specific side of the validation
> >> tests
> >>   +-- api  //Interface name
> >>   +-- pktio//platform specific things for these tests
> >>   +-- shmem
> >>
> >>   This cou

[lng-odp] [PATCHv2 3/3] example/ipsec: scope ipsec examples

2016-07-14 Thread Anders Roxell
Signed-off-by: Anders Roxell 
---
 example/ipsec/Makefile.am  | 18 +-
 example/ipsec/{run_ah_in => odp_ipsec_run_ah_in}   |  0
 example/ipsec/{run_ah_out => odp_ipsec_run_ah_out} |  0
 example/ipsec/{run_both_in => odp_ipsec_run_both_in}   |  0
 example/ipsec/{run_both_out => odp_ipsec_run_both_out} |  0
 example/ipsec/{run_esp_in => odp_ipsec_run_esp_in} |  0
 example/ipsec/{run_esp_out => odp_ipsec_run_esp_out}   |  0
 example/ipsec/{run_live => odp_ipsec_run_live} |  0
 example/ipsec/{run_router => odp_ipsec_run_router} |  0
 example/ipsec/{run_simple => odp_ipsec_run_simple} |  0
 10 files changed, 9 insertions(+), 9 deletions(-)
 rename example/ipsec/{run_ah_in => odp_ipsec_run_ah_in} (100%)
 rename example/ipsec/{run_ah_out => odp_ipsec_run_ah_out} (100%)
 rename example/ipsec/{run_both_in => odp_ipsec_run_both_in} (100%)
 rename example/ipsec/{run_both_out => odp_ipsec_run_both_out} (100%)
 rename example/ipsec/{run_esp_in => odp_ipsec_run_esp_in} (100%)
 rename example/ipsec/{run_esp_out => odp_ipsec_run_esp_out} (100%)
 rename example/ipsec/{run_live => odp_ipsec_run_live} (100%)
 rename example/ipsec/{run_router => odp_ipsec_run_router} (100%)
 rename example/ipsec/{run_simple => odp_ipsec_run_simple} (100%)

diff --git a/example/ipsec/Makefile.am b/example/ipsec/Makefile.am
index c82ea0a..01ccd42 100644
--- a/example/ipsec/Makefile.am
+++ b/example/ipsec/Makefile.am
@@ -15,15 +15,15 @@ noinst_HEADERS = \
  $(top_srcdir)/example/example_debug.h
 
 dist_bin_SCRIPTS = \
-  $(srcdir)/run_ah_in \
-  $(srcdir)/run_ah_out \
-  $(srcdir)/run_both_in \
-  $(srcdir)/run_both_out \
-  $(srcdir)/run_esp_in \
-  $(srcdir)/run_esp_out \
-  $(srcdir)/run_live \
-  $(srcdir)/run_router \
-  $(srcdir)/run_simple
+  $(srcdir)/odp_ipsec_run_ah_in \
+  $(srcdir)/odp_ipsec_run_ah_out \
+  $(srcdir)/odp_ipsec_run_both_in \
+  $(srcdir)/odp_ipsec_run_both_out \
+  $(srcdir)/odp_ipsec_run_esp_in \
+  $(srcdir)/odp_ipsec_run_esp_out \
+  $(srcdir)/odp_ipsec_run_live \
+  $(srcdir)/odp_ipsec_run_router \
+  $(srcdir)/odp_ipsec_run_simple
 
 dist_odp_ipsec_SOURCES = odp_ipsec.c \
 odp_ipsec_sa_db.c \
diff --git a/example/ipsec/run_ah_in b/example/ipsec/odp_ipsec_run_ah_in
similarity index 100%
rename from example/ipsec/run_ah_in
rename to example/ipsec/odp_ipsec_run_ah_in
diff --git a/example/ipsec/run_ah_out b/example/ipsec/odp_ipsec_run_ah_out
similarity index 100%
rename from example/ipsec/run_ah_out
rename to example/ipsec/odp_ipsec_run_ah_out
diff --git a/example/ipsec/run_both_in b/example/ipsec/odp_ipsec_run_both_in
similarity index 100%
rename from example/ipsec/run_both_in
rename to example/ipsec/odp_ipsec_run_both_in
diff --git a/example/ipsec/run_both_out b/example/ipsec/odp_ipsec_run_both_out
similarity index 100%
rename from example/ipsec/run_both_out
rename to example/ipsec/odp_ipsec_run_both_out
diff --git a/example/ipsec/run_esp_in b/example/ipsec/odp_ipsec_run_esp_in
similarity index 100%
rename from example/ipsec/run_esp_in
rename to example/ipsec/odp_ipsec_run_esp_in
diff --git a/example/ipsec/run_esp_out b/example/ipsec/odp_ipsec_run_esp_out
similarity index 100%
rename from example/ipsec/run_esp_out
rename to example/ipsec/odp_ipsec_run_esp_out
diff --git a/example/ipsec/run_live b/example/ipsec/odp_ipsec_run_live
similarity index 100%
rename from example/ipsec/run_live
rename to example/ipsec/odp_ipsec_run_live
diff --git a/example/ipsec/run_router b/example/ipsec/odp_ipsec_run_router
similarity index 100%
rename from example/ipsec/run_router
rename to example/ipsec/odp_ipsec_run_router
diff --git a/example/ipsec/run_simple b/example/ipsec/odp_ipsec_run_simple
similarity index 100%
rename from example/ipsec/run_simple
rename to example/ipsec/odp_ipsec_run_simple
-- 
2.1.4



[lng-odp] [PATCHv2 2/3] example/time/Makefile: remove incorrect postfix _test

2016-07-14 Thread Anders Roxell
Signed-off-by: Anders Roxell 
---
 example/time/.gitignore  | 2 +-
 example/time/Makefile.am | 8 
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/example/time/.gitignore b/example/time/.gitignore
index 3106aea..938c1aa 100644
--- a/example/time/.gitignore
+++ b/example/time/.gitignore
@@ -1 +1 @@
-odp_time_global_test
+odp_time_global
diff --git a/example/time/Makefile.am b/example/time/Makefile.am
index 915593a..c1db375 100644
--- a/example/time/Makefile.am
+++ b/example/time/Makefile.am
@@ -1,10 +1,10 @@
 include $(top_srcdir)/example/Makefile.inc
 
-bin_PROGRAMS = odp_time_global_test$(EXEEXT)
-odp_time_global_test_LDFLAGS = $(AM_LDFLAGS) -static
-odp_time_global_test_CFLAGS = $(AM_CFLAGS) -I${top_srcdir}/example
+bin_PROGRAMS = odp_time_global$(EXEEXT)
+odp_time_global_LDFLAGS = $(AM_LDFLAGS) -static
+odp_time_global_CFLAGS = $(AM_CFLAGS) -I${top_srcdir}/example
 
 noinst_HEADERS = \
  $(top_srcdir)/example/example_debug.h
 
-dist_odp_time_global_test_SOURCES = time_global_test.c
+dist_odp_time_global_SOURCES = time_global_test.c
-- 
2.1.4



[lng-odp] [PATCHv2 1/3] helper/test/Makefile: don't install tests

2016-07-14 Thread Anders Roxell
Signed-off-by: Anders Roxell 
---
 helper/test/Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/helper/test/Makefile.am b/helper/test/Makefile.am
index e9e8785..545db73 100644
--- a/helper/test/Makefile.am
+++ b/helper/test/Makefile.am
@@ -22,7 +22,7 @@ endif
 
 dist_bin_SCRIPTS =
 
-bin_PROGRAMS = $(EXECUTABLES) $(COMPILE_ONLY)
+test_PROGRAMS = $(EXECUTABLES) $(COMPILE_ONLY)
 
 EXTRA_DIST = odpthreads_as_processes odpthreads_as_pthreads
 
-- 
2.1.4



[lng-odp] [PATCHv2 0/3] cleanups

2016-07-14 Thread Anders Roxell
This is preparation cleanup so installed executables are scoped
and helpers are removed as unhelpful for the final installation.

v2, fixes a issue that Maxim reported with:
helper/test/Makefile.am:27: warning: variable 'dist_chksum_SOURCES' is defined 
but no program or
helper/test/Makefile.am:27: library has 'chksum' as canonical name (possible 
typo)


Anders Roxell (3):
  helper/test/Makefile: don't install tests
  example/time/Makefile: remove incorrect postfix _test
  example/ipsec: scope ipsec examples

 example/ipsec/Makefile.am  | 18 +-
 example/ipsec/{run_ah_in => odp_ipsec_run_ah_in}   |  0
 example/ipsec/{run_ah_out => odp_ipsec_run_ah_out} |  0
 example/ipsec/{run_both_in => odp_ipsec_run_both_in}   |  0
 example/ipsec/{run_both_out => odp_ipsec_run_both_out} |  0
 example/ipsec/{run_esp_in => odp_ipsec_run_esp_in} |  0
 example/ipsec/{run_esp_out => odp_ipsec_run_esp_out}   |  0
 example/ipsec/{run_live => odp_ipsec_run_live} |  0
 example/ipsec/{run_router => odp_ipsec_run_router} |  0
 example/ipsec/{run_simple => odp_ipsec_run_simple} |  0
 example/time/.gitignore|  2 +-
 example/time/Makefile.am   |  8 
 helper/test/Makefile.am|  2 +-
 13 files changed, 15 insertions(+), 15 deletions(-)
 rename example/ipsec/{run_ah_in => odp_ipsec_run_ah_in} (100%)
 rename example/ipsec/{run_ah_out => odp_ipsec_run_ah_out} (100%)
 rename example/ipsec/{run_both_in => odp_ipsec_run_both_in} (100%)
 rename example/ipsec/{run_both_out => odp_ipsec_run_both_out} (100%)
 rename example/ipsec/{run_esp_in => odp_ipsec_run_esp_in} (100%)
 rename example/ipsec/{run_esp_out => odp_ipsec_run_esp_out} (100%)
 rename example/ipsec/{run_live => odp_ipsec_run_live} (100%)
 rename example/ipsec/{run_router => odp_ipsec_run_router} (100%)
 rename example/ipsec/{run_simple => odp_ipsec_run_simple} (100%)

-- 
2.1.4



[lng-odp] [PATCH 3/3] example/ipsec: scope ipsec examples

2016-07-13 Thread Anders Roxell
Signed-off-by: Anders Roxell 
---
 example/ipsec/Makefile.am| 18 +-
 example/ipsec/odp_ipsec_run_ah_in| 12 
 example/ipsec/odp_ipsec_run_ah_out   | 12 
 example/ipsec/odp_ipsec_run_both_in  | 14 ++
 example/ipsec/odp_ipsec_run_both_out | 14 ++
 example/ipsec/odp_ipsec_run_esp_in   | 13 +
 example/ipsec/odp_ipsec_run_esp_out  | 13 +
 example/ipsec/odp_ipsec_run_live | 17 +
 example/ipsec/odp_ipsec_run_router   |  9 +
 example/ipsec/odp_ipsec_run_simple   | 10 ++
 example/ipsec/run_ah_in  | 12 
 example/ipsec/run_ah_out | 12 
 example/ipsec/run_both_in| 14 --
 example/ipsec/run_both_out   | 14 --
 example/ipsec/run_esp_in | 13 -
 example/ipsec/run_esp_out| 13 -
 example/ipsec/run_live   | 17 -
 example/ipsec/run_router |  9 -
 example/ipsec/run_simple | 10 --
 19 files changed, 123 insertions(+), 123 deletions(-)
 create mode 100755 example/ipsec/odp_ipsec_run_ah_in
 create mode 100755 example/ipsec/odp_ipsec_run_ah_out
 create mode 100755 example/ipsec/odp_ipsec_run_both_in
 create mode 100755 example/ipsec/odp_ipsec_run_both_out
 create mode 100755 example/ipsec/odp_ipsec_run_esp_in
 create mode 100755 example/ipsec/odp_ipsec_run_esp_out
 create mode 100755 example/ipsec/odp_ipsec_run_live
 create mode 100755 example/ipsec/odp_ipsec_run_router
 create mode 100755 example/ipsec/odp_ipsec_run_simple
 delete mode 100755 example/ipsec/run_ah_in
 delete mode 100755 example/ipsec/run_ah_out
 delete mode 100755 example/ipsec/run_both_in
 delete mode 100755 example/ipsec/run_both_out
 delete mode 100755 example/ipsec/run_esp_in
 delete mode 100755 example/ipsec/run_esp_out
 delete mode 100755 example/ipsec/run_live
 delete mode 100755 example/ipsec/run_router
 delete mode 100755 example/ipsec/run_simple

diff --git a/example/ipsec/Makefile.am b/example/ipsec/Makefile.am
index c82ea0a..01ccd42 100644
--- a/example/ipsec/Makefile.am
+++ b/example/ipsec/Makefile.am
@@ -15,15 +15,15 @@ noinst_HEADERS = \
  $(top_srcdir)/example/example_debug.h
 
 dist_bin_SCRIPTS = \
-  $(srcdir)/run_ah_in \
-  $(srcdir)/run_ah_out \
-  $(srcdir)/run_both_in \
-  $(srcdir)/run_both_out \
-  $(srcdir)/run_esp_in \
-  $(srcdir)/run_esp_out \
-  $(srcdir)/run_live \
-  $(srcdir)/run_router \
-  $(srcdir)/run_simple
+  $(srcdir)/odp_ipsec_run_ah_in \
+  $(srcdir)/odp_ipsec_run_ah_out \
+  $(srcdir)/odp_ipsec_run_both_in \
+  $(srcdir)/odp_ipsec_run_both_out \
+  $(srcdir)/odp_ipsec_run_esp_in \
+  $(srcdir)/odp_ipsec_run_esp_out \
+  $(srcdir)/odp_ipsec_run_live \
+  $(srcdir)/odp_ipsec_run_router \
+  $(srcdir)/odp_ipsec_run_simple
 
 dist_odp_ipsec_SOURCES = odp_ipsec.c \
 odp_ipsec_sa_db.c \
diff --git a/example/ipsec/odp_ipsec_run_ah_in 
b/example/ipsec/odp_ipsec_run_ah_in
new file mode 100755
index 000..252f44b
--- /dev/null
+++ b/example/ipsec/odp_ipsec_run_ah_in
@@ -0,0 +1,12 @@
+#!/bin/bash
+#
+# Test input AH
+#  - 2 loop interfaces
+#  - 10 packets
+#  - Specify API mode on command line
+odp_ipsec -i loop1,loop2 \
+-r 192.168.111.2/32:loop1:08.00.27.76.B5.E0 \
+-p 192.168.222.0/24:192.168.111.0/24:in:ah \
+-a 192.168.222.2:192.168.111.2:md5:300:27f6d123d7077b361662fc6e451f65d8 \
+-s 192.168.222.2:192.168.111.2:loop2:loop1:10:100 \
+-c 2 -m $1
diff --git a/example/ipsec/odp_ipsec_run_ah_out 
b/example/ipsec/odp_ipsec_run_ah_out
new file mode 100755
index 000..9256c07
--- /dev/null
+++ b/example/ipsec/odp_ipsec_run_ah_out
@@ -0,0 +1,12 @@
+#!/bin/bash
+#
+# Test output AH
+#  - 2 loop interfaces
+#  - 10 packets
+#  - Specify API mode on command line
+odp_ipsec -i loop1,loop2 \
+-r 192.168.222.2/32:loop2:08.00.27.F5.8B.DB \
+-p 192.168.111.0/24:192.168.222.0/24:out:ah \
+-a 192.168.111.2:192.168.222.2:md5:200:a731649644c5dee92cbd9c2e7e188ee6 \
+-s 192.168.111.2:192.168.222.2:loop1:loop2:10:100 \
+-c 2 -m $1
diff --git a/example/ipsec/odp_ipsec_run_both_in 
b/example/ipsec/odp_ipsec_run_both_in
new file mode 100755
index 000..c3f169c
--- /dev/null
+++ b/example/ipsec/odp_ipsec_run_both_in
@@ -0,0 +1,14 @@
+#!/bin/bash
+#
+# Test AH and ESP input
+#  - 2 loop interfaces
+#  - 10 packets
+#  - Specify API mode on command line
+odp_ipsec -i loop1,loop2 \
+-r 192.168.111.2/32:loop1:08.00.27.76.B5.E0 \
+-p 192.168.222.0/24:192.168.111.0/24:in:both \
+-a 192.168.222.2:192.168.111.2:md5:300:27f6d123d7077b361662fc6e451f65d8 \
+-e 192.168.222.2:192.168.111.2

[lng-odp] [PATCH 2/3] example/time/Makefile: remove incorrect postfix _test

2016-07-13 Thread Anders Roxell
Signed-off-by: Anders Roxell 
---
 example/time/.gitignore  | 2 +-
 example/time/Makefile.am | 8 
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/example/time/.gitignore b/example/time/.gitignore
index 3106aea..938c1aa 100644
--- a/example/time/.gitignore
+++ b/example/time/.gitignore
@@ -1 +1 @@
-odp_time_global_test
+odp_time_global
diff --git a/example/time/Makefile.am b/example/time/Makefile.am
index 915593a..c1db375 100644
--- a/example/time/Makefile.am
+++ b/example/time/Makefile.am
@@ -1,10 +1,10 @@
 include $(top_srcdir)/example/Makefile.inc
 
-bin_PROGRAMS = odp_time_global_test$(EXEEXT)
-odp_time_global_test_LDFLAGS = $(AM_LDFLAGS) -static
-odp_time_global_test_CFLAGS = $(AM_CFLAGS) -I${top_srcdir}/example
+bin_PROGRAMS = odp_time_global$(EXEEXT)
+odp_time_global_LDFLAGS = $(AM_LDFLAGS) -static
+odp_time_global_CFLAGS = $(AM_CFLAGS) -I${top_srcdir}/example
 
 noinst_HEADERS = \
  $(top_srcdir)/example/example_debug.h
 
-dist_odp_time_global_test_SOURCES = time_global_test.c
+dist_odp_time_global_SOURCES = time_global_test.c
-- 
2.1.4



[lng-odp] [PATCH 1/3] helper/test/Makefile: don't install tests

2016-07-13 Thread Anders Roxell
Signed-off-by: Anders Roxell 
---
 helper/test/Makefile.am | 2 --
 1 file changed, 2 deletions(-)

diff --git a/helper/test/Makefile.am b/helper/test/Makefile.am
index e9e8785..59a427a 100644
--- a/helper/test/Makefile.am
+++ b/helper/test/Makefile.am
@@ -22,8 +22,6 @@ endif
 
 dist_bin_SCRIPTS =
 
-bin_PROGRAMS = $(EXECUTABLES) $(COMPILE_ONLY)
-
 EXTRA_DIST = odpthreads_as_processes odpthreads_as_pthreads
 
 dist_chksum_SOURCES = chksum.c
-- 
2.1.4



[lng-odp] [PATCH 0/3] cleanups

2016-07-13 Thread Anders Roxell
This is preparation cleanup so installed executables are scoped
and helpers are removed as unhelpful for the final installation.

Anders Roxell (3):
  helper/test/Makefile: don't install tests
  example/time/Makefile: remove incorrect postfix _test
  example/ipsec: scope ipsec examples

 example/ipsec/Makefile.am| 18 +-
 example/ipsec/odp_ipsec_run_ah_in| 12 
 example/ipsec/odp_ipsec_run_ah_out   | 12 
 example/ipsec/odp_ipsec_run_both_in  | 14 ++
 example/ipsec/odp_ipsec_run_both_out | 14 ++
 example/ipsec/odp_ipsec_run_esp_in   | 13 +
 example/ipsec/odp_ipsec_run_esp_out  | 13 +
 example/ipsec/odp_ipsec_run_live | 17 +
 example/ipsec/odp_ipsec_run_router   |  9 +
 example/ipsec/odp_ipsec_run_simple   | 10 ++
 example/ipsec/run_ah_in  | 12 
 example/ipsec/run_ah_out | 12 
 example/ipsec/run_both_in| 14 --
 example/ipsec/run_both_out   | 14 --
 example/ipsec/run_esp_in | 13 -
 example/ipsec/run_esp_out| 13 -
 example/ipsec/run_live   | 17 -
 example/ipsec/run_router |  9 -
 example/ipsec/run_simple | 10 --
 example/time/.gitignore  |  2 +-
 example/time/Makefile.am |  8 
 helper/test/Makefile.am  |  2 --
 22 files changed, 128 insertions(+), 130 deletions(-)
 create mode 100755 example/ipsec/odp_ipsec_run_ah_in
 create mode 100755 example/ipsec/odp_ipsec_run_ah_out
 create mode 100755 example/ipsec/odp_ipsec_run_both_in
 create mode 100755 example/ipsec/odp_ipsec_run_both_out
 create mode 100755 example/ipsec/odp_ipsec_run_esp_in
 create mode 100755 example/ipsec/odp_ipsec_run_esp_out
 create mode 100755 example/ipsec/odp_ipsec_run_live
 create mode 100755 example/ipsec/odp_ipsec_run_router
 create mode 100755 example/ipsec/odp_ipsec_run_simple
 delete mode 100755 example/ipsec/run_ah_in
 delete mode 100755 example/ipsec/run_ah_out
 delete mode 100755 example/ipsec/run_both_in
 delete mode 100755 example/ipsec/run_both_out
 delete mode 100755 example/ipsec/run_esp_in
 delete mode 100755 example/ipsec/run_esp_out
 delete mode 100755 example/ipsec/run_live
 delete mode 100755 example/ipsec/run_router
 delete mode 100755 example/ipsec/run_simple

-- 
2.1.4



[lng-odp] [PATCHv3] configure: split up libodphelper SO-version from libodp

2016-06-30 Thread Anders Roxell
The libodphelper and libopd need to track their evolving ABI
independently and so there needs to be two separate version numbers.

Signed-off-by: Anders Roxell 
---
 configure.ac   | 6 +-
 helper/Makefile.am | 2 +-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index f3952db..c0eb207 100644
--- a/configure.ac
+++ b/configure.ac
@@ -15,6 +15,9 @@ AM_SILENT_RULES([yes])
 ODP_LIBSO_VERSION=110:0:1
 AC_SUBST(ODP_LIBSO_VERSION)
 
+ODPHELPER_LIBSO_VERSION=110:0:1
+AC_SUBST(ODPHELPER_LIBSO_VERSION)
+
 # Checks for programs.
 AC_PROG_CC
 AM_PROG_CC_C_O
@@ -272,7 +275,8 @@ AC_OUTPUT
 AC_MSG_RESULT([
$PACKAGE $VERSION
 
-   Library version:${ODP_LIBSO_VERSION}
+   ODP Library version:${ODP_LIBSO_VERSION}
+   Helper Library version: ${ODPHELPER_LIBSO_VERSION}
 
implementation_name:${IMPLEMENTATION_NAME}
ARCH_DIR${ARCH_DIR}
diff --git a/helper/Makefile.am b/helper/Makefile.am
index aa58e8c..a82a11a 100644
--- a/helper/Makefile.am
+++ b/helper/Makefile.am
@@ -8,7 +8,7 @@ AM_CFLAGS  = -I$(srcdir)/include
 AM_CFLAGS += -I$(top_srcdir)/platform/@with_platform@/include
 AM_CFLAGS += -I$(top_srcdir)/include
 
-AM_LDFLAGS += -version-number '$(ODP_LIBSO_VERSION)'
+AM_LDFLAGS += -version-number '$(ODPHELPER_LIBSO_VERSION)'
 
 helperincludedir = $(includedir)/odp/helper/
 helperinclude_HEADERS = \
-- 
2.1.4

___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp


[lng-odp] [PATCHv2] configure: split up libodphelper SO-version from libodp

2016-06-28 Thread Anders Roxell
The libodphelper and libopd need to track their evolving ABI
independently and so there needs to be two separate version numbers.

Signed-off-by: Anders Roxell 
---
 configure.ac   | 3 +++
 helper/Makefile.am | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index c87755b..afa4079 100644
--- a/configure.ac
+++ b/configure.ac
@@ -15,6 +15,9 @@ AM_SILENT_RULES([yes])
 ODP_LIBSO_VERSION=110:0:1
 AC_SUBST(ODP_LIBSO_VERSION)
 
+ODPHELPER_LIBSO_VERSION=110:0:1
+AC_SUBST(ODPHELPER_LIBSO_VERSION)
+
 # Checks for programs.
 AC_PROG_CC
 AM_PROG_CC_C_O
diff --git a/helper/Makefile.am b/helper/Makefile.am
index aa58e8c..a82a11a 100644
--- a/helper/Makefile.am
+++ b/helper/Makefile.am
@@ -8,7 +8,7 @@ AM_CFLAGS  = -I$(srcdir)/include
 AM_CFLAGS += -I$(top_srcdir)/platform/@with_platform@/include
 AM_CFLAGS += -I$(top_srcdir)/include
 
-AM_LDFLAGS += -version-number '$(ODP_LIBSO_VERSION)'
+AM_LDFLAGS += -version-number '$(ODPHELPER_LIBSO_VERSION)'
 
 helperincludedir = $(includedir)/odp/helper/
 helperinclude_HEADERS = \
-- 
2.1.4

___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp


Re: [lng-odp] [PATCHv2] update version number from v1.10.0.0 to v1.10.1.0

2016-06-14 Thread Anders Roxell
On 14 Jun 2016 2:22 p.m., "Maxim Uvarov"  wrote:
>
> Signed-off-by: Maxim Uvarov 

Review-by: Anders Roxell 

> ---
>  configure.ac   | 2 +-
>  include/odp/api/spec/version.h | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index a12f984..3851ebd 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -12,7 +12,7 @@ AM_SILENT_RULES([yes])
>
 ##
>  # Set correct platform library version
>
 ##
> -ODP_LIBSO_VERSION=110:0:0
> +ODP_LIBSO_VERSION=110:0:1
>  AC_SUBST(ODP_LIBSO_VERSION)
>
>  # Checks for programs.
> diff --git a/include/odp/api/spec/version.h
b/include/odp/api/spec/version.h
> index 6220f37..aa3f3ab 100644
> --- a/include/odp/api/spec/version.h
> +++ b/include/odp/api/spec/version.h
> @@ -54,7 +54,7 @@ extern "C" {
>   * to the API. For an API with common generation and major version, but
with
>   * different minor numbers the two versions are backward compatible.
>   */
> -#define ODP_VERSION_API_MINOR 0
> +#define ODP_VERSION_API_MINOR 1
>
>  /**
>   * ODP API version string
> --
> 2.7.1.250.gff4ea60
>
> ___
> lng-odp mailing list
> lng-odp@lists.linaro.org
> https://lists.linaro.org/mailman/listinfo/lng-odp
___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp


Re: [lng-odp] [PATCH] update version number from v1.10.0.0 to v1.10.1.0

2016-06-14 Thread Anders Roxell
On 14 June 2016 at 12:46, Maxim Uvarov  wrote:
> Signed-off-by: Maxim Uvarov 
> ---
>  configure.ac   | 2 +-
>  include/odp/api/spec/version.h | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index a12f984..3e06885 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -12,7 +12,7 @@ AM_SILENT_RULES([yes])
>  ##
>  # Set correct platform library version
>  ##
> -ODP_LIBSO_VERSION=110:0:0
> +ODP_LIBSO_VERSION=110:1:0

I think It should be 110:0:1, see [1]


Cheers,
Anders
[1] 
https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html

>  AC_SUBST(ODP_LIBSO_VERSION)
>
>  # Checks for programs.
> diff --git a/include/odp/api/spec/version.h b/include/odp/api/spec/version.h
> index 6220f37..aa3f3ab 100644
> --- a/include/odp/api/spec/version.h
> +++ b/include/odp/api/spec/version.h
> @@ -54,7 +54,7 @@ extern "C" {
>   * to the API. For an API with common generation and major version, but with
>   * different minor numbers the two versions are backward compatible.
>   */
> -#define ODP_VERSION_API_MINOR 0
> +#define ODP_VERSION_API_MINOR 1
>
>  /**
>   * ODP API version string
> --
> 2.7.1.250.gff4ea60
>
> ___
> lng-odp mailing list
> lng-odp@lists.linaro.org
> https://lists.linaro.org/mailman/listinfo/lng-odp
___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp


[lng-odp] [PATCH] example/timer: don't run test if configure flag not set

2016-06-10 Thread Anders Roxell
Signed-off-by: Anders Roxell 
---
 example/timer/Makefile.am | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/example/timer/Makefile.am b/example/timer/Makefile.am
index 1c733d3..edb8b2c 100644
--- a/example/timer/Makefile.am
+++ b/example/timer/Makefile.am
@@ -10,7 +10,9 @@ odp_timer_simple_LDFLAGS = $(AM_LDFLAGS) -static
 odp_timer_simple_CFLAGS = $(AM_CFLAGS) -I${top_srcdir}/example
 dist_odp_timer_simple_SOURCES = odp_timer_simple.c
 
+if test_example
 TESTS = odp_timer_simple
+endif
 
 noinst_HEADERS = \
  $(top_srcdir)/example/example_debug.h
-- 
2.1.4

___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp


[lng-odp] [PATCHv2] configure: split up libodphelper SO-version from libodp

2016-06-08 Thread Anders Roxell
The libodphelper and libopd need to track their evolving ABI
independently and so there needs to be two separate version numbers.

Signed-off-by: Anders Roxell 
---
 configure.ac   | 3 +++
 helper/Makefile.am | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index a12f984..85dd3b1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -15,6 +15,9 @@ AM_SILENT_RULES([yes])
 ODP_LIBSO_VERSION=110:0:0
 AC_SUBST(ODP_LIBSO_VERSION)
 
+ODPHELPER_LIBSO_VERSION=110:0:0
+AC_SUBST(ODPHELPER_LIBSO_VERSION)
+
 # Checks for programs.
 AC_PROG_CC
 AM_PROG_CC_C_O
diff --git a/helper/Makefile.am b/helper/Makefile.am
index aa58e8c..a82a11a 100644
--- a/helper/Makefile.am
+++ b/helper/Makefile.am
@@ -8,7 +8,7 @@ AM_CFLAGS  = -I$(srcdir)/include
 AM_CFLAGS += -I$(top_srcdir)/platform/@with_platform@/include
 AM_CFLAGS += -I$(top_srcdir)/include
 
-AM_LDFLAGS += -version-number '$(ODP_LIBSO_VERSION)'
+AM_LDFLAGS += -version-number '$(ODPHELPER_LIBSO_VERSION)'
 
 helperincludedir = $(includedir)/odp/helper/
 helperinclude_HEADERS = \
-- 
2.1.4

___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp


[lng-odp] [PATCH] configure: split up libodphelper SO-version from libodp

2016-06-07 Thread Anders Roxell
They can be updated separately so no need to bump both versions at the
same time, specially when there is no change in one of them.

Signed-off-by: Anders Roxell 
---
 configure.ac   | 3 +++
 helper/Makefile.am | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index a12f984..85dd3b1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -15,6 +15,9 @@ AM_SILENT_RULES([yes])
 ODP_LIBSO_VERSION=110:0:0
 AC_SUBST(ODP_LIBSO_VERSION)
 
+ODPHELPER_LIBSO_VERSION=110:0:0
+AC_SUBST(ODPHELPER_LIBSO_VERSION)
+
 # Checks for programs.
 AC_PROG_CC
 AM_PROG_CC_C_O
diff --git a/helper/Makefile.am b/helper/Makefile.am
index aa58e8c..a82a11a 100644
--- a/helper/Makefile.am
+++ b/helper/Makefile.am
@@ -8,7 +8,7 @@ AM_CFLAGS  = -I$(srcdir)/include
 AM_CFLAGS += -I$(top_srcdir)/platform/@with_platform@/include
 AM_CFLAGS += -I$(top_srcdir)/include
 
-AM_LDFLAGS += -version-number '$(ODP_LIBSO_VERSION)'
+AM_LDFLAGS += -version-number '$(ODPHELPER_LIBSO_VERSION)'
 
 helperincludedir = $(includedir)/odp/helper/
 helperinclude_HEADERS = \
-- 
2.1.4

___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp


Re: [lng-odp] [PATCH] linux-generic/test/Makefile: OOT ring build error

2016-06-05 Thread Anders Roxell
On 5 June 2016 at 22:11, Anders Roxell  wrote:
> Add a missing include path to be able to do out-of-tree builds.
>
> Making all in ring
> make[2]: Entering directory 
> '/media/data/src/odp/crap/platform/linux-generic/test/ring'
>   CC   libtestring_la-ring_stress.lo
>   CC   libtestring_la-ring_basic.lo
>   CC   ring_main.o
>   CC   libtestring_la-ring_suites.lo
> ../../../../../platform/linux-generic/test/ring/ring_stress.c:21:30: fatal 
> error: odp/helper/linux.h: No such file or directory
>  #include 
>   ^
> compilation terminated.
> Makefile:535: recipe for target 'libtestring_la-ring_stress.lo' failed
> make[2]: *** [libtestring_la-ring_stress.lo] Error 1
>
> Signed-off-by: Anders Roxell 
> ---
>  platform/linux-generic/test/Makefile.inc | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/platform/linux-generic/test/Makefile.inc 
> b/platform/linux-generic/test/Makefile.inc
> index 2d1a683..d504f70 100644
> --- a/platform/linux-generic/test/Makefile.inc
> +++ b/platform/linux-generic/test/Makefile.inc
> @@ -12,4 +12,5 @@ INCCUNIT_COMMON = -I$(top_srcdir)/test/validation/common
>  INCODP = -I$(top_srcdir)/test \
>  -I$(top_srcdir)/platform/@with_platform@/include \
>  -I$(top_srcdir)/platform/@with_platform@/arch/$(ARCH_DIR) \
> +-I$(top_srcdir)/helper/include \
>  -I$(top_srcdir)/include
> --
> 2.1.4
>

Urgh... Please ignore this patch.

Cheers,
Anders
___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp


[lng-odp] [PATCH] linux-generic/test/Makefile: OOT ring build error

2016-06-05 Thread Anders Roxell
Add a missing include path to be able to do out-of-tree builds.

Making all in ring
make[2]: Entering directory 
'/media/data/src/odp/crap/platform/linux-generic/test/ring'
  CC   libtestring_la-ring_stress.lo
  CC   libtestring_la-ring_basic.lo
  CC   ring_main.o
  CC   libtestring_la-ring_suites.lo
../../../../../platform/linux-generic/test/ring/ring_stress.c:21:30: fatal 
error: odp/helper/linux.h: No such file or directory
 #include 
  ^
compilation terminated.
Makefile:535: recipe for target 'libtestring_la-ring_stress.lo' failed
make[2]: *** [libtestring_la-ring_stress.lo] Error 1

Signed-off-by: Anders Roxell 
---
 platform/linux-generic/test/Makefile.inc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/platform/linux-generic/test/Makefile.inc 
b/platform/linux-generic/test/Makefile.inc
index 2d1a683..d504f70 100644
--- a/platform/linux-generic/test/Makefile.inc
+++ b/platform/linux-generic/test/Makefile.inc
@@ -12,4 +12,5 @@ INCCUNIT_COMMON = -I$(top_srcdir)/test/validation/common
 INCODP = -I$(top_srcdir)/test \
 -I$(top_srcdir)/platform/@with_platform@/include \
 -I$(top_srcdir)/platform/@with_platform@/arch/$(ARCH_DIR) \
+-I$(top_srcdir)/helper/include \
 -I$(top_srcdir)/include
-- 
2.1.4

___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp


[lng-odp] [PATCH] linux-generic: include: drv: std_types.h: fix cyclic include

2016-05-23 Thread Anders Roxell
Reported-by: Mike Holmes 
Signed-off-by: Anders Roxell 
---
 platform/linux-generic/include/odp/drv/std_types.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/platform/linux-generic/include/odp/drv/std_types.h 
b/platform/linux-generic/include/odp/drv/std_types.h
index 5b0815b..4fe4aff 100644
--- a/platform/linux-generic/include/odp/drv/std_types.h
+++ b/platform/linux-generic/include/odp/drv/std_types.h
@@ -33,7 +33,7 @@ typedef int odpdrv_bool_t;
  * @}
  */
 
-#include 
+#include 
 
 #ifdef __cplusplus
 }
-- 
2.1.4

___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp


[lng-odp] [PATCH] helper/test: add missing scripts to EXTRA_DIST

2016-05-23 Thread Anders Roxell
Signed-off-by: Anders Roxell 
---
 helper/test/Makefile.am | 1 +
 1 file changed, 1 insertion(+)

diff --git a/helper/test/Makefile.am b/helper/test/Makefile.am
index 8e65948..e9e8785 100644
--- a/helper/test/Makefile.am
+++ b/helper/test/Makefile.am
@@ -24,6 +24,7 @@ dist_bin_SCRIPTS =
 
 bin_PROGRAMS = $(EXECUTABLES) $(COMPILE_ONLY)
 
+EXTRA_DIST = odpthreads_as_processes odpthreads_as_pthreads
 
 dist_chksum_SOURCES = chksum.c
 dist_odpthreads_SOURCES = odpthreads.c
-- 
2.1.4

___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp


Re: [lng-odp] Fedora repo changes

2016-05-16 Thread Anders Roxell
On 11 May 2016 at 21:53, Matt Spencer  wrote:
> Hi Guys
>
> Thought I would use some down time to have a play with ODP.  On a vanilla
> Fedora 23 Server install, there is an issue with the current odp.repo in
> that the default behaviour of ‘def’ is to gpg check the downloads.  So,
> following the instructions on the site fails on ‘dnf update’ as it reads the
> odp repo data.
>
> Can I make two suggestions please?
>
> 1, add the following to odp.repo
> enabled=1
> gpgcheck=0

Thank you, will look into that.

>
> 2, change the instructions from using ‘yum update’ to ‘dnf update’
>
> Also, there is no indication on the site that the RPM’s are arrch64 only.
> Should we be providing x86 binaries too?

This is something that we are working on already.

Cheers,
Anders
___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp


Re: [lng-odp] lng-odp mailman settings

2016-05-16 Thread Anders Roxell
On 2016-05-16 08:27, Savolainen, Petri (Nokia - FI/Espoo) wrote:
> 
> 
> From: lng-odp [mailto:lng-odp-boun...@lists.linaro.org] On Behalf Of Bill 
> Fischofer
> Sent: Saturday, May 14, 2016 1:55 AM
> To: Brian Brooks 
> Cc: lng-odp 
> Subject: Re: [lng-odp] lng-odp mailman settings
> 
> 
> 
> On Friday, May 13, 2016, Brian Brooks 
> mailto:brian.bro...@linaro.org>> wrote:
> On 05/13 10:07:44, Bill Fischofer wrote:
> > I don't think we need to impose those sort of restrictions. I personally
> > use sylpheed for patches and GMail for everything else and they have no
> > problem sorting things out.
> >
> > The ODP mailing list covers both discussions as well as patches, and HTML
> > is useful for the former. The onus should be on those who have problems
> > with this to upgrade their tools rather than sending everyone else back to
> > the 1980s.
> >
> > On Fri, May 13, 2016 at 9:57 AM, Mike Holmes 
> > > wrote:
> >
> > > All,
> > >
> > > A topic that comes up occasionally that affects some mail tools like
> > > outlook is that html email on this list makes it harder for some folks to
> > > process patches.
> > >
> > > I use mutt specifically to avoid using a fancy email client for all my
> > > patch download/send work, it is powered by coal/steam and would work fine
> > > on a 1970 VAX but there you go.
> > >
> > > Anyway, does anyone object to having mailman reject HTML mail ? One up
> > > side is that I will not waste time blocking offers of cheap watches and 
> > > fax
> > > services from the list :)
> > >
> > > On the other hand I will miss bullet lists and the color red when I am
> > > grumpy.
> > >
> > > Mike
> 
> +1 for plain text
> 
> I think this topic is more about simplicity and best practices rather than
> anything else.
> 
> Here is an example of why HTML doesn't work well with archives:
> https://lists.linaro.org/pipermail/lng-odp/2016-May/023134.html
> That link displays perfectly fine for me.  What problem do you see?
> 
> Did you read it? It’s a mixture of paragraphs from two writers, without any 
> indication who is writing what. The list archive drops out HTML decoration 
> and at least in some cases will not convert (various blue or grey lines, or 
> indentations) into ‘>’.
> 
> As Brian highlights, it’s about simplicity. With one rule (no HTML) we can 
> uniform output of all mail clients and their fonts/indentations/other 
> settings, so that the list is clean and clear to read (both directly and from 
> the archives) and reply (no need to struggle with mismatching styles 
> inherited from the senders HTML settings, etc).
> 
> +1 for plain text

I agree with Brian and Petri.
There shouldn't be any other option than plain text!
That works for discussions as well. "You can mail all those funny mails
to your friends." =)

Just a reflection, since we talking about plain text vs. html... Is
there someone that can follow this thread easily? =)

We have another problem with this thread as well, people top-post,
which is insane! =)

Cheers,
Anders
___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp


[lng-odp] [PATCH] scripts/git_hash: match more digits

2016-05-02 Thread Anders Roxell
Make it possible to match more digits than groups of one.

Signed-off-by: Anders Roxell 
---
 scripts/git_hash.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/scripts/git_hash.sh b/scripts/git_hash.sh
index 6ba265e..336eb01 100755
--- a/scripts/git_hash.sh
+++ b/scripts/git_hash.sh
@@ -7,7 +7,8 @@ fi
 ROOTDIR=${1}
 
 if [ -d ${ROOTDIR}/.git ]; then
-   hash=$(git --git-dir=${ROOTDIR}/.git describe  --match 'v?\.?\.?\.?' | 
tr -d "\n")
+   hash=$(git --git-dir=${ROOTDIR}/.git describe --match 
'v[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*'\
+  | tr -d "\n")
if [[ $(git --git-dir=${ROOTDIR}/.git diff --shortstat 2> /dev/null \
| tail -n1) != "" ]]; then
dirty=.dirty
-- 
2.1.4

___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp


Re: [lng-odp] odp_api.h missing in ODP 1.9 package

2016-05-02 Thread Anders Roxell
On 2 May 2016 at 12:33, Oriol Arcas  wrote:
> Hello,
>
> I noticed that odp_api.h is missing in the new packages for ODP 1.9.
>
> In ODP 1.8:
>
> $> dpkg-deb -c
> libodp108-dev_1.8.0.0.git28.g4fc79fc-1.linarojessie.1_amd64.deb | grep
> odp_api.h
> -rw-r--r-- root/root  1458 2016-03-28 21:04 ./usr/include/odp_api.h
>
> While in ODP 1.9:
>
> $> dpkg-deb -c
> libodp-linux-dev_1.9.0.0.git11.ga555042-1linarojessie1_amd64.deb | grep
> odp_api.h
>
> Our application fails to build with the new package.

Thank you for reporting this issue.

> Am I including it
> wrong,

No.

> or the package is missing this file?

Yes

> Maybe after migrating the
> package building scripts outside the source tree something was broken?

It's been missing since a few snapshots back yes.
It should be fixed with [1] on amd64 that you are building on.

Cheers,
Anders
[1] 
http://deb.opendataplane.org/pool/main/o/opendataplane/libodp-linux-dev_1.9.0.0.git12.g04149e6-1linarojessie1_amd64.deb

>
> Best regards,
>
> --
> Oriol Arcas
> Software Engineer
> Starflow Networks
>
> ___
> lng-odp mailing list
> lng-odp@lists.linaro.org
> https://lists.linaro.org/mailman/listinfo/lng-odp
>
___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp


Re: [lng-odp] [ODP-CHECK PATCHv2] odp-linux: add dpdk pktio testing

2016-04-23 Thread Anders Roxell
On 2016-04-15 22:55, Maxim Uvarov wrote:
> Add dpdk pktio compilation and run under native make check.

Great, this should be a new variable, because apply-and-build.sh should
be able to verify patches on the odp-dpdk project as well, see
explanation below [1].

> Huge pages have to be mounted:
> echo 1000 >  /proc/sys/vm/nr_hugepages
> mount -t hugetlbfs nodev /mnt/huge
> also no other mount points for hugepages, in my case I need to do:
> umount /sys/fs/cgroup/hugetlb

Either fail with an error if hugetlb is mounted, or do the above
automatically.  This should be runnable from f.ex. Lava, or from a
user-system with hugetlb already mounted. 
If hugetlb is already mounted, error out, as stated before.
Recommended to be placed in a helper script of some kind that is only
run from scripts requiring Huge Pages.

> 
> make check should pass without dpdk hardware and loaded dpdk modules
> using pcap PMD.
> 
> Signed-off-by: Maxim Uvarov 
> ---
>  apply-and-build.sh  |  7 +++
>  helper/platform/generic | 16 +++-
>  2 files changed, 18 insertions(+), 5 deletions(-)
> 
> diff --git a/apply-and-build.sh b/apply-and-build.sh
> index 99f3d45..6168e29 100755
> --- a/apply-and-build.sh
> +++ b/apply-and-build.sh
> @@ -8,6 +8,7 @@ source ${ROOT_DIR}/helper/toolchain
>  source ${ROOT_DIR}/helper/openssl
>  source ${ROOT_DIR}/helper/cunit
>  
> +export PLATFORM=${PLATFORM:-linux-generic}
>  export GIT_BRANCH="${GIT_BRANCH:-master}"
>  export PATCH_DIR=${PATCH_DIR:-"$HOME/incoming"}
>  export CLEANUP="${CLEANUP:-1}"
> @@ -29,6 +30,7 @@ usage() {
>  tc_usage
>  cunit_usage
>  openssl_usage
> +echo -e "\tPLATFORM=linux-generic\t export platfrom to tested platform"

Not needed, already printed below.

>  echo -e "\tPATCH_DIR:\t where to look for patches, default: 
> $HOME/incoming"
>  echo -e "\tCLEANUP:\t set to 0 to save *.log files, default: ${CLEANUP}"
>  echo -e "\tCHECKPATCH:\t set to 0 to disable checkpatch test, default: 
> ${CHECKPATCH}"
> @@ -36,7 +38,7 @@ usage() {
>  echo -e "\tPLATFORM:\t set platform, default: ${PLATFORM}"
>  echo -e "\tDRYRUN:\t\t set to 1 to enable a dryrun, default: ${DRYRUN}"
>  echo -e "\tENABLE_NETMAP:\t set to 1 to enable netmap build, default: 
> ${ENABLE_NETMAP}"
> -echo -e "\tENABLE_DPDK:\t set to 1 to enable DPDK build, default: 0"
> +echo -e "\tENABLE_DPDK:\t set to 1 to enable dpdk build, default: 
> ${ENABLE_DPDK}"

Why change this?
Default changes in when environment variables changes.

We should change this to maybe DEFAULT_VARIABLE=0 so we only specify
them once (f.ex., DEFAULT_ENABLE_DPDK=0).

Help text for ENABLE_DPDK should be added to generic_usage (in
helper/platform/generic) instead of here.

>  echo -e "\tNUM_CPUS:\t add parallel make, default: _NPROCESSORS_ONLN"
>  echo -e "\tFILE_EXT:\t supported extensions in patch file names, 
> default: ${FILE_EXT}"
>  echo -e "\tM32_ON_64:\t enable 32 bit builds on a 64 bit host, default: 
> 0"
> @@ -54,9 +56,6 @@ if [[ ${M32_ON_64} -eq 1 ]]; then
>  CUNIT_BUILD=1
>  fi
>  
> -PLATFORM=${PLATFORM:-linux-generic}
> -[[ ${ENABLE_DPDK} -eq 1 ]] && PLATFORM="linux-dpdk"
> -

[1] this invalidates checking of the odp-dpdk project.
This should only be set when you want to build the entire odp-dpdk
project, but not when you build linux-generic with dpdk-pktio.

>  display_os
>  
>  prepare_platform
> diff --git a/helper/platform/generic b/helper/platform/generic
> index 49ddd65..560e694 100644
> --- a/helper/platform/generic
> +++ b/helper/platform/generic
> @@ -1,6 +1,9 @@
>  [ -n "$GENERIC_PLATFORM_HELPER" ] && return || readonly 
> GENERIC_PLATFORM_HELPER=1
>  
>  export NETMAP_SRCDIR=${ROOT_DIR}/netmap
> +if [[ ${ENABLE_DPDK} -eq 1 ]]; then

This should be ENABLE_DPDK_PKTIO or something similar right?
Similar for all the places where you typed ENABLE_DPDK.

> + . helper/platform/dpdk

Never use relative paths, and use source instead of "." please.


Cheers,
Anders
___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp


Re: [lng-odp] [API-NEXT PATCHv5] api: make only the API visible

2016-04-18 Thread Anders Roxell
On 18 April 2016 at 18:47, Bill Fischofer  wrote:
> From: Anders Roxell 
>
> Internal functions should not be part of symbols that are visible
> outside the library. Using -fvisibility=hidden hides all internal
> functions from the public ABI.
>
> Suggested-by: Ricardo Salveti 
> Signed-off-by: Anders Roxell 
> Signed-off-by: Bill Fischofer 
> ---
>  include/odp/api/spec/align.h   |  2 ++
>  include/odp/api/spec/atomic.h  |  2 ++
>  include/odp/api/spec/barrier.h |  2 ++
>  include/odp/api/spec/buffer.h  |  3 ++-
>  include/odp/api/spec/byteorder.h   |  2 ++
>  include/odp/api/spec/classification.h  |  3 ++-
>  include/odp/api/spec/compiler.h|  2 ++
>  include/odp/api/spec/config.h  |  2 ++
>  include/odp/api/spec/cpu.h |  2 ++
>  include/odp/api/spec/cpumask.h |  2 ++
>  include/odp/api/spec/crypto.h  |  2 ++
>  include/odp/api/spec/debug.h   |  3 ++-
>  include/odp/api/spec/errno.h   |  2 ++
>  include/odp/api/spec/event.h   |  3 ++-
>  include/odp/api/spec/hash.h|  2 ++
>  include/odp/api/spec/hints.h   |  2 ++
>  include/odp/api/spec/init.h|  4 ++--
>  include/odp/api/spec/packet.h  |  2 ++
>  include/odp/api/spec/packet_flags.h|  2 ++
>  include/odp/api/spec/packet_io.h   |  2 ++
>  include/odp/api/spec/packet_io_stats.h |  2 ++
>  include/odp/api/spec/pool.h|  4 ++--
>  include/odp/api/spec/queue.h   |  2 ++
>  include/odp/api/spec/random.h  |  3 ++-
>  include/odp/api/spec/rwlock.h  |  2 ++
>  include/odp/api/spec/rwlock_recursive.h|  2 ++
>  include/odp/api/spec/schedule.h|  3 ++-
>  include/odp/api/spec/schedule_types.h  |  2 ++
>  include/odp/api/spec/shared_memory.h   |  3 ++-
>  include/odp/api/spec/spinlock.h|  2 ++
>  include/odp/api/spec/spinlock_recursive.h  |  2 ++
>  include/odp/api/spec/std_clib.h|  2 ++
>  include/odp/api/spec/std_types.h   |  3 ++-
>  include/odp/api/spec/sync.h|  2 ++
>  include/odp/api/spec/system_info.h |  3 ++-
>  include/odp/api/spec/thread.h  |  2 ++
>  include/odp/api/spec/thrmask.h |  2 ++
>  include/odp/api/spec/ticketlock.h  |  2 ++
>  include/odp/api/spec/time.h|  3 ++-
>  include/odp/api/spec/timer.h   |  2 ++
>  include/odp/api/spec/traffic_mngr.h|  2 ++
>  include/odp/api/spec/version.h |  2 ++
>  platform/Makefile.inc  |  1 +
>  platform/linux-generic/include/odp/api/abi_begin.h |  3 +++
>  platform/linux-generic/include/odp/api/abi_end.h   |  3 +++
>  platform/linux-generic/m4/configure.m4 | 12 
>  46 files changed, 103 insertions(+), 14 deletions(-)
>  create mode 100644 platform/linux-generic/include/odp/api/abi_begin.h
>  create mode 100644 platform/linux-generic/include/odp/api/abi_end.h
>

Looks good, except that I think you missed this:

diff --git a/platform/linux-generic/Makefile.am
b/platform/linux-generic/Makefile.am
index 5eb8cbc..bc5573d 100644
--- a/platform/linux-generic/Makefile.am
+++ b/platform/linux-generic/Makefile.am
@@ -16,6 +16,8 @@ include_HEADERS = \
 odpapiincludedir= $(includedir)/odp/api
 odpapiinclude_HEADERS = \
  $(srcdir)/include/odp/api/align.h \
+ $(srcdir)/include/odp/api/abi_begin.h \
+ $(srcdir)/include/odp/api/abi_end.h \
  $(srcdir)/include/odp/api/atomic.h \
  $(srcdir)/include/odp/api/barrier.h \
  $(srcdir)/include/odp/api/buffer.h \


make distcheck finds this wee problem:
make[1]: Entering directory
'/media/data/src/odp/crap/opendataplane-1.8.0.1.git574.g91c3d48.dirty/_build'
Making all in platform/linux-generic
make[2]: Entering directory
'/media/data/src/odp/crap/opendataplane-1.8.0.1.git574.g91c3d48.dirty/_build/platform/linux-generic'
  CC   odp_atomic.lo
In file included from
../../../platform/linux-generic/include/odp/api/align.h:54:0,
 from
../../../platform/linux-generic/include/odp/api/atomic.h:20,
 from ../../../platform/linux-generic/odp_atomic.c:7:
../../../include/odp/api/spec/align.h:16:31: fatal error:
odp/api/abi_begin.h: No such file or directory

[lng-odp] [API-NEXT PATCHv5] api: make only the API visible

2016-04-18 Thread Anders Roxell
Internal functions should not be part of symbols that are visible
outside the library. Using -fvisibility=hidden hides all internal
functions from the public ABI.

Suggested-by: Ricardo Salveti 
Signed-off-by: Anders Roxell 
---
 platform/Makefile.inc   |  1 +
 platform/linux-generic/include/odp/api/align.h  |  6 ++
 platform/linux-generic/include/odp/api/atomic.h |  6 ++
 platform/linux-generic/include/odp/api/barrier.h|  6 ++
 platform/linux-generic/include/odp/api/buffer.h |  6 ++
 platform/linux-generic/include/odp/api/byteorder.h  |  6 ++
 platform/linux-generic/include/odp/api/classification.h |  6 ++
 platform/linux-generic/include/odp/api/compiler.h   |  6 ++
 platform/linux-generic/include/odp/api/config.h |  6 ++
 platform/linux-generic/include/odp/api/cpu.h|  6 ++
 platform/linux-generic/include/odp/api/cpumask.h|  6 ++
 platform/linux-generic/include/odp/api/crypto.h |  6 ++
 platform/linux-generic/include/odp/api/debug.h  |  6 ++
 platform/linux-generic/include/odp/api/errno.h  |  6 ++
 platform/linux-generic/include/odp/api/event.h  |  6 ++
 platform/linux-generic/include/odp/api/hash.h   |  6 ++
 platform/linux-generic/include/odp/api/hints.h  |  6 ++
 platform/linux-generic/include/odp/api/init.h   |  6 ++
 platform/linux-generic/include/odp/api/packet.h |  6 ++
 platform/linux-generic/include/odp/api/packet_flags.h   |  6 ++
 platform/linux-generic/include/odp/api/packet_io.h  |  6 ++
 platform/linux-generic/include/odp/api/packet_io_stats.h|  6 ++
 platform/linux-generic/include/odp/api/pool.h   |  6 ++
 platform/linux-generic/include/odp/api/queue.h  |  6 ++
 platform/linux-generic/include/odp/api/random.h |  6 ++
 platform/linux-generic/include/odp/api/rwlock.h |  6 ++
 platform/linux-generic/include/odp/api/rwlock_recursive.h   |  6 ++
 platform/linux-generic/include/odp/api/schedule.h   |  6 ++
 platform/linux-generic/include/odp/api/schedule_types.h |  6 ++
 platform/linux-generic/include/odp/api/shared_memory.h  |  6 ++
 platform/linux-generic/include/odp/api/spinlock.h   |  6 ++
 platform/linux-generic/include/odp/api/spinlock_recursive.h |  6 ++
 platform/linux-generic/include/odp/api/std_clib.h   |  6 ++
 platform/linux-generic/include/odp/api/std_types.h  |  6 ++
 platform/linux-generic/include/odp/api/sync.h   |  6 ++
 platform/linux-generic/include/odp/api/system_info.h|  6 ++
 platform/linux-generic/include/odp/api/thread.h |  6 ++
 platform/linux-generic/include/odp/api/thrmask.h|  6 ++
 platform/linux-generic/include/odp/api/ticketlock.h |  6 ++
 platform/linux-generic/include/odp/api/time.h   |  6 ++
 platform/linux-generic/include/odp/api/timer.h  |  6 ++
 platform/linux-generic/include/odp/api/traffic_mngr.h   |  6 ++
 platform/linux-generic/include/odp/api/version.h|  6 ++
 platform/linux-generic/m4/configure.m4  | 12 
 44 files changed, 265 insertions(+)

diff --git a/platform/Makefile.inc b/platform/Makefile.inc
index 1cb7a71..5aa3fed 100644
--- a/platform/Makefile.inc
+++ b/platform/Makefile.inc
@@ -15,6 +15,7 @@ AM_LDFLAGS += -version-number '$(ODP_LIBSO_VERSION)'
 GIT_DESC = `$(top_srcdir)/scripts/get_impl_str.sh $(top_srcdir)`
 AM_CFLAGS += "-DGIT_HASH=$(GIT_DESC)"
 AM_CFLAGS += -DPLATFORM=${with_platform}
+AM_CFLAGS += $(VISIBILITY_CFLAGS)
 
 #The implementation will need to retain the deprecated implementation
 AM_CFLAGS += -Wno-deprecated-declarations
diff --git a/platform/linux-generic/include/odp/api/align.h 
b/platform/linux-generic/include/odp/api/align.h
index d8bc653..ef8fa0d 100644
--- a/platform/linux-generic/include/odp/api/align.h
+++ b/platform/linux-generic/include/odp/api/align.h
@@ -51,7 +51,13 @@ extern "C" {
  * @}
  */
 
+#if __GNUC__ >= 4
+#pragma GCC visibility push(default)
+#endif
 #include 
+#if __GNUC__ >= 4
+#pragma GCC visibility pop
+#endif
 #include 
 
 #ifdef __cplusplus
diff --git a/platform/linux-generic/include/odp/api/atomic.h 
b/platform/linux-generic/include/odp/api/atomic.h
index b487383..8fb34c4 100644
--- a/platform/linux-generic/include/odp/api/atomic.h
+++ b/platform/linux-generic/include/odp/api/atomic.h
@@ -411,7 +411,13 @@ static inline int 
odp_atomic_cas_acq_rel_u64(odp_atomic_u64_t *atom,
  * @}
  */
 
+#if __GNUC__ >= 4
+#pragma GCC visibility push(default)
+#endif
 #include 
+#if __GNUC__ >= 4
+#pragma GCC visibility pop
+#endif
 
 #ifdef __cplusp

Re: [lng-odp] [API-NEXT PATCHv4] api: make only the API visible

2016-04-15 Thread Anders Roxell
On 15 April 2016 at 13:02, Savolainen, Petri (Nokia - FI/Espoo)
 wrote:
> Agree, that it gets ugly (for interface specification readability), if GCC
> pragmas are added into spec header files. Wouldn’t it work the same way if
> the pragmas are defined where the spec file is included. Namely e.g. here
> for the barrier:

I guess it would work, haven't tried. That means that all the implementations
have to add this into their files.
If we what we have in this patch implementations gets it for "free".

Cheers,
Anders

>
>
>
>
>
> #ifndef ODP_PLAT_BARRIER_H_
>
> #define ODP_PLAT_BARRIER_H_
>
>
>
> #ifdef __cplusplus
>
> extern "C" {
>
> #endif
>
>
>
> #include 
>
> #include 
>
> #include 
>
> #include 
>
>
>
> if __GNUC__ >= 4
> #pragma GCC visibility push(default)
> #endif
>
>
>
> #include 
>
>
>
> if __GNUC__ >= 4
> #pragma GCC visibility pop
> #endif
>
>
>
>
>
> #ifdef __cplusplus
>
> }
>
> #endif
>
>
>
> #endif
>
>
>
>
>
> -Petri
>
>
>
>
>
> From: lng-odp [mailto:lng-odp-boun...@lists.linaro.org] On Behalf Of EXT
> Mike Holmes
> Sent: Friday, April 15, 2016 1:44 PM
> To: Maxim Uvarov 
> Cc: lng-odp 
> Subject: Re: [lng-odp] [API-NEXT PATCHv4] api: make only the API visible
>
>
>
> Maxim it needs to be in the spec, it is the spec that defines the ABI, if
> you dont do this then everyone implementing will have to manually mark
> hundreds of other apis as internal rather than we just export the correct
> list.
>
>
>
> At least that is my understanding at least.
>
>
>
>
>
>
>
> On 15 April 2016 at 06:38, Maxim Uvarov  wrote:
>
> Petri, please review this patch. For me it's not clear why it touches
> include/odp/api/spec files at all.
>
> Maxim.
>
> On 04/13/16 22:06, Bill Fischofer wrote:
>
> Ok, thanks.  With that:
>
> Reviewed-by: Bill Fischofer  <mailto:bill.fischo...@linaro.org>>
>
> On Wed, Apr 13, 2016 at 2:04 PM, Ricardo Salveti  <mailto:ricardo.salv...@linaro.org>> wrote:
>
> On Wed, Apr 13, 2016 at 3:51 PM, Bill Fischofer
> mailto:bill.fischo...@linaro.org>> wrote:
> > On Wed, Apr 13, 2016 at 1:47 PM, Ricardo Salveti
> > mailto:ricardo.salv...@linaro.org>>
> wrote:
> >>
> >> On Wed, Apr 13, 2016 at 2:47 PM, Bill Fischofer
> >> mailto:bill.fischo...@linaro.org>>
> wrote:
> >> >
> >> > On Wed, Apr 13, 2016 at 12:30 PM, Anders Roxell
> >> > mailto:anders.rox...@linaro.org>>
> >> > wrote:
> >> >>
> >> >> Internal functions should not be part of symbols that are
> visible
> >> >> outside the library. Using -fvisibility=hidden hides all
> internal
> >> >> functions from the public ABI.
> >> >>
> >> >> Suggested-by: Ricardo Salveti  <mailto:ricardo.salv...@linaro.org>>
> >> >> Signed-off-by: Anders Roxell  <mailto:anders.rox...@linaro.org>>
>
>
> >> >> ---
> >> >>  include/odp/api/spec/align.h |  8 
> >> >>  include/odp/api/spec/atomic.h  |  8 
> >> >>  include/odp/api/spec/barrier.h |  8 
> >> >>  include/odp/api/spec/buffer.h  |  8 
> >> >>  include/odp/api/spec/byteorder.h |  8 
> >> >> include/odp/api/spec/classification.h |  8 
> >> >>  include/odp/api/spec/compiler.h  |  8 
> >> >>  include/odp/api/spec/config.h  |  8 
> >> >>  include/odp/api/spec/cpu.h |  8 
> >> >>  include/odp/api/spec/cpumask.h |  8 
> >> >>  include/odp/api/spec/crypto.h  |  8 
> >> >>  include/odp/api/spec/debug.h |  8 
> >> >>  include/odp/api/spec/errno.h |  8 
> >> >>  include/odp/api/spec/event.h |  8 
> >> >>  include/odp/api/spec/hash.h  |  8 
> >> >>  include/odp/api/spec/hints.h |  8 
> >> >>  include/odp/api/spec/init.h  |  8 
> >> >>  include/odp/api/spec/packet.h  |  8 
> >> >>  include/odp/api/spec/packet_flags.h  |  8 
> >> >>  include/odp/api/spec/packet_io.h |  8

[lng-odp] [PATCH] pkg: remove packaging in ODP

2016-04-14 Thread Anders Roxell
Move the packaging scripts to its own git [1] repository.

[1] http://git.linaro.org/lng/odp-packaging.git

Signed-off-by: Anders Roxell 
---
 pkg/debian/README.Debian  |  12 -
 pkg/debian/changelog  | 566 --
 pkg/debian/compat |   1 -
 pkg/debian/control|  70 
 pkg/debian/copyright  |  31 --
 pkg/debian/docs   |   1 -
 pkg/debian/libodp-linux-dev.dirs  |   2 -
 pkg/debian/libodp-linux-dev.install   |   5 -
 pkg/debian/libodp-linux.dirs  |   1 -
 pkg/debian/libodp-linux.install   |   1 -
 pkg/debian/libodphelper-linux-dev.dirs|   2 -
 pkg/debian/libodphelper-linux-dev.install |   4 -
 pkg/debian/libodphelper-linux.dirs|   1 -
 pkg/debian/libodphelper-linux.install |   1 -
 pkg/debian/odp-linux-bin.dirs |   1 -
 pkg/debian/odp-linux-bin.install  |   1 -
 pkg/debian/rules  |  30 --
 pkg/debian/source/format  |   1 -
 pkg/rpm/odp.spec  |  80 -
 scripts/builddeb  |  38 --
 scripts/buildrpm  |  30 --
 scripts/common_pkg_build.sh   |  39 --
 22 files changed, 918 deletions(-)
 delete mode 100644 pkg/debian/README.Debian
 delete mode 100644 pkg/debian/changelog
 delete mode 100644 pkg/debian/compat
 delete mode 100644 pkg/debian/control
 delete mode 100644 pkg/debian/copyright
 delete mode 100644 pkg/debian/docs
 delete mode 100644 pkg/debian/libodp-linux-dev.dirs
 delete mode 100644 pkg/debian/libodp-linux-dev.install
 delete mode 100644 pkg/debian/libodp-linux.dirs
 delete mode 100644 pkg/debian/libodp-linux.install
 delete mode 100644 pkg/debian/libodphelper-linux-dev.dirs
 delete mode 100644 pkg/debian/libodphelper-linux-dev.install
 delete mode 100644 pkg/debian/libodphelper-linux.dirs
 delete mode 100644 pkg/debian/libodphelper-linux.install
 delete mode 100644 pkg/debian/odp-linux-bin.dirs
 delete mode 100644 pkg/debian/odp-linux-bin.install
 delete mode 100755 pkg/debian/rules
 delete mode 100644 pkg/debian/source/format
 delete mode 100644 pkg/rpm/odp.spec
 delete mode 100755 scripts/builddeb
 delete mode 100755 scripts/buildrpm
 delete mode 100644 scripts/common_pkg_build.sh

diff --git a/pkg/debian/README.Debian b/pkg/debian/README.Debian
deleted file mode 100644
index b8e47e4..000
--- a/pkg/debian/README.Debian
+++ /dev/null
@@ -1,12 +0,0 @@
-opendataplane for Debian
-
-
-For up to date information please visit http://www.opendataplane.org
-The OpenDataPlane (ODP) project has been established to produce an open-source,
-cross-platform set of application programming interfaces (APIs) for the
-networking data plane.
-
-It provides a library such as openvswitch with a portable API that facilitates
-platform independence and access to hardware acceleration.
-
- -- Anders Roxell   Mon, 22 Dec 2014 19:07:06 +0100
diff --git a/pkg/debian/changelog b/pkg/debian/changelog
deleted file mode 100644
index 4d8d9a8..000
--- a/pkg/debian/changelog
+++ /dev/null
@@ -1,566 +0,0 @@
-opendataplane (1.8.0.0-1) unstable; urgency=low
-   * ODP release v1.8
-
- -- Maxim Uvarov   Fri, 04 Mar 2016 13:32:05 +0300
-
-opendataplane (1.7.0.0-1) unstable; urgency=low
-   * ODP release v1.7
-
- -- Maxim Uvarov   Fri, 05 Feb 2016 13:05:00 +0300
-
-opendataplane (1.6.0.0-1) unstable; urgency=low
-   * ODP release v1.6
-
- -- Maxim Uvarov   Mon, 28 Dec 2015 17:01:58 +0300
-
-opendataplane (1.5.0.0-1) unstable; urgency=low
-   * ODP release v1.5
-
- -- Maxim Uvarov   Mon, 30 Nov 2015 13:08:43 +0300
-
-opendataplane (1.4.1.0-1) unstable; urgency=low
-   * Validation
-   - pktio: test transmit error recovery
-   - schedule: add chaos test
-   - check return code from odp_queue_lock_count()
-   - scheduler: test ordered queue reorder processing
-   - pktio: initialize queue parameters correctly
-   - pktio: test for transmit error handling
-   - pktio: add support for direct receive
-   - pktio: pass interface index rather than name
-   - pktio: fix start_stop test
-   - test: l2fwd: separate rx and tx drop counters
-   - test: l2fwd: increase burst size
-   - test: l2fwd: optimize statistics usage
-   - test: l2fwd: optimize queue mode
-   - test: l2fwd: start pktios after worker thread create
-   - test: l2fwd: added option to disable error check
-   - example/ipsec: Increase ip_data_len for Tunnel mode
-   - example: ipsec: check push_tail return code
-   * General:
-   - linux-generic: pktio: handle transmit errors correctly
-   - pktio socket_mmap: recover from transmit errors but 1890
-   - pktio: increase MTU of loop interface
-   - ordered queues: fix race condition during order release
- and out of order.
-   - configure: move HAVE_PCAP AM_CONDITIONAL to

[lng-odp] [PATCH] linux-generic: add arch specific *.h files to EXTRA_DIST

2016-04-13 Thread Anders Roxell
To make the build from a tarball work again from an architecture that
you didn't create the tarball from.

Signed-off-by: Anders Roxell 
---
 platform/linux-generic/Makefile.am | 4 
 1 file changed, 4 insertions(+)

diff --git a/platform/linux-generic/Makefile.am 
b/platform/linux-generic/Makefile.am
index 54f35d6..7b93f19 100644
--- a/platform/linux-generic/Makefile.am
+++ b/platform/linux-generic/Makefile.am
@@ -170,12 +170,16 @@ __LIB__libodp_linux_la_SOURCES = \
   arch/@ARCH@/odp_sysinfo_parse.c
 
 EXTRA_DIST = \
+arch/linux/odp/api/cpu_arch.h \
 arch/linux/odp_cpu_arch.c \
 arch/linux/odp_sysinfo_parse.c \
+arch/mips64/odp/api/cpu_arch.h \
 arch/mips64/odp_cpu_arch.c \
 arch/mips64/odp_sysinfo_parse.c \
+arch/powerpc/odp/api/cpu_arch.h \
 arch/powerpc/odp_cpu_arch.c \
 arch/powerpc/odp_sysinfo_parse.c \
+arch/x86/odp/api/cpu_arch.h \
 arch/x86/odp_cpu_arch.c \
 arch/x86/odp_sysinfo_parse.c
 
-- 
2.1.4

___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp


[lng-odp] [API-NEXT PATCHv4] api: make only the API visible

2016-04-13 Thread Anders Roxell
Internal functions should not be part of symbols that are visible
outside the library. Using -fvisibility=hidden hides all internal
functions from the public ABI.

Suggested-by: Ricardo Salveti 
Signed-off-by: Anders Roxell 
---
 include/odp/api/spec/align.h  |  8 
 include/odp/api/spec/atomic.h |  8 
 include/odp/api/spec/barrier.h|  8 
 include/odp/api/spec/buffer.h |  8 
 include/odp/api/spec/byteorder.h  |  8 
 include/odp/api/spec/classification.h |  8 
 include/odp/api/spec/compiler.h   |  8 
 include/odp/api/spec/config.h |  8 
 include/odp/api/spec/cpu.h|  8 
 include/odp/api/spec/cpumask.h|  8 
 include/odp/api/spec/crypto.h |  8 
 include/odp/api/spec/debug.h  |  8 
 include/odp/api/spec/errno.h  |  8 
 include/odp/api/spec/event.h  |  8 
 include/odp/api/spec/hash.h   |  8 
 include/odp/api/spec/hints.h  |  8 
 include/odp/api/spec/init.h   |  8 
 include/odp/api/spec/packet.h |  8 
 include/odp/api/spec/packet_flags.h   |  8 
 include/odp/api/spec/packet_io.h  |  8 
 include/odp/api/spec/packet_io_stats.h|  8 
 include/odp/api/spec/pool.h   |  8 
 include/odp/api/spec/queue.h  |  8 
 include/odp/api/spec/random.h |  8 
 include/odp/api/spec/rwlock.h |  8 
 include/odp/api/spec/rwlock_recursive.h   |  8 
 include/odp/api/spec/schedule.h   |  8 
 include/odp/api/spec/schedule_types.h |  8 
 include/odp/api/spec/shared_memory.h  |  8 
 include/odp/api/spec/spinlock.h   |  8 
 include/odp/api/spec/spinlock_recursive.h |  8 
 include/odp/api/spec/std_clib.h   |  8 
 include/odp/api/spec/std_types.h  |  8 
 include/odp/api/spec/sync.h   |  8 
 include/odp/api/spec/system_info.h|  8 
 include/odp/api/spec/thread.h |  8 
 include/odp/api/spec/thrmask.h|  8 
 include/odp/api/spec/ticketlock.h |  8 
 include/odp/api/spec/time.h   |  8 
 include/odp/api/spec/timer.h  |  8 
 include/odp/api/spec/traffic_mngr.h   |  8 
 include/odp/api/spec/version.h|  8 
 platform/Makefile.inc |  1 +
 platform/linux-generic/m4/configure.m4| 12 
 44 files changed, 349 insertions(+)

diff --git a/include/odp/api/spec/align.h b/include/odp/api/spec/align.h
index 677ff12..027b080 100644
--- a/include/odp/api/spec/align.h
+++ b/include/odp/api/spec/align.h
@@ -18,6 +18,10 @@
 extern "C" {
 #endif
 
+#if __GNUC__ >= 4
+#pragma GCC visibility push(default)
+#endif
+
 /** @addtogroup odp_compiler_optim
  *  Macros that allow cache line size configuration, check that
  *  alignment is a power of two etc.
@@ -70,6 +74,10 @@ extern "C" {
  * @}
  */
 
+#if __GNUC__ >= 4
+#pragma GCC visibility pop
+#endif
+
 #ifdef __cplusplus
 }
 #endif
diff --git a/include/odp/api/spec/atomic.h b/include/odp/api/spec/atomic.h
index a16d90b..b926964 100644
--- a/include/odp/api/spec/atomic.h
+++ b/include/odp/api/spec/atomic.h
@@ -18,6 +18,10 @@
 extern "C" {
 #endif
 
+#if __GNUC__ >= 4
+#pragma GCC visibility push(default)
+#endif
+
 /**
  * @defgroup odp_atomic ODP ATOMIC
  * @details
@@ -624,6 +628,10 @@ int odp_atomic_lock_free_u64(odp_atomic_op_t *atomic_op);
  * @}
  */
 
+#if __GNUC__ >= 4
+#pragma GCC visibility pop
+#endif
+
 #ifdef __cplusplus
 }
 #endif
diff --git a/include/odp/api/spec/barrier.h b/include/odp/api/spec/barrier.h
index 823eae6..34c3658 100644
--- a/include/odp/api/spec/barrier.h
+++ b/include/odp/api/spec/barrier.h
@@ -18,6 +18,10 @@
 extern "C" {
 #endif
 
+#if __GNUC__ >= 4
+#pragma GCC visibility push(default)
+#endif
+
 /**
  * @defgroup odp_barrier ODP BARRIER
  * Thread excution and memory ordering barriers.
@@ -59,6 +63,10 @@ void odp_barrier_wait(odp_barrier_t *barr);
  * @}
  */
 
+#if __GNUC__ >= 4
+#pragma GCC visibility pop
+#endif
+
 #ifdef __cplusplus
 }
 #endif
diff --git a/include/odp/api/spec/buffer.h b/include/odp/api/spec/buffer.h
index 6631f47..caa2cb6 100644
--- a/include/odp/api/spec/buffer.h
+++ b/include/odp/api/spec/buffer.h
@@ -19,6 +19,10 @@ extern "C" {
 #endif
 
 
+#if __GNUC__ >= 4
+#pragma GCC visibility push(default)
+#endif
+
 /** @defgroup odp_buffer ODP BUFFER
  *  Operations on a buffer.
  *  @{
@@ -163,6 +167,10 @@ uint64_t odp_buffer_to_u64(odp_buffer_t hdl);
  * @}
  */
 
+#if __GNUC__ >= 4
+#pragma GCC visibility pop
+#endif
+
 #ifdef __cplusplus
 }
 #

[lng-odp] [PATCHv3 3/3] linux-generic: use hidden on internal functions

2016-04-12 Thread Anders Roxell
Internal functions should not be visible in the ABI.

Signed-off-by: Anders Roxell 
---
 .../linux-generic/include/odp_buffer_internal.h|  7 +-
 .../include/odp_classification_internal.h  | 42 ++--
 platform/linux-generic/include/odp_internal.h  | 12 ++--
 .../include/odp_name_table_internal.h  | 23 +++
 .../linux-generic/include/odp_packet_internal.h| 27 
 .../linux-generic/include/odp_packet_io_internal.h | 61 +-
 .../linux-generic/include/odp_packet_io_queue.h| 25 
 platform/linux-generic/include/odp_packet_socket.h | 29 +
 .../linux-generic/include/odp_pkt_queue_internal.h | 24 +++
 platform/linux-generic/include/odp_pool_internal.h |  3 +-
 .../linux-generic/include/odp_queue_internal.h | 75 --
 .../linux-generic/include/odp_schedule_internal.h  | 12 ++--
 .../include/odp_sorted_list_internal.h | 42 ++--
 .../include/odp_timer_wheel_internal.h | 29 +
 platform/linux-generic/odp_packet_io.c |  2 +-
 platform/linux-generic/odp_schedule.c  |  5 +-
 platform/linux-generic/pktio/socket.c  |  5 +-
 17 files changed, 228 insertions(+), 195 deletions(-)

diff --git a/platform/linux-generic/include/odp_buffer_internal.h 
b/platform/linux-generic/include/odp_buffer_internal.h
index 7a06b00..fd6c1da 100644
--- a/platform/linux-generic/include/odp_buffer_internal.h
+++ b/platform/linux-generic/include/odp_buffer_internal.h
@@ -30,6 +30,7 @@ extern "C" {
 #include 
 #include 
 #include 
+#include 
 
 #define ODP_BITSIZE(x) \
((x) <= 2 ?  1 : \
@@ -164,9 +165,9 @@ typedef struct {
 #define ODP_FREEBUF -1
 
 /* Forward declarations */
-odp_buffer_t buffer_alloc(odp_pool_t pool, size_t size);
-int buffer_alloc_multi(odp_pool_t pool_hdl, size_t size,
-  odp_buffer_t buf[], int num);
+odp_buffer_t HIDDEN buffer_alloc(odp_pool_t pool, size_t size);
+int HIDDEN buffer_alloc_multi(odp_pool_t pool_hdl, size_t size,
+ odp_buffer_t buf[], int num);
 
 #ifdef __cplusplus
 }
diff --git a/platform/linux-generic/include/odp_classification_internal.h 
b/platform/linux-generic/include/odp_classification_internal.h
index 86b40fc..c69a8f8 100644
--- a/platform/linux-generic/include/odp_classification_internal.h
+++ b/platform/linux-generic/include/odp_classification_internal.h
@@ -25,6 +25,7 @@ extern "C" {
 #include 
 #include 
 #include 
+#include 
 
 /** Classification Internal function **/
 
@@ -40,8 +41,8 @@ with the PKTIO interface.
 Returns the default cos if the packet does not match any PMR
 Returns the error_cos if the packet has an error
 **/
-cos_t *pktio_select_cos(pktio_entry_t *pktio, const uint8_t *pkt_addr,
-   odp_packet_hdr_t *pkt_hdr);
+cos_t HIDDEN *pktio_select_cos(pktio_entry_t *pktio, const uint8_t *pkt_addr,
+  odp_packet_hdr_t *pkt_hdr);
 
 /**
 @internal
@@ -51,8 +52,8 @@ Select a CoS for the given Packet based on QoS values
 This function returns the COS object matching the L2 and L3 QoS
 based on the l3_preference value of the pktio
 **/
-cos_t *match_qos_cos(pktio_entry_t *entry, const uint8_t *pkt_addr,
-odp_packet_hdr_t *hdr);
+cos_t HIDDEN *match_qos_cos(pktio_entry_t *entry, const uint8_t *pkt_addr,
+   odp_packet_hdr_t *hdr);
 /**
 Packet Classifier
 
@@ -61,14 +62,14 @@ This function calls Classifier module internal functions 
for a given packet and
 enqueues the packet to specific Queue based on PMR and CoS selected.
 The packet is allocated from the pool associated with the CoS
 **/
-int packet_classifier(odp_pktio_t pktio, odp_packet_t pkt);
+int HIDDEN packet_classifier(odp_pktio_t pktio, odp_packet_t pkt);
 
 /**
 @internal
 
 Same as packet classifier uses linux-generic internal pktio struct
 **/
-int _odp_packet_classifier(pktio_entry_t *entry, odp_packet_t pkt);
+int HIDDEN _odp_packet_classifier(pktio_entry_t *entry, odp_packet_t pkt);
 
 /**
 Packet IO classifier init
@@ -76,7 +77,7 @@ Packet IO classifier init
 This function does initialization of classifier object associated with pktio.
 This function should be called during pktio initialization.
 **/
-int pktio_classifier_init(pktio_entry_t *pktio);
+int HIDDEN pktio_classifier_init(pktio_entry_t *pktio);
 
 /**
 @internal
@@ -87,16 +88,16 @@ This function gets called recursively to check the chained 
PMR Term value
 with the packet.
 
 **/
-cos_t *match_pmr_cos(cos_t *cos, const uint8_t *pkt_addr, pmr_t *pmr,
-odp_packet_hdr_t *hdr);
+cos_t HIDDEN *match_pmr_cos(cos_t *cos, const uint8_t *pkt_addr, pmr_t *pmr,
+   odp_packet_hdr_t *hdr);
 /**
 @internal
 CoS associated with L3 QoS value
 
 This function returns the CoS associated with L3 QoS value
 **/
-cos_t *match_qos_l3_cos(pmr_l3_cos_t *l3_cos, 

[lng-odp] [PATCHv3 2/3] linux-generic/include/odp_internal: add hidden attribute

2016-04-12 Thread Anders Roxell
The hidden attribute allows functions to be hidden from the public ABI.
Internal functions should not be part of symbols that are visible
outside the library.

Suggested-by: Ricardo Salveti 
Signed-off-by: Anders Roxell 
---
 platform/linux-generic/include/odp_internal.h | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/platform/linux-generic/include/odp_internal.h 
b/platform/linux-generic/include/odp_internal.h
index e33a49e..08624ae 100644
--- a/platform/linux-generic/include/odp_internal.h
+++ b/platform/linux-generic/include/odp_internal.h
@@ -22,6 +22,12 @@ extern "C" {
 #include 
 #include 
 
+#if defined(__GNUC__)
+#  define HIDDEN  __attribute__((visibility("hidden")))
+#else
+#  define HIDDEN
+#endif
+
 extern __thread int __odp_errno;
 
 #define MAX_CPU_NUMBER 128
-- 
2.1.4

___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp


[lng-odp] [PATCHv3 1/3] linux-generic: odp_schedule: drop prefix odp on internal functions

2016-04-12 Thread Anders Roxell
Internal functions shouldn't have use the prefix odp only the public
API.

Signed-off-by: Anders Roxell 
---
 platform/linux-generic/include/odp_schedule_internal.h | 2 +-
 platform/linux-generic/odp_schedule.c  | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/platform/linux-generic/include/odp_schedule_internal.h 
b/platform/linux-generic/include/odp_schedule_internal.h
index fe8ff7b..8a8c932 100644
--- a/platform/linux-generic/include/odp_schedule_internal.h
+++ b/platform/linux-generic/include/odp_schedule_internal.h
@@ -25,7 +25,7 @@ void schedule_queue_destroy(queue_entry_t *qe);
 int schedule_queue(const queue_entry_t *qe);
 void schedule_pktio_start(odp_pktio_t pktio, int num_in_queue,
  int in_queue_idx[]);
-void odp_schedule_release_context(void);
+void _schedule_release_context(void);
 
 #ifdef __cplusplus
 }
diff --git a/platform/linux-generic/odp_schedule.c 
b/platform/linux-generic/odp_schedule.c
index 2e24079..bcb8b92 100644
--- a/platform/linux-generic/odp_schedule.c
+++ b/platform/linux-generic/odp_schedule.c
@@ -301,7 +301,7 @@ int odp_schedule_term_local(void)
return -1;
}
 
-   odp_schedule_release_context();
+   _schedule_release_context();
 
sched_local_init();
return 0;
@@ -452,7 +452,7 @@ void odp_schedule_release_ordered(void)
}
 }
 
-void odp_schedule_release_context(void)
+void _schedule_release_context(void)
 {
if (sched_local.origin_qe) {
release_order(sched_local.origin_qe, sched_local.order,
@@ -501,7 +501,7 @@ static int schedule(odp_queue_t *out_queue, odp_event_t 
out_ev[],
return ret;
}
 
-   odp_schedule_release_context();
+   _schedule_release_context();
 
if (odp_unlikely(sched_local.pause))
return 0;
-- 
2.1.4

___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp


[lng-odp] [PATCHv3 0/3] hide internal functions

2016-04-12 Thread Anders Roxell
Hi,

Went through all internal functions so they aren't visible from the outside
library.

Cheers,
Anders

Anders Roxell (3):
  linux-generic: odp_schedule: drop prefix odp on internal functions
  linux-generic/include/odp_internal: add hidden attribute
  linux-generic: use hidden on internal functions

 .../linux-generic/include/odp_buffer_internal.h|  7 +-
 .../include/odp_classification_internal.h  | 42 ++--
 platform/linux-generic/include/odp_internal.h  | 18 --
 .../include/odp_name_table_internal.h  | 23 +++
 .../linux-generic/include/odp_packet_internal.h| 27 
 .../linux-generic/include/odp_packet_io_internal.h | 61 +-
 .../linux-generic/include/odp_packet_io_queue.h| 25 
 platform/linux-generic/include/odp_packet_socket.h | 29 +
 .../linux-generic/include/odp_pkt_queue_internal.h | 24 +++
 platform/linux-generic/include/odp_pool_internal.h |  3 +-
 .../linux-generic/include/odp_queue_internal.h | 75 --
 .../linux-generic/include/odp_schedule_internal.h  | 12 ++--
 .../include/odp_sorted_list_internal.h | 42 ++--
 .../include/odp_timer_wheel_internal.h | 29 +
 platform/linux-generic/odp_packet_io.c |  2 +-
 platform/linux-generic/odp_schedule.c  | 11 ++--
 platform/linux-generic/pktio/socket.c  |  5 +-
 17 files changed, 237 insertions(+), 198 deletions(-)

-- 
2.1.4

___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp


[lng-odp] [PATCH] platform/Makefile.inc: remove incorrect install to share dir

2016-04-11 Thread Anders Roxell
Remove libodp-linux.la from /usr/share/... its already installed
in /usr/lib/

Signed-off-by: Anders Roxell 
---
 platform/Makefile.inc | 2 --
 1 file changed, 2 deletions(-)

diff --git a/platform/Makefile.inc b/platform/Makefile.inc
index 1cb7a71..160ad4c 100644
--- a/platform/Makefile.inc
+++ b/platform/Makefile.inc
@@ -1,7 +1,5 @@
 LIB   = $(top_builddir)/lib
 
-dist_pkgdata_DATA = $(LIB)/libodp-linux.la
-
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = $(top_builddir)/pkgconfig/libodp-linux.pc
 
-- 
2.1.4

___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp


Re: [lng-odp] [PATCHv2] linux-generic/include/odp_packet_io_internal: add visability hidden

2016-04-11 Thread Anders Roxell
On 9 April 2016 at 20:07, Mike Holmes  wrote:
>
>
> On 8 April 2016 at 17:14, Anders Roxell  wrote:
>>
>> Internal functions should not be part of symbols is visible outside the
>> library.
>>
>> Suggested-by: Ricardo Salveti 
>> Signed-off-by: Anders Roxell 
>> ---
>>  .../linux-generic/include/odp_packet_io_internal.h | 23
>> +-
>>  1 file changed, 14 insertions(+), 9 deletions(-)
>>
>> diff --git a/platform/linux-generic/include/odp_packet_io_internal.h
>> b/platform/linux-generic/include/odp_packet_io_internal.h
>> index cca5c39..5c40c51 100644
>> --- a/platform/linux-generic/include/odp_packet_io_internal.h
>> +++ b/platform/linux-generic/include/odp_packet_io_internal.h
>> @@ -45,6 +45,11 @@ extern "C" {
>>   *  requested number of packets were not handled. */
>>  #define SOCK_ERR_REPORT(e) (e != EAGAIN && e != EWOULDBLOCK && e !=
>> EINTR)
>>
>> +#if defined(__GNUC__)
>> +#  define HIDDEN  __attribute__((visibility("hidden")))
>
>
> Should this be in the compiler hints.h with the others ?

either there or in in platform/linux-generic/include/odp_internal.h
since its an internal define.

Cheers,
Anders

>
> include/odp/api/spec/hints.h:#define ODP_NORETURN
> __attribute__((__noreturn__))
> include/odp/api/spec/hints.h:#define ODP_WEAK_SYMBOL
> __attribute__((__weak__))
> include/odp/api/spec/hints.h:#define ODP_HOT_CODE
> __attribute__((__hot__))
> include/odp/api/spec/hints.h:#define ODP_COLD_CODE
> __attribute__((__cold__))
>
> If it is part of the spec it is easier for other platforms to hide their
> internals by reusing it.
>
>
>>
>> +#else
>> +#  define HIDDEN
>> +#endif
>>  /* Forward declaration */
>>  struct pktio_if_ops;
>>
>> @@ -171,7 +176,7 @@ typedef struct pktio_if_ops {
>>  int _odp_packet_cls_enq(pktio_entry_t *pktio_entry, const uint8_t *base,
>> uint16_t buf_len, odp_packet_t *pkt_ret);
>>
>> -extern void *pktio_entry_ptr[];
>> +extern void HIDDEN *pktio_entry_ptr[];
>>
>>  static inline int pktio_to_id(odp_pktio_t pktio)
>>  {
>> @@ -217,16 +222,16 @@ int single_recv_queue(pktio_entry_t *entry, int
>> index, odp_packet_t packets[],
>>  int single_send_queue(pktio_entry_t *entry, int index, odp_packet_t
>> packets[],
>>   int num);
>>
>> -extern const pktio_if_ops_t netmap_pktio_ops;
>> -extern const pktio_if_ops_t dpdk_pktio_ops;
>> -extern const pktio_if_ops_t sock_mmsg_pktio_ops;
>> -extern const pktio_if_ops_t sock_mmap_pktio_ops;
>> -extern const pktio_if_ops_t loopback_pktio_ops;
>> +extern const HIDDEN pktio_if_ops_t netmap_pktio_ops;
>> +extern const HIDDEN pktio_if_ops_t dpdk_pktio_ops;
>> +extern const HIDDEN pktio_if_ops_t sock_mmsg_pktio_ops;
>> +extern const HIDDEN pktio_if_ops_t sock_mmap_pktio_ops;
>> +extern const HIDDEN pktio_if_ops_t loopback_pktio_ops;
>>  #ifdef HAVE_PCAP
>> -extern const pktio_if_ops_t pcap_pktio_ops;
>> +extern const HIDDEN pktio_if_ops_t pcap_pktio_ops;
>>  #endif
>> -extern const pktio_if_ops_t tap_pktio_ops;
>> -extern const pktio_if_ops_t * const pktio_if_ops[];
>> +extern const HIDDEN pktio_if_ops_t tap_pktio_ops;
>> +extern const HIDDEN pktio_if_ops_t * const pktio_if_ops[];
>>
>>  int sysfs_stats(pktio_entry_t *pktio_entry,
>> odp_pktio_stats_t *stats);
>> --
>> 2.8.0.rc3
>>
>> ___
>> lng-odp mailing list
>> lng-odp@lists.linaro.org
>> https://lists.linaro.org/mailman/listinfo/lng-odp
>
>
>
>
> --
> Mike Holmes
> Technical Manager - Linaro Networking Group
> Linaro.org │ Open source software for ARM SoCs
> "Work should be fun and collaborative, the rest follows"
>
>
___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp


Re: [lng-odp] [PATCHv2] linux-generic/include/odp_packet_io_internal: add visability hidden

2016-04-11 Thread Anders Roxell
On 9 April 2016 at 17:24, Bill Fischofer  wrote:
> Why is this restricted to GCC?  What happens when compiling with clang?  A
> quick experiment shows clang accepts the same __attribute__ without
> complaint but not sure what it does with it.

Clang works without a problem, so I don't think there is anything to do.

Cheers,
Anders

>
> On Fri, Apr 8, 2016 at 4:14 PM, Anders Roxell 
> wrote:
>>
>> Internal functions should not be part of symbols is visible outside the
>> library.
>>
>> Suggested-by: Ricardo Salveti 
>> Signed-off-by: Anders Roxell 
>> ---
>>  .../linux-generic/include/odp_packet_io_internal.h | 23
>> +-
>>  1 file changed, 14 insertions(+), 9 deletions(-)
>>
>> diff --git a/platform/linux-generic/include/odp_packet_io_internal.h
>> b/platform/linux-generic/include/odp_packet_io_internal.h
>> index cca5c39..5c40c51 100644
>> --- a/platform/linux-generic/include/odp_packet_io_internal.h
>> +++ b/platform/linux-generic/include/odp_packet_io_internal.h
>> @@ -45,6 +45,11 @@ extern "C" {
>>   *  requested number of packets were not handled. */
>>  #define SOCK_ERR_REPORT(e) (e != EAGAIN && e != EWOULDBLOCK && e !=
>> EINTR)
>>
>> +#if defined(__GNUC__)
>> +#  define HIDDEN  __attribute__((visibility("hidden")))
>> +#else
>> +#  define HIDDEN
>> +#endif
>>  /* Forward declaration */
>>  struct pktio_if_ops;
>>
>> @@ -171,7 +176,7 @@ typedef struct pktio_if_ops {
>>  int _odp_packet_cls_enq(pktio_entry_t *pktio_entry, const uint8_t *base,
>> uint16_t buf_len, odp_packet_t *pkt_ret);
>>
>> -extern void *pktio_entry_ptr[];
>> +extern void HIDDEN *pktio_entry_ptr[];
>>
>>  static inline int pktio_to_id(odp_pktio_t pktio)
>>  {
>> @@ -217,16 +222,16 @@ int single_recv_queue(pktio_entry_t *entry, int
>> index, odp_packet_t packets[],
>>  int single_send_queue(pktio_entry_t *entry, int index, odp_packet_t
>> packets[],
>>   int num);
>>
>> -extern const pktio_if_ops_t netmap_pktio_ops;
>> -extern const pktio_if_ops_t dpdk_pktio_ops;
>> -extern const pktio_if_ops_t sock_mmsg_pktio_ops;
>> -extern const pktio_if_ops_t sock_mmap_pktio_ops;
>> -extern const pktio_if_ops_t loopback_pktio_ops;
>> +extern const HIDDEN pktio_if_ops_t netmap_pktio_ops;
>> +extern const HIDDEN pktio_if_ops_t dpdk_pktio_ops;
>> +extern const HIDDEN pktio_if_ops_t sock_mmsg_pktio_ops;
>> +extern const HIDDEN pktio_if_ops_t sock_mmap_pktio_ops;
>> +extern const HIDDEN pktio_if_ops_t loopback_pktio_ops;
>>  #ifdef HAVE_PCAP
>> -extern const pktio_if_ops_t pcap_pktio_ops;
>> +extern const HIDDEN pktio_if_ops_t pcap_pktio_ops;
>>  #endif
>> -extern const pktio_if_ops_t tap_pktio_ops;
>> -extern const pktio_if_ops_t * const pktio_if_ops[];
>> +extern const HIDDEN pktio_if_ops_t tap_pktio_ops;
>> +extern const HIDDEN pktio_if_ops_t * const pktio_if_ops[];
>>
>>  int sysfs_stats(pktio_entry_t *pktio_entry,
>> odp_pktio_stats_t *stats);
>> --
>> 2.8.0.rc3
>>
>> ___
>> lng-odp mailing list
>> lng-odp@lists.linaro.org
>> https://lists.linaro.org/mailman/listinfo/lng-odp
>
>
___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp


[lng-odp] [PATCHv2] linux-generic/include/odp_packet_io_internal: add visability hidden

2016-04-08 Thread Anders Roxell
Internal functions should not be part of symbols is visible outside the
library.

Suggested-by: Ricardo Salveti 
Signed-off-by: Anders Roxell 
---
 .../linux-generic/include/odp_packet_io_internal.h | 23 +-
 1 file changed, 14 insertions(+), 9 deletions(-)

diff --git a/platform/linux-generic/include/odp_packet_io_internal.h 
b/platform/linux-generic/include/odp_packet_io_internal.h
index cca5c39..5c40c51 100644
--- a/platform/linux-generic/include/odp_packet_io_internal.h
+++ b/platform/linux-generic/include/odp_packet_io_internal.h
@@ -45,6 +45,11 @@ extern "C" {
  *  requested number of packets were not handled. */
 #define SOCK_ERR_REPORT(e) (e != EAGAIN && e != EWOULDBLOCK && e != EINTR)
 
+#if defined(__GNUC__)
+#  define HIDDEN  __attribute__((visibility("hidden")))
+#else
+#  define HIDDEN
+#endif
 /* Forward declaration */
 struct pktio_if_ops;
 
@@ -171,7 +176,7 @@ typedef struct pktio_if_ops {
 int _odp_packet_cls_enq(pktio_entry_t *pktio_entry, const uint8_t *base,
uint16_t buf_len, odp_packet_t *pkt_ret);
 
-extern void *pktio_entry_ptr[];
+extern void HIDDEN *pktio_entry_ptr[];
 
 static inline int pktio_to_id(odp_pktio_t pktio)
 {
@@ -217,16 +222,16 @@ int single_recv_queue(pktio_entry_t *entry, int index, 
odp_packet_t packets[],
 int single_send_queue(pktio_entry_t *entry, int index, odp_packet_t packets[],
  int num);
 
-extern const pktio_if_ops_t netmap_pktio_ops;
-extern const pktio_if_ops_t dpdk_pktio_ops;
-extern const pktio_if_ops_t sock_mmsg_pktio_ops;
-extern const pktio_if_ops_t sock_mmap_pktio_ops;
-extern const pktio_if_ops_t loopback_pktio_ops;
+extern const HIDDEN pktio_if_ops_t netmap_pktio_ops;
+extern const HIDDEN pktio_if_ops_t dpdk_pktio_ops;
+extern const HIDDEN pktio_if_ops_t sock_mmsg_pktio_ops;
+extern const HIDDEN pktio_if_ops_t sock_mmap_pktio_ops;
+extern const HIDDEN pktio_if_ops_t loopback_pktio_ops;
 #ifdef HAVE_PCAP
-extern const pktio_if_ops_t pcap_pktio_ops;
+extern const HIDDEN pktio_if_ops_t pcap_pktio_ops;
 #endif
-extern const pktio_if_ops_t tap_pktio_ops;
-extern const pktio_if_ops_t * const pktio_if_ops[];
+extern const HIDDEN pktio_if_ops_t tap_pktio_ops;
+extern const HIDDEN pktio_if_ops_t * const pktio_if_ops[];
 
 int sysfs_stats(pktio_entry_t *pktio_entry,
odp_pktio_stats_t *stats);
-- 
2.8.0.rc3

___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp


Re: [lng-odp] [PATCH] linux-generic/odp_impl: removing __DATE__ and __TIME__

2016-04-07 Thread Anders Roxell
On 7 April 2016 at 16:59, Ricardo Salveti  wrote:
> This is so we can get reproducible builds. Besides the library version,
> the string already contains the git hash, which is enough to traceback
> the build used.
>
> Bug-Link: https://bugs.linaro.org/show_bug.cgi?id=2154
>
> Signed-off-by: Ricardo Salveti 

Reviewed-by: Anders Roxell 

> ---
>  platform/linux-generic/odp_impl.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/platform/linux-generic/odp_impl.c 
> b/platform/linux-generic/odp_impl.c
> index 0b89af7..f8d1dfe 100644
> --- a/platform/linux-generic/odp_impl.c
> +++ b/platform/linux-generic/odp_impl.c
> @@ -30,7 +30,6 @@ extern "C" {
> ODP_VERSION_TO_STR(ODP_VERSION_API_GENERATION) "." \
> ODP_VERSION_TO_STR(ODP_VERSION_API_MAJOR) "." \
> ODP_VERSION_TO_STR(ODP_VERSION_API_MINOR) ") " \
> -   __DATE__ " " __TIME__ " " \
> ODP_VERSION_TO_STR(GIT_HASH)
>
>  #define ODP_VERSION_IMPL_NAME \
> --
> 2.7.4
>
___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp


Re: [lng-odp] [PATCHv3] validation: configure: move cflags guards to test/m4

2016-04-07 Thread Anders Roxell
On 2016-04-07 17:12, Maxim Uvarov wrote:
> Move cflags guards to test/m4 to fix cunit
> library search.
> https://bugs.linaro.org/show_bug.cgi?id=2161

Guess you should add that it failed when building --with-cunit-path=...

> 
> Reported-by: Brian Brooks 
> Suggested-by: Anders Roxell 
> Signed-off-by: Maxim Uvarov 

if fixing the changelog.

Reviewed-by: Anders Roxell 

> ---
> v3: drop patch 1. (btw there were no reject).
> 
>  configure.ac  | 14 --
>  test/m4/validation.m4 | 14 ++
>  2 files changed, 14 insertions(+), 14 deletions(-)
> 
> diff --git a/configure.ac b/configure.ac
> index 712d241..9665d1d 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -176,20 +176,6 @@ AC_ARG_ENABLE([debug],
>  ODP_CFLAGS="$ODP_CFLAGS -DODP_DEBUG=$ODP_DEBUG"
>  
>  ##
> -# Save and set temporary compilation flags
> -##
> -OLD_LDFLAGS=$LDFLAGS
> -OLD_CPPFLAGS=$CPPFLAGS
> -LDFLAGS="$AM_LDFLAGS $LDFLAGS"
> -CPPFLAGS="$AM_CPPFLAGS $CPPFLAGS"
> -
> -##
> -# Restore old saved variables
> -##
> -LDFLAGS=$OLD_LDFLAGS
> -CPPFLAGS=$OLD_CPPFLAGS
> -
> -##
>  # Default warning setup
>  ##
>  ODP_CFLAGS="$ODP_CFLAGS -W -Wall -Werror -Wstrict-prototypes 
> -Wmissing-prototypes"
> diff --git a/test/m4/validation.m4 b/test/m4/validation.m4
> index b137118..d32f675 100644
> --- a/test/m4/validation.m4
> +++ b/test/m4/validation.m4
> @@ -31,6 +31,14 @@ AC_HELP_STRING([--with-cunit-path=DIR   path to CUnit libs 
> and headers],
>  cunit_support=yes],[])
>  
>  ##
> +# Save and set temporary compilation flags
> +##
> +OLD_LDFLAGS=$LDFLAGS
> +OLD_CPPFLAGS=$CPPFLAGS
> +LDFLAGS="$AM_LDFLAGS $LDFLAGS"
> +CPPFLAGS="$AM_CPPFLAGS $CPPFLAGS"
> +
> +##
>  # Check for CUnit availability
>  ##
>  if test x$cunit_support = xyes
> @@ -42,3 +50,9 @@ then
>  else
>  cunit_support=no
>  fi
> +
> +##
> +# Restore old saved variables
> +##
> +LDFLAGS=$OLD_LDFLAGS
> +CPPFLAGS=$OLD_CPPFLAGS
> -- 
> 2.7.1.250.gff4ea60
> 
> ___
> lng-odp mailing list
> lng-odp@lists.linaro.org
> https://lists.linaro.org/mailman/listinfo/lng-odp
___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp


Re: [lng-odp] [PATCH 1/2] configure: support out-of-tree CUnit

2016-04-07 Thread Anders Roxell
On 7 April 2016 at 15:17, Maxim Uvarov  wrote:
> From: Brian Brooks 
>
> If --with-cunit-path=DIR is used, skip the AC_CHECK_LIB and modify the linker
> flags accordingly.
>
> Signed-off-by: Brian Brooks 
> Signed-off-by: Maxim Uvarov 
> ---
>  test/m4/validation.m4 | 8 ++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/test/m4/validation.m4 b/test/m4/validation.m4
> index b137118..f6c93f7 100644
> --- a/test/m4/validation.m4
> +++ b/test/m4/validation.m4
> @@ -33,12 +33,16 @@ AC_HELP_STRING([--with-cunit-path=DIR   path to CUnit 
> libs and headers],
>  ##
>  # Check for CUnit availability
>  ##
> -if test x$cunit_support = xyes
> +if test x$cunit_support = xyes -a -z "$CUNIT_PATH"
>  then
>  AC_CHECK_LIB([cunit],[CU_get_error], [],
>  [AC_MSG_ERROR([CUnit libraries required])])
>  AC_CHECK_HEADERS([CUnit/Basic.h], [],
>  [AC_MSG_FAILURE(["can't find cunit headers"])])
>  else
> -cunit_support=no
> +if test -z "$CUNIT_PATH"; then
> +cunit_support=no
> +else
> +AM_LDFLAGS="$AM_LDFLAGS -lcunit"
> +fi
>  fi

Why do you send this again?
This patch isn't needed.

only patch 2/2 is needed!

Cheers,
Anders
___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp


[lng-odp] Change in lng/odp[master]: pkg/debian: build depend on libcunit1-dev

2016-04-07 Thread Anders Roxell (Code Review)
Anders Roxell has posted comments on this change.

Change subject: pkg/debian: build depend on libcunit1-dev
..


Patch Set 1: Code-Review+1

-- 
To view, visit https://review.linaro.org/11249
To unsubscribe, visit https://review.linaro.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ied3bc03e41518ff2f7f6a956aab61e00071a5a35
Gerrit-PatchSet: 1
Gerrit-Project: lng/odp
Gerrit-Branch: master
Gerrit-Owner: Riku Voipio 
Gerrit-Reviewer: Anders Roxell 
Gerrit-Reviewer: Maxim Uvarov 
Gerrit-Reviewer: lava-bot 
Gerrit-HasComments: No
___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp


Re: [lng-odp] [PATCH] configure: reorder m4_includes

2016-04-06 Thread Anders Roxell
On 7 April 2016 at 07:48, Elo, Matias (Nokia - FI/Espoo)
 wrote:
> Hi,
>
> At least for me configure is still failing after this patch.
>
> $ ./configure --enable-test-perf --enable-test-vald --enable-test-cpp 
> --with-cunit-path= --with-dpdk-path= 
> --with-netmap-path= --prefix=
>
> checking for CU_get_error in -lcunit... no
> configure: error: CUnit libraries required
> make: *** [config.status] Error 1

Correct, and this patch wasn't intended to fix this issue.

This patch didn't fix that problem. I replied to Brians patch [1] with
a few review
comments how to fix this error you see.

Cheers,
Anders
[1] https://lists.linaro.org/pipermail/lng-odp/2016-April/021680.html

>
>
> -Matias
>
>> -Original Message-
>> From: lng-odp [mailto:lng-odp-boun...@lists.linaro.org] On Behalf Of EXT 
>> Maxim
>> Uvarov
>> Sent: Wednesday, April 06, 2016 2:50 PM
>> To: lng-odp@lists.linaro.org
>> Subject: Re: [lng-odp] [PATCH] configure: reorder m4_includes
>>
>> Merged,
>> Maxim.
>>
>> On 04/05/16 20:08, Brian Brooks wrote:
>> > On 04/01 22:15:34, Anders Roxell wrote:
>> >> Reorder the m4_include due to LIBS get contaminated while checking for
>> >> libraries.
>> >> Configure error:
>> >> checking for GCC atomic builtins... no
>> >> GCC-style __atomic builtins not supported by the compiler.
>> >> Use newer version. For gcc > 4.7.0
>> >>
>> >> Suggested-by: Ricardo Salveti 
>> >> Signed-off-by: Anders Roxell 
>> >> ---
>> >> Thanks to Brians patch "[PATCH 2/2] configure: remove dead code", with my
>> >> suggestion to it, we found out that the order matters.
>> >>
>> >> Cheers,
>> >> Anders
>> >>
>> >>   configure.ac | 16 
>> >>   1 file changed, 8 insertions(+), 8 deletions(-)
>> >>
>> >> diff --git a/configure.ac b/configure.ac
>> >> index ba814b3..d0d3ca6 100644
>> >> --- a/configure.ac
>> >> +++ b/configure.ac
>> >> @@ -83,14 +83,6 @@ AC_SUBST([platform_with_platform],
>> ["platform/${with_platform}"])
>> >>   AC_SUBST([platform_with_platform_test],
>> ["platform/${with_platform}/test"])
>> >>
>> >>
>> ##
>> 
>> >> -# Include m4 files
>> >> -
>> ##
>> 
>> >> -m4_include([./doc/m4/configure.m4])
>> >> -m4_include([./example/m4/configure.m4])
>> >> -m4_include([./helper/m4/configure.m4])
>> >> -m4_include([./test/m4/configure.m4])
>> >> -
>> >> -
>> ##
>> 
>> >>   # Run platform specific checks and settings
>> >>
>> ##
>> 
>> >>   if test "${with_platform}" == "linux-generic";
>> >> @@ -102,6 +94,14 @@ else
>> >>   fi
>> >>
>> >>
>> ##
>> 
>> >> +# Include m4 files
>> >>
>> +#
>> #
>> >> +m4_include([./doc/m4/configure.m4])
>> >> +m4_include([./example/m4/configure.m4])
>> >> +m4_include([./helper/m4/configure.m4])
>> >> +m4_include([./test/m4/configure.m4])
>> >> +
>> >>
>> +#
>> #
>> >>   # Set SDK install path
>> >>
>> ##
>> 
>> >>   AC_ARG_WITH([sdk-install-path],
>> >> --
>> >> 2.1.4
>> > Reviewed-by: Brian Brooks 
>> > ___
>> > lng-odp mailing list
>> > lng-odp@lists.linaro.org
>> > https://lists.linaro.org/mailman/listinfo/lng-odp
>>
>> ___
>> lng-odp mailing list
>> lng-odp@lists.linaro.org
>> https://lists.linaro.org/mailman/listinfo/lng-odp
___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp


Re: [lng-odp] [PATCH 1/2] configure: support out-of-tree CUnit

2016-04-04 Thread Anders Roxell
On 26 March 2016 at 02:06, Brian Brooks  wrote:
> On 04/01 22:15:34, Anders Roxell wrote:
>> On 25 March 2016 at 20:25, Brian Brooks  wrote:
>> > If --with-cunit-path=DIR is used, skip the AC_CHECK_LIB and modify the 
>> > linker
>> > flags accordingly.
>>
>> Why should we skip the AC_CHECK_LIB and AC_CHECK_HEADERS step
>> don't feel right.
>>
>> >
>> > Signed-off-by: Brian Brooks 
>> > ---
>> >  test/m4/validation.m4 | 8 ++--
>> >  1 file changed, 6 insertions(+), 2 deletions(-)
>> >
>> > diff --git a/test/m4/validation.m4 b/test/m4/validation.m4
>> > index b137118..f6c93f7 100644
>> > --- a/test/m4/validation.m4
>> > +++ b/test/m4/validation.m4
>> > @@ -33,12 +33,16 @@ AC_HELP_STRING([--with-cunit-path=DIR   path to CUnit 
>> > libs and headers],
>> >  ##
>> >  # Check for CUnit availability
>> >  ##
>> > -if test x$cunit_support = xyes
>> > +if test x$cunit_support = xyes -a -z "$CUNIT_PATH"
>> >  then
>> >  AC_CHECK_LIB([cunit],[CU_get_error], [],
>> >  [AC_MSG_ERROR([CUnit libraries required])])
>> >  AC_CHECK_HEADERS([CUnit/Basic.h], [],
>> >  [AC_MSG_FAILURE(["can't find cunit headers"])])
>> >  else
>> > -cunit_support=no
>> > +if test -z "$CUNIT_PATH"; then
>> > +cunit_support=no
>> > +else
>> > +AM_LDFLAGS="$AM_LDFLAGS -lcunit"
>> > +fi
>>
>> this patch is still incomplete you miss to add the headers right.
>
> Hi Anders,
>
> Can you help me understand why this patch is incomplete?

I was wrong!
I forgot that we add cunits header and lib path above.

>
> The include & lib path for OOT CUnit is taken care of via AM_CPPFLAGS and
> AM_LDFLAGS when --with-cunit-path=DIR is used. Only "-lcunit" is required
> if AC_CHECK_LIB is skipped.

You are correct that is enough.

>
> AC_CHECK_LIB has side effect of LIBS+="-lcunit" which makes subsequent
> autoconf checking, e.g. for GCC atomics, fail because the include & lib
> path for OOT CUnit is in AM_CPPFLAGS and AM_LDFLAGS not CPPFLAGS and
> LDFLAGS. The previous workaround is rather tricky to do cleanly here--if
> possible at all. The reason is the location of the WAR and CUnit checking
> was at the very bottom of the configure stage. So, no subsequent building
> of tiny programs for checking feature support was happening. Now, the
> CUnit checking is happening earlier in configure stage which makes the
> previous WAR very difficult to support. I do not think it is possible.

If we think its acceptable to fail when build and not early during
configure then
we should remove AM_CHECK_* for other OOT as well, and not only this.

>
> The proposal here is to simply skip the AC_CHECK_LIB & AC_CHECK_HEADERS
> and add the "-lcunit" side effect via AM_LDFLAGS _only_ when
> --with-cunit-path=DIR is used. If DIR is incorrect, the build will still
> fail, just at later stage instead of in configure stage. This might be
> acceptable to developers who choose to work on ODP with an OOT CUnit.

I like the idea of failing early in the configure step and not when building.

>
> What do you think? Do you have alternate recommendation e.g. moving CUnit
> checking back to bottom of configure stage so WAR can be used?

that was basically what I did with [1], right.

Cheers,
Anders
[1] https://lists.linaro.org/pipermail/lng-odp/2016-April/021682.html
___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp


[lng-odp] [PATCHv2] configure: remove separate so_version file

2016-04-01 Thread Anders Roxell
Set versioning in configure.ac directly, folks familiar with autotools
will expect it to be set there.

Suggested-by: Fathi Boudra 
Signed-off-by: Anders Roxell 
---
 .so_version  |  1 -
 Makefile.am  |  2 +-
 configure.ac | 10 +++---
 scripts/builddeb |  3 ++-
 4 files changed, 10 insertions(+), 6 deletions(-)
 delete mode 100644 .so_version

diff --git a/.so_version b/.so_version
deleted file mode 100644
index dfa6588..000
--- a/.so_version
+++ /dev/null
@@ -1 +0,0 @@
-108:0:0
diff --git a/Makefile.am b/Makefile.am
index a90eb91..2129472 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -17,4 +17,4 @@ SUBDIRS = @platform_with_platform@ \
 
 @DX_RULES@
 
-EXTRA_DIST = bootstrap $(DX_CONFIG) CHANGELOG config/README .scmversion 
.so_version
+EXTRA_DIST = bootstrap $(DX_CONFIG) CHANGELOG config/README .scmversion
diff --git a/configure.ac b/configure.ac
index 4d86817..5d274c7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,6 +9,12 @@ AC_SYS_LARGEFILE
 AC_CONFIG_MACRO_DIR([m4])
 AM_SILENT_RULES([yes])
 
+##
+# Set correct platform library version
+##
+ODP_LIBSO_VERSION=108:0:0
+AC_SUBST(ODP_LIBSO_VERSION)
+
 # Checks for programs.
 AC_PROG_CC
 AM_PROG_CC_C_O
@@ -61,10 +67,8 @@ AS_CASE([$host],
 AC_SUBST([ARCH])
 
 ##
-# Set correct platform library version
+# Set correct pkgconfig version
 ##
-ODP_LIBSO_VERSION=$(cat ${srcdir}/.so_version)
-AC_SUBST(ODP_LIBSO_VERSION)
 PKGCONFIG_VERSION=$(echo $VERSION | awk -F '.git' '{print $1}')
 AC_SUBST(PKGCONFIG_VERSION)
 
diff --git a/scripts/builddeb b/scripts/builddeb
index b832df6..f28ee02 100755
--- a/scripts/builddeb
+++ b/scripts/builddeb
@@ -20,7 +20,8 @@ fi
 pushd ${ROOT_DIR}/${package}-${version}
 cp -r ${ROOT_DIR}/pkg/debian .
 
-current=$(cat .so_version |awk -F : '{print $1}')
+current=$(grep "^ODP_LIBSO_VERSION" ${ROOT_DIR}/configure.ac| \
+   awk -F'=' '{print $2}' |awk -F : '{print $1}')
 rename 's,(.*linux)(.*),${1}'"${current}"'${2},' debian/*odp*-linux.install
 
 sed -i "s:\(libodp[a-zA-Z\-]\+linux\)\(-dbg\|$\| \):\1${current}\2:g" 
debian/control
-- 
2.1.4

___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp


[lng-odp] [PATCH] configure: reorder m4_includes

2016-04-01 Thread Anders Roxell
Reorder the m4_include due to LIBS get contaminated while checking for
libraries.
Configure error:
checking for GCC atomic builtins... no
GCC-style __atomic builtins not supported by the compiler.
Use newer version. For gcc > 4.7.0

Suggested-by: Ricardo Salveti 
Signed-off-by: Anders Roxell 
---
Thanks to Brians patch "[PATCH 2/2] configure: remove dead code", with my
suggestion to it, we found out that the order matters.

Cheers,
Anders

 configure.ac | 16 
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/configure.ac b/configure.ac
index ba814b3..d0d3ca6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -83,14 +83,6 @@ AC_SUBST([platform_with_platform], 
["platform/${with_platform}"])
 AC_SUBST([platform_with_platform_test], ["platform/${with_platform}/test"])
 
 ##
-# Include m4 files
-##
-m4_include([./doc/m4/configure.m4])
-m4_include([./example/m4/configure.m4])
-m4_include([./helper/m4/configure.m4])
-m4_include([./test/m4/configure.m4])
-
-##
 # Run platform specific checks and settings
 ##
 if test "${with_platform}" == "linux-generic";
@@ -102,6 +94,14 @@ else
 fi
 
 ##
+# Include m4 files
+##
+m4_include([./doc/m4/configure.m4])
+m4_include([./example/m4/configure.m4])
+m4_include([./helper/m4/configure.m4])
+m4_include([./test/m4/configure.m4])
+
+##
 # Set SDK install path
 ##
 AC_ARG_WITH([sdk-install-path],
-- 
2.1.4

___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp


Re: [lng-odp] [PATCH 1/2] configure: support out-of-tree CUnit

2016-04-01 Thread Anders Roxell
On 25 March 2016 at 20:25, Brian Brooks  wrote:
> If --with-cunit-path=DIR is used, skip the AC_CHECK_LIB and modify the linker
> flags accordingly.

Why should we skip the AC_CHECK_LIB and AC_CHECK_HEADERS step
don't feel right.

>
> Signed-off-by: Brian Brooks 
> ---
>  test/m4/validation.m4 | 8 ++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/test/m4/validation.m4 b/test/m4/validation.m4
> index b137118..f6c93f7 100644
> --- a/test/m4/validation.m4
> +++ b/test/m4/validation.m4
> @@ -33,12 +33,16 @@ AC_HELP_STRING([--with-cunit-path=DIR   path to CUnit 
> libs and headers],
>  ##
>  # Check for CUnit availability
>  ##
> -if test x$cunit_support = xyes
> +if test x$cunit_support = xyes -a -z "$CUNIT_PATH"
>  then
>  AC_CHECK_LIB([cunit],[CU_get_error], [],
>  [AC_MSG_ERROR([CUnit libraries required])])
>  AC_CHECK_HEADERS([CUnit/Basic.h], [],
>  [AC_MSG_FAILURE(["can't find cunit headers"])])
>  else
> -cunit_support=no
> +if test -z "$CUNIT_PATH"; then
> +cunit_support=no
> +else
> +AM_LDFLAGS="$AM_LDFLAGS -lcunit"
> +fi

this patch is still incomplete you miss to add the headers right.

Cheers,
Anders
___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp


Re: [lng-odp] [PATCH 2/2] configure: remove dead code

2016-04-01 Thread Anders Roxell
On 25 March 2016 at 20:25, Brian Brooks  wrote:
> Remove dead code which potentially acted as a workaround for making
> AC_CHECK_LIB to work with --with-cunit-path.

Workaround you may say that.
I would put it, one way to do checks for libs and headers that is in
the path or not.

>
> Signed-off-by: Brian Brooks 
> ---
>  configure.ac | 14 --
>  1 file changed, 14 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index 4d86817..6c712b9 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -172,20 +172,6 @@ AC_ARG_ENABLE([debug],
>  ODP_CFLAGS="$ODP_CFLAGS -DODP_DEBUG=$ODP_DEBUG"
>
>  ##
> -# Save and set temporary compilation flags
> -##
> -OLD_LDFLAGS=$LDFLAGS
> -OLD_CPPFLAGS=$CPPFLAGS
> -LDFLAGS="$AM_LDFLAGS $LDFLAGS"
> -CPPFLAGS="$AM_CPPFLAGS $CPPFLAGS"
> -
> -##
> -# Restore old saved variables
> -##
> -LDFLAGS=$OLD_LDFLAGS
> -CPPFLAGS=$OLD_CPPFLAGS
> -
> -##

The code isn't dead just not moved to the correct location. =/
The patch should look like this, see below.

Cheers,
Anders

diff --git a/configure.ac b/configure.ac
index d0d3ca6..6361f14 100644
--- a/configure.ac
+++ b/configure.ac
@@ -172,20 +172,6 @@ AC_ARG_ENABLE([debug],
 ODP_CFLAGS="$ODP_CFLAGS -DODP_DEBUG=$ODP_DEBUG"

 ##
-# Save and set temporary compilation flags
-##
-OLD_LDFLAGS=$LDFLAGS
-OLD_CPPFLAGS=$CPPFLAGS
-LDFLAGS="$AM_LDFLAGS $LDFLAGS"
-CPPFLAGS="$AM_CPPFLAGS $CPPFLAGS"
-
-##
-# Restore old saved variables
-##
-LDFLAGS=$OLD_LDFLAGS
-CPPFLAGS=$OLD_CPPFLAGS
-
-##
 # Default warning setup
 ##
 ODP_CFLAGS="$ODP_CFLAGS -W -Wall -Werror -Wstrict-prototypes
-Wmissing-prototypes"
diff --git a/test/m4/validation.m4 b/test/m4/validation.m4
index b137118..d32f675 100644
--- a/test/m4/validation.m4
+++ b/test/m4/validation.m4
@@ -31,6 +31,14 @@ AC_HELP_STRING([--with-cunit-path=DIR   path to
CUnit libs and headers],
 cunit_support=yes],[])

 ##
+# Save and set temporary compilation flags
+##
+OLD_LDFLAGS=$LDFLAGS
+OLD_CPPFLAGS=$CPPFLAGS
+LDFLAGS="$AM_LDFLAGS $LDFLAGS"
+CPPFLAGS="$AM_CPPFLAGS $CPPFLAGS"
+
+##
 # Check for CUnit availability
 ##
 if test x$cunit_support = xyes
@@ -42,3 +50,9 @@ then
 else
 cunit_support=no
 fi
+
+##
+# Restore old saved variables
+##
+LDFLAGS=$OLD_LDFLAGS
+CPPFLAGS=$OLD_CPPFLAGS
___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp


[lng-odp] [PATCH] configure: remove separate so_version file

2016-04-01 Thread Anders Roxell
Set versioning in configure.ac directly, folks familiar with autotools
will expect it to be set there.

Suggested-by: Fathi Boudra 
Signed-off-by: Anders Roxell 
---
 .so_version  | 1 -
 Makefile.am  | 2 +-
 configure.ac | 2 +-
 scripts/builddeb | 3 ++-
 4 files changed, 4 insertions(+), 4 deletions(-)
 delete mode 100644 .so_version

diff --git a/.so_version b/.so_version
deleted file mode 100644
index dfa6588..000
--- a/.so_version
+++ /dev/null
@@ -1 +0,0 @@
-108:0:0
diff --git a/Makefile.am b/Makefile.am
index a90eb91..2129472 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -17,4 +17,4 @@ SUBDIRS = @platform_with_platform@ \
 
 @DX_RULES@
 
-EXTRA_DIST = bootstrap $(DX_CONFIG) CHANGELOG config/README .scmversion 
.so_version
+EXTRA_DIST = bootstrap $(DX_CONFIG) CHANGELOG config/README .scmversion
diff --git a/configure.ac b/configure.ac
index 4d86817..ba814b3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -63,7 +63,7 @@ AC_SUBST([ARCH])
 ##
 # Set correct platform library version
 ##
-ODP_LIBSO_VERSION=$(cat ${srcdir}/.so_version)
+ODP_LIBSO_VERSION=108:0:0
 AC_SUBST(ODP_LIBSO_VERSION)
 PKGCONFIG_VERSION=$(echo $VERSION | awk -F '.git' '{print $1}')
 AC_SUBST(PKGCONFIG_VERSION)
diff --git a/scripts/builddeb b/scripts/builddeb
index b832df6..f28ee02 100755
--- a/scripts/builddeb
+++ b/scripts/builddeb
@@ -20,7 +20,8 @@ fi
 pushd ${ROOT_DIR}/${package}-${version}
 cp -r ${ROOT_DIR}/pkg/debian .
 
-current=$(cat .so_version |awk -F : '{print $1}')
+current=$(grep "^ODP_LIBSO_VERSION" ${ROOT_DIR}/configure.ac| \
+   awk -F'=' '{print $2}' |awk -F : '{print $1}')
 rename 's,(.*linux)(.*),${1}'"${current}"'${2},' debian/*odp*-linux.install
 
 sed -i "s:\(libodp[a-zA-Z\-]\+linux\)\(-dbg\|$\| \):\1${current}\2:g" 
debian/control
-- 
2.1.4

___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp


[lng-odp] [PATCH] configure: correctly set the SO-version when build OOT

2016-03-31 Thread Anders Roxell
Fix out-of-tree build bug introduced with patch "972f47f configure:
disconnect API version with SO version"

Signed-off-by: Anders Roxell 
---
 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index e2e18e8..bfeb815 100644
--- a/configure.ac
+++ b/configure.ac
@@ -63,7 +63,7 @@ AC_SUBST([ARCH])
 ##
 # Set correct platform library version
 ##
-ODP_LIBSO_VERSION=$(cat ./.so_version)
+ODP_LIBSO_VERSION=$(cat ${srcdir}/.so_version)
 AC_SUBST(ODP_LIBSO_VERSION)
 
 ##
-- 
2.1.4

___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp


Re: [lng-odp] [PATCH] test: run only memcheck

2016-03-30 Thread Anders Roxell
On 30 March 2016 at 21:46, Mike Holmes  wrote:
> valgrind can run many tools, however they tend to result in the code
> never passing currently, start out stabilizing the results for the memory
> leek checking first and add more tools later.
>
> Signed-off-by: Mike Holmes 

Reviewed-by: Anders Roxell 

> ---
>  test/Makefile.inc | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/test/Makefile.inc b/test/Makefile.inc
> index c4399cb..5def923 100644
> --- a/test/Makefile.inc
> +++ b/test/Makefile.inc
> @@ -16,6 +16,6 @@ AM_CXXFLAGS = $(INCFLAGS)
>  AM_LDFLAGS += -L$(LIB)
>
>  @VALGRIND_CHECK_RULES@
> -valgrind_tools = memcheck drd sgcheck
> +valgrind_tools = memcheck
>
>  TESTS_ENVIRONMENT= ODP_PLATFORM=${with_platform} EXEEXT=${EXEEXT}
> --
> 2.5.0
>
> ___
> lng-odp mailing list
> lng-odp@lists.linaro.org
> https://lists.linaro.org/mailman/listinfo/lng-odp
___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp


Re: [lng-odp] [PATCH] configure: disconnect API version with SO version

2016-03-30 Thread Anders Roxell
On 30 March 2016 at 21:26, Ricardo Salveti  wrote:
> On Wed, Mar 30, 2016 at 4:08 PM, Anders Roxell  
> wrote:
>> We used to force applications to rebuild when a ODP released a new
>> version that changed one of the first two digits. That shouldn't be
>> needed if we use the SO-verson as it is intended to be used.
>
> Disconnecting the project version/releases with the SO-version is
> probably a good thing to do as we have monthly releases for ODP.
>
> Not expecting the disconnection so soon because the ABI is constantly
> changed, but this will at least allow consumers to avoid rebuilding
> their software when it's not really required.
>
> We just need to be a bit more careful when doing releases if this gets
> merged, since it is one more thing to check and update.

Yes, but we should already be careful when doing releases. =)

>
>> Signed-off-by: Anders Roxell 
>> ---
>>  .so_version  | 1 +
>>  Makefile.am  | 2 +-
>>  configure.ac | 3 +--
>>  scripts/builddeb | 2 +-
>>  4 files changed, 4 insertions(+), 4 deletions(-)
>>  create mode 100644 .so_version
>>
>> diff --git a/.so_version b/.so_version
>> new file mode 100644
>> index 000..dfa6588
>> --- /dev/null
>> +++ b/.so_version
>> @@ -0,0 +1 @@
>> +108:0:0
>> diff --git a/Makefile.am b/Makefile.am
>> index 2129472..a90eb91 100644
>> --- a/Makefile.am
>> +++ b/Makefile.am
>> @@ -17,4 +17,4 @@ SUBDIRS = @platform_with_platform@ \
>>
>>  @DX_RULES@
>>
>> -EXTRA_DIST = bootstrap $(DX_CONFIG) CHANGELOG config/README .scmversion
>> +EXTRA_DIST = bootstrap $(DX_CONFIG) CHANGELOG config/README .scmversion 
>> .so_version
>> diff --git a/configure.ac b/configure.ac
>> index c8fb91e..e2e18e8 100644
>> --- a/configure.ac
>> +++ b/configure.ac
>> @@ -63,8 +63,7 @@ AC_SUBST([ARCH])
>>  ##
>>  # Set correct platform library version
>>  ##
>> -AGE=0
>> -ODP_LIBSO_VERSION=$(echo $VERSION.$AGE | awk -F . '{printf("%d:%d:%d\n", 
>> (($1 * 100) + $2), $3, $4)}')
>> +ODP_LIBSO_VERSION=$(cat ./.so_version)
>>  AC_SUBST(ODP_LIBSO_VERSION)
>>
>>  ##
>> diff --git a/scripts/builddeb b/scripts/builddeb
>> index 8bde7cf..b832df6 100755
>> --- a/scripts/builddeb
>> +++ b/scripts/builddeb
>> @@ -20,7 +20,7 @@ fi
>>  pushd ${ROOT_DIR}/${package}-${version}
>>  cp -r ${ROOT_DIR}/pkg/debian .
>>
>> -current=$(echo ${version} | awk -F . '{printf("%d\n", (($1 * 100) + $2))}')
>> +current=$(cat .so_version |awk -F : '{print $1}')
>>  rename 's,(.*linux)(.*),${1}'"${current}"'${2},' debian/*odp*-linux.install
>>
>>  sed -i "s:\(libodp[a-zA-Z\-]\+linux\)\(-dbg\|$\| \):\1${current}\2:g" 
>> debian/control
>> --
>> 2.1.4
>
> Should we break this into 2 separated patches? Might be probably good
> to change builddeb in a separated patch.

if we break it into two patches we can't guarantee to be "debian bisectable"

Cheers,
Anders
___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp


[lng-odp] [PATCH] configure: disconnect API version with SO version

2016-03-30 Thread Anders Roxell
We used to force applications to rebuild when a ODP released a new
version that changed one of the first two digits. That shouldn't be
needed if we use the SO-verson as it is intended to be used.

Signed-off-by: Anders Roxell 
---
 .so_version  | 1 +
 Makefile.am  | 2 +-
 configure.ac | 3 +--
 scripts/builddeb | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
 create mode 100644 .so_version

diff --git a/.so_version b/.so_version
new file mode 100644
index 000..dfa6588
--- /dev/null
+++ b/.so_version
@@ -0,0 +1 @@
+108:0:0
diff --git a/Makefile.am b/Makefile.am
index 2129472..a90eb91 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -17,4 +17,4 @@ SUBDIRS = @platform_with_platform@ \
 
 @DX_RULES@
 
-EXTRA_DIST = bootstrap $(DX_CONFIG) CHANGELOG config/README .scmversion
+EXTRA_DIST = bootstrap $(DX_CONFIG) CHANGELOG config/README .scmversion 
.so_version
diff --git a/configure.ac b/configure.ac
index c8fb91e..e2e18e8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -63,8 +63,7 @@ AC_SUBST([ARCH])
 ##
 # Set correct platform library version
 ##
-AGE=0
-ODP_LIBSO_VERSION=$(echo $VERSION.$AGE | awk -F . '{printf("%d:%d:%d\n", (($1 
* 100) + $2), $3, $4)}')
+ODP_LIBSO_VERSION=$(cat ./.so_version)
 AC_SUBST(ODP_LIBSO_VERSION)
 
 ##
diff --git a/scripts/builddeb b/scripts/builddeb
index 8bde7cf..b832df6 100755
--- a/scripts/builddeb
+++ b/scripts/builddeb
@@ -20,7 +20,7 @@ fi
 pushd ${ROOT_DIR}/${package}-${version}
 cp -r ${ROOT_DIR}/pkg/debian .
 
-current=$(echo ${version} | awk -F . '{printf("%d\n", (($1 * 100) + $2))}')
+current=$(cat .so_version |awk -F : '{print $1}')
 rename 's,(.*linux)(.*),${1}'"${current}"'${2},' debian/*odp*-linux.install
 
 sed -i "s:\(libodp[a-zA-Z\-]\+linux\)\(-dbg\|$\| \):\1${current}\2:g" 
debian/control
-- 
2.1.4

___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp


  1   2   3   4   5   6   7   8   >