Re: [lng-odp] [API-NEXT PATCHv10 0/4] Egress Traffic Manager

2015-11-17 Thread Mike Holmes
This series does not apply cleanly with apply-and-build looks like it needs
refactoring so that each patch builds when it is applied.

ls ~/incoming/bill/
API-NEXT-PATCHv10-1-4-api-tm-add-tm-API-definitions.patch
API-NEXT-PATCHv10-3-4-linux-generic-tm-add-tm-to-build.patch
API-NEXT-PATCHv10-2-4-linux-generic-tm-implement-traffic-manager.patch
 API-NEXT-PATCHv10-4-4-example-tm-traffic-manager-example.patch


GIT_BRANCH=api-next PATCH_DIR=~/incoming/bill ./apply-and-build.sh

Using patch: API-NEXT-PATCHv10-1-4-api-tm-add-tm-API-definitions.patch
  Trying to apply patch
  Patch applied
  Building with patch

 

  CC   pktio/loop.lo
In file included from ../../../../platform/linux-generic/pktio/loop.c:12:0:
../../../../include/odp.h:58:30: fatal error: odp/traffic_mngr.h: No such
file or directory


On 17 November 2015 at 08:08, Maxim Uvarov  wrote:

>
> Problem with building 32 bit app:
>
>  /* A hash table entry is LOGICALLY either empty, a pointer to a 64-byte
>  * aligned name_tbl_entry_t OR a pointer to a 64-byte aligned secondary
> hash
>  * table.  Since the bottom 6-bits of this value are not needed to hold the
>  * address, these 6 bits are used to indicate the what type of object this
>  * address refers to AND in one case the maximum number of hash
> "collisions"
>  * at this level.  Specifically, if the entire value is 0 then this entry
> is
>  * empty, else if the bottom 6 bits are 0, then this hash_tbl_entry_t
> value is
>  * a pointer to a secondary hash table.  Otherwise if the bottom 6 bits are
>  * NOT zero then this values points to a (linked list of)
> name_table_entry_t
>  * records AND the bottom 6 bits are the length of this list.
>  */
> typedef uintptr_t hash_tbl_entry_t;
>
>
> Code uses shift on 48 which makes that hash not workable. Define it as
> uint64_t makes
> new problem with cast to and from pointer to hash_tbl_entry_t.
>
> I think that needed to be replaced with some more advance type. Like
> struct with ptr and bits.
>
> Maxim.
>
>
> On 11/12/2015 19:36, Bill Fischofer wrote:
>
>> Changes in v10
>> - Add back ARM definitions for _crc32w() from Alex that got dropped in v9
>>
>> Note: Checkpatch complains about the _asm() line.  Says spaces are needed
>> but
>> if spaces are added then complains that spaces are prohibited.  Rules
>> need to
>> be updated to ignore these sort of constructs.
>>
>> Changes in v9
>> - Rebase on top of latest queue fixes
>>
>> Changes in v8
>> - add ARM definition for __crc32w() function (from Alex)
>>
>> Changes in v7 (review comments by Maxim)
>> - Correct architecture ifdefs (use of arch dir in later patch)
>> - Correct doxygen for queue types
>> - Change internal APIs that use odp_ prefix to use _odp prefix
>> - Rebase to latest api-next
>>
>> Changes in v6
>> - Move documentation of packet colors to main API file
>> - Add ODP prefix to odp_tm_egress_kind_t enums
>>
>> Changes in v5
>> - Add include file odp_traffic_mngr_internal.h
>> - Add support for odp_tm_enq() from packets originating from ordered
>> queues
>>
>> Changes in v4
>> - Incorporate API changes suggested by Petri
>>
>> Changes in v3
>> - Fix checkpatch errors (Bill)
>>
>> Changes in v2
>> - Full patch submission (Barry)
>>
>> Barry Spinney (4):
>>api: tm: add tm API definitions
>>linux-generic: tm: implement traffic manager
>>linux-generic: tm: add tm to build
>>example: tm: traffic manager example
>>
>>   configure.ac   |1 +
>>   example/Makefile.am|2 +-
>>   example/traffic_mgmt/.gitignore|1 +
>>   example/traffic_mgmt/Makefile.am   |9 +
>>   example/traffic_mgmt/odp_traffic_mgmt.c|  781 ++
>>   include/odp.h  |1 +
>>   include/odp/api/packet.h   |   69 +
>>   include/odp/api/traffic_mngr.h | 1611 +++
>>   platform/linux-generic/Makefile.am |   13 +
>>   .../linux-generic/include/odp/plat/packet_types.h  |   11 +
>>   .../linux-generic/include/odp/plat/queue_types.h   |7 +
>>   .../include/odp/plat/traffic_mngr_types.h  |  185 ++
>>   platform/linux-generic/include/odp/traffic_mngr.h  |   35 +
>>   platform/linux-generic/include/odp_internal.h  |2 +
>>   .../include/odp_name_table_internal.h  |   61 +
>>   .../linux-generic/include/odp_packet_internal.h|5 +
>>   .../linux-generic/include/odp_pkt_queue_internal.h |   62 +
>>   .../linux-generic/include/odp_queue_internal.h |6 +
>>   .../include/odp_sorted_list_internal.h |   78 +
>>   .../include/odp_timer_wheel_internal.h |   68 +
>>   .../include/odp_traffic_mngr_internal.h|  324 +++
>>   platform/linux-generic/odp_init.c  |5 +
>>   platform/linux-generic/odp_name_table.c| 1371 ++
>>   platform/linux-generic/odp_packet_flags.c  |   46

Re: [lng-odp] [API-NEXT PATCHv10 0/4] Egress Traffic Manager

2015-11-17 Thread Maxim Uvarov


Problem with building 32 bit app:

 /* A hash table entry is LOGICALLY either empty, a pointer to a 64-byte
 * aligned name_tbl_entry_t OR a pointer to a 64-byte aligned secondary 
hash

 * table.  Since the bottom 6-bits of this value are not needed to hold the
 * address, these 6 bits are used to indicate the what type of object this
 * address refers to AND in one case the maximum number of hash 
"collisions"
 * at this level.  Specifically, if the entire value is 0 then this 
entry is
 * empty, else if the bottom 6 bits are 0, then this hash_tbl_entry_t 
value is

 * a pointer to a secondary hash table.  Otherwise if the bottom 6 bits are
 * NOT zero then this values points to a (linked list of) 
name_table_entry_t

 * records AND the bottom 6 bits are the length of this list.
 */
typedef uintptr_t hash_tbl_entry_t;


Code uses shift on 48 which makes that hash not workable. Define it as 
uint64_t makes

new problem with cast to and from pointer to hash_tbl_entry_t.

I think that needed to be replaced with some more advance type. Like 
struct with ptr and bits.


Maxim.


On 11/12/2015 19:36, Bill Fischofer wrote:

Changes in v10
- Add back ARM definitions for _crc32w() from Alex that got dropped in v9

Note: Checkpatch complains about the _asm() line.  Says spaces are needed but
if spaces are added then complains that spaces are prohibited.  Rules need to
be updated to ignore these sort of constructs.

Changes in v9
- Rebase on top of latest queue fixes

Changes in v8
- add ARM definition for __crc32w() function (from Alex)

Changes in v7 (review comments by Maxim)
- Correct architecture ifdefs (use of arch dir in later patch)
- Correct doxygen for queue types
- Change internal APIs that use odp_ prefix to use _odp prefix
- Rebase to latest api-next

Changes in v6
- Move documentation of packet colors to main API file
- Add ODP prefix to odp_tm_egress_kind_t enums

Changes in v5
- Add include file odp_traffic_mngr_internal.h
- Add support for odp_tm_enq() from packets originating from ordered queues

Changes in v4
- Incorporate API changes suggested by Petri

Changes in v3
- Fix checkpatch errors (Bill)

Changes in v2
- Full patch submission (Barry)

Barry Spinney (4):
   api: tm: add tm API definitions
   linux-generic: tm: implement traffic manager
   linux-generic: tm: add tm to build
   example: tm: traffic manager example

  configure.ac   |1 +
  example/Makefile.am|2 +-
  example/traffic_mgmt/.gitignore|1 +
  example/traffic_mgmt/Makefile.am   |9 +
  example/traffic_mgmt/odp_traffic_mgmt.c|  781 ++
  include/odp.h  |1 +
  include/odp/api/packet.h   |   69 +
  include/odp/api/traffic_mngr.h | 1611 +++
  platform/linux-generic/Makefile.am |   13 +
  .../linux-generic/include/odp/plat/packet_types.h  |   11 +
  .../linux-generic/include/odp/plat/queue_types.h   |7 +
  .../include/odp/plat/traffic_mngr_types.h  |  185 ++
  platform/linux-generic/include/odp/traffic_mngr.h  |   35 +
  platform/linux-generic/include/odp_internal.h  |2 +
  .../include/odp_name_table_internal.h  |   61 +
  .../linux-generic/include/odp_packet_internal.h|5 +
  .../linux-generic/include/odp_pkt_queue_internal.h |   62 +
  .../linux-generic/include/odp_queue_internal.h |6 +
  .../include/odp_sorted_list_internal.h |   78 +
  .../include/odp_timer_wheel_internal.h |   68 +
  .../include/odp_traffic_mngr_internal.h|  324 +++
  platform/linux-generic/odp_init.c  |5 +
  platform/linux-generic/odp_name_table.c| 1371 ++
  platform/linux-generic/odp_packet_flags.c  |   46 +-
  platform/linux-generic/odp_pkt_queue.c |  379 +++
  platform/linux-generic/odp_queue.c |   60 +
  platform/linux-generic/odp_sorted_list.c   |  271 ++
  platform/linux-generic/odp_timer_wheel.c   |  907 +++
  platform/linux-generic/odp_traffic_mngr.c  | 2799 
  29 files changed, 9168 insertions(+), 2 deletions(-)
  create mode 100644 example/traffic_mgmt/.gitignore
  create mode 100644 example/traffic_mgmt/Makefile.am
  create mode 100644 example/traffic_mgmt/odp_traffic_mgmt.c
  create mode 100644 include/odp/api/traffic_mngr.h
  create mode 100644 
platform/linux-generic/include/odp/plat/traffic_mngr_types.h
  create mode 100644 platform/linux-generic/include/odp/traffic_mngr.h
  create mode 100644 platform/linux-generic/include/odp_name_table_internal.h
  create mode 100644 platform/linux-generic/include/odp_pkt_queue_internal.h
  create mode 100644 platform/linux-generic/include/odp_sorted_list_internal.h
  create mode 100644 platform/linux-generic/include/odp_timer_wheel_internal.h
  create mode 100644 plat

Re: [lng-odp] [API-NEXT PATCHv10 0/4] Egress Traffic Manager

2015-11-13 Thread Maxim Uvarov

On 11/13/2015 11:00, Savolainen, Petri (Nokia - FI/Espoo) wrote:

How about porting the TM code to use odp_hash_crc32c(). It's plain C and builds 
on anything...

-Petri

there is some generic code under x86 if branch (pure C).

Maxim.

-Original Message-
From: lng-odp [mailto:lng-odp-boun...@lists.linaro.org] On Behalf Of
EXT Maxim Uvarov
Sent: Friday, November 13, 2015 9:54 AM
To: Alexandru Badicioiu
Cc: LNG ODP Mailman List
Subject: Re: [lng-odp] [API-NEXT PATCHv10 0/4] Egress Traffic Manager

On 11/13/2015 10:29, Alexandru Badicioiu wrote:

Compile with -march=armv8-a+crc.

Alex


ok, now arm64 looks like work, but other arches broken:

./configure --with-platform=linux-generic
--prefix=/builds/check-odp-new.git/new-build --enable-test-perf
--with-openssl-path=/builds/check-odp-new.git/installed/x86_64-
i386/openssl-OpenSSL_1_0_1h
--enable-test-vald
--with-cunit-path=/builds/check-odp-new.git/installed/x86_64-
i386/cunit-2.1-3
CFLAGS=-m32 LDFLAGS=-m32
odp_name_table.c: In function 'check_secondary_hash':
odp_name_table.c:366:4: error: right shift count >= width of type [-
Werror]
  if ((hash_tbl_entry >> 48) == 0x7FFF)
  ^
odp_name_table.c:368:4: error: right shift count >= width of type [-
Werror]
  else if ((hash_tbl_entry >> 48) == 0)
  ^
cc1: all warnings being treated as errors



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


Re: [lng-odp] [API-NEXT PATCHv10 0/4] Egress Traffic Manager

2015-11-13 Thread Savolainen, Petri (Nokia - FI/Espoo)
How about porting the TM code to use odp_hash_crc32c(). It's plain C and builds 
on anything...

-Petri

> -Original Message-
> From: lng-odp [mailto:lng-odp-boun...@lists.linaro.org] On Behalf Of
> EXT Maxim Uvarov
> Sent: Friday, November 13, 2015 9:54 AM
> To: Alexandru Badicioiu
> Cc: LNG ODP Mailman List
> Subject: Re: [lng-odp] [API-NEXT PATCHv10 0/4] Egress Traffic Manager
> 
> On 11/13/2015 10:29, Alexandru Badicioiu wrote:
> > Compile with -march=armv8-a+crc.
> >
> > Alex
> >
> ok, now arm64 looks like work, but other arches broken:
> 
> ./configure --with-platform=linux-generic
> --prefix=/builds/check-odp-new.git/new-build --enable-test-perf
> --with-openssl-path=/builds/check-odp-new.git/installed/x86_64-
> i386/openssl-OpenSSL_1_0_1h
> --enable-test-vald
> --with-cunit-path=/builds/check-odp-new.git/installed/x86_64-
> i386/cunit-2.1-3
> CFLAGS=-m32 LDFLAGS=-m32
> odp_name_table.c: In function 'check_secondary_hash':
> odp_name_table.c:366:4: error: right shift count >= width of type [-
> Werror]
>  if ((hash_tbl_entry >> 48) == 0x7FFF)
>  ^
> odp_name_table.c:368:4: error: right shift count >= width of type [-
> Werror]
>  else if ((hash_tbl_entry >> 48) == 0)
>  ^
> cc1: all warnings being treated as errors
> 
___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp


Re: [lng-odp] [API-NEXT PATCHv10 0/4] Egress Traffic Manager

2015-11-13 Thread Alexandru Badicioiu
The crc32 definition should be between :
#elif defined(__arm__) || defined(__aarch64__)


#else
#error "Need to define PLATFORM_DEPENDENT_HASH32 macro"
#endif

so it should not affect a x86 build.

On 13 November 2015 at 09:54, Maxim Uvarov  wrote:

> On 11/13/2015 10:29, Alexandru Badicioiu wrote:
>
>> Compile with -march=armv8-a+crc.
>>
>> Alex
>>
>> ok, now arm64 looks like work, but other arches broken:
>
> ./configure --with-platform=linux-generic
> --prefix=/builds/check-odp-new.git/new-build --enable-test-perf
> --with-openssl-path=/builds/check-odp-new.git/installed/x86_64-i386/openssl-OpenSSL_1_0_1h
> --enable-test-vald
> --with-cunit-path=/builds/check-odp-new.git/installed/x86_64-i386/cunit-2.1-3
> CFLAGS=-m32 LDFLAGS=-m32
> odp_name_table.c: In function 'check_secondary_hash':
> odp_name_table.c:366:4: error: right shift count >= width of type [-Werror]
> if ((hash_tbl_entry >> 48) == 0x7FFF)
> ^
> odp_name_table.c:368:4: error: right shift count >= width of type [-Werror]
> else if ((hash_tbl_entry >> 48) == 0)
> ^
> cc1: all warnings being treated as errors
>
>
> ./configure --with-platform=linux-generic
> --prefix=/builds/check-odp-new.git/new-build --host=arm-linux-gnueabihf
> --enable-test-perf
> --with-openssl-path=/builds/check-odp-new.git/installed/arm/openssl-OpenSSL_1_0_1h
> --enable-test-vald
> --with-cunit-path=/builds/check-odp-new.git/installed/arm/cunit-2.1-3
> configure: WARNING: using cross tools not prefixed with host triplet
> odp_name_table.c: In function 'check_secondary_hash':
> odp_name_table.c:366:4: error: right shift count >= width of type [-Werror]
> if ((hash_tbl_entry >> 48) == 0x7FFF)
> ^
> odp_name_table.c:368:4: error: right shift count >= width of type [-Werror]
> else if ((hash_tbl_entry >> 48) == 0)
> ^
> odp_name_table.c: In function 'hash_name_and_kind':
> odp_name_table.c:158:2: error: invalid 'asm': invalid operand for code 'w'
>   __asm__("crc32w %w[c], %w[c], %w[v]":[c]"+r"(crc):[v]"r"(value));
>   ^
> odp_name_table.c:158:2: error: invalid 'asm': invalid operand for code 'w'
> odp_name_table.c:158:2: error: invalid 'asm': invalid operand for code 'w'
> odp_name_table.c:158:2: error: invalid 'asm': invalid operand for code 'w'
>   __asm__("crc32w %w[c], %w[c], %w[v]":[c]"+r"(crc):[v]"r"(value));
>   ^
> odp_name_table.c:158:2: error: invalid 'asm': invalid operand for code 'w'
> odp_name_table.c:158:2: error: invalid 'asm': invalid operand for code 'w'
> odp_name_table.c:158:2: error: invalid 'asm': invalid operand for code 'w'
>   __asm__("crc32w %w[c], %w[c], %w[v]":[c]"+r"(crc):[v]"r"(value));
>   ^
> odp_name_table.c:158:2: error: invalid 'asm': invalid operand for code 'w'
> odp_name_table.c:158:2: error: invalid 'asm': invalid operand for code 'w'
> odp_name_table.c:158:2: error: invalid 'asm': invalid operand for code 'w'
>   __asm__("crc32w %w[c], %w[c], %w[v]":[c]"+r"(crc):[v]"r"(value));
>   ^
> odp_name_table.c:158:2: error: invalid 'asm': invalid operand for code 'w'
> odp_name_table.c:158:2: error: invalid 'asm': invalid operand for code 'w'
> odp_pkt_queue.c: In function '_odp_queue_pool_create':
> odp_pkt_queue.c:218:9: error: cast from pointer to integer of different
> size [-Werror=pointer-to-int-cast]
>   return (_odp_int_queue_pool_t)pool;
>  ^
> odp_pkt_queue.c: In function '_odp_pkt_queue_create':
> odp_pkt_queue.c:226:9: error: cast to pointer from integer of different
> size [-Werror=int-to-pointer-cast]
>   pool = (queue_pool_t *)queue_pool;
>  ^
> odp_pkt_queue.c: In function '_odp_pkt_queue_append':
> odp_pkt_queue.c:242:9: error: cast to pointer from integer of different
> size [-Werror=int-to-pointer-cast]
>   pool = (queue_pool_t *)queue_pool;
>  ^
> odp_pkt_queue.c: In function '_odp_pkt_queue_remove':
> odp_pkt_queue.c:299:9: error: cast to pointer from integer of different
> size [-Werror=int-to-pointer-cast]
>   pool = (queue_pool_t *)queue_pool;
>  ^
> odp_pkt_queue.c: In function '_odp_pkt_queue_stats_print':
> odp_pkt_queue.c:350:9: error: cast to pointer from integer of different
> size [-Werror=int-to-pointer-cast]
>   pool = (queue_pool_t *)queue_pool;
>  ^
> odp_pkt_queue.c: In function '_odp_queue_pool_destroy':
> odp_pkt_queue.c:370:9: error: cast to pointer from integer of different
> size [-Werror=int-to-pointer-cast]
>   pool = (queue_pool_t *)queue_pool;
>
>
>
>
> On 13 November 2015 at 09:23, Maxim Uvarov > > wrote:
>>
>> now it compiles, but fails on execution in virtual machine:
>>
>> ./configure --with-platform=linux-generic
>> --prefix=/builds/check-odp-new.git/new-build
>> --host=aarch64-linux-gnu --enable-test-perf
>>
>> --with-openssl-path=/builds/check-odp-new.git/installed/arm64/openssl-OpenSSL_1_0_1h
>> --enable-test-vald
>>
>> --with-cunit-path=/builds/check-odp-new.git/installed/arm64/cunit-2.1-3
>> configure: WARNING: using cross tools not prefixed with host triplet
>> 

Re: [lng-odp] [API-NEXT PATCHv10 0/4] Egress Traffic Manager

2015-11-12 Thread Maxim Uvarov

On 11/13/2015 10:29, Alexandru Badicioiu wrote:

Compile with -march=armv8-a+crc.

Alex


ok, now arm64 looks like work, but other arches broken:

./configure --with-platform=linux-generic 
--prefix=/builds/check-odp-new.git/new-build --enable-test-perf 
--with-openssl-path=/builds/check-odp-new.git/installed/x86_64-i386/openssl-OpenSSL_1_0_1h 
--enable-test-vald 
--with-cunit-path=/builds/check-odp-new.git/installed/x86_64-i386/cunit-2.1-3 
CFLAGS=-m32 LDFLAGS=-m32

odp_name_table.c: In function 'check_secondary_hash':
odp_name_table.c:366:4: error: right shift count >= width of type [-Werror]
if ((hash_tbl_entry >> 48) == 0x7FFF)
^
odp_name_table.c:368:4: error: right shift count >= width of type [-Werror]
else if ((hash_tbl_entry >> 48) == 0)
^
cc1: all warnings being treated as errors


./configure --with-platform=linux-generic 
--prefix=/builds/check-odp-new.git/new-build --host=arm-linux-gnueabihf 
--enable-test-perf 
--with-openssl-path=/builds/check-odp-new.git/installed/arm/openssl-OpenSSL_1_0_1h 
--enable-test-vald 
--with-cunit-path=/builds/check-odp-new.git/installed/arm/cunit-2.1-3

configure: WARNING: using cross tools not prefixed with host triplet
odp_name_table.c: In function 'check_secondary_hash':
odp_name_table.c:366:4: error: right shift count >= width of type [-Werror]
if ((hash_tbl_entry >> 48) == 0x7FFF)
^
odp_name_table.c:368:4: error: right shift count >= width of type [-Werror]
else if ((hash_tbl_entry >> 48) == 0)
^
odp_name_table.c: In function 'hash_name_and_kind':
odp_name_table.c:158:2: error: invalid 'asm': invalid operand for code 'w'
  __asm__("crc32w %w[c], %w[c], %w[v]":[c]"+r"(crc):[v]"r"(value));
  ^
odp_name_table.c:158:2: error: invalid 'asm': invalid operand for code 'w'
odp_name_table.c:158:2: error: invalid 'asm': invalid operand for code 'w'
odp_name_table.c:158:2: error: invalid 'asm': invalid operand for code 'w'
  __asm__("crc32w %w[c], %w[c], %w[v]":[c]"+r"(crc):[v]"r"(value));
  ^
odp_name_table.c:158:2: error: invalid 'asm': invalid operand for code 'w'
odp_name_table.c:158:2: error: invalid 'asm': invalid operand for code 'w'
odp_name_table.c:158:2: error: invalid 'asm': invalid operand for code 'w'
  __asm__("crc32w %w[c], %w[c], %w[v]":[c]"+r"(crc):[v]"r"(value));
  ^
odp_name_table.c:158:2: error: invalid 'asm': invalid operand for code 'w'
odp_name_table.c:158:2: error: invalid 'asm': invalid operand for code 'w'
odp_name_table.c:158:2: error: invalid 'asm': invalid operand for code 'w'
  __asm__("crc32w %w[c], %w[c], %w[v]":[c]"+r"(crc):[v]"r"(value));
  ^
odp_name_table.c:158:2: error: invalid 'asm': invalid operand for code 'w'
odp_name_table.c:158:2: error: invalid 'asm': invalid operand for code 'w'
odp_pkt_queue.c: In function '_odp_queue_pool_create':
odp_pkt_queue.c:218:9: error: cast from pointer to integer of different 
size [-Werror=pointer-to-int-cast]

  return (_odp_int_queue_pool_t)pool;
 ^
odp_pkt_queue.c: In function '_odp_pkt_queue_create':
odp_pkt_queue.c:226:9: error: cast to pointer from integer of different 
size [-Werror=int-to-pointer-cast]

  pool = (queue_pool_t *)queue_pool;
 ^
odp_pkt_queue.c: In function '_odp_pkt_queue_append':
odp_pkt_queue.c:242:9: error: cast to pointer from integer of different 
size [-Werror=int-to-pointer-cast]

  pool = (queue_pool_t *)queue_pool;
 ^
odp_pkt_queue.c: In function '_odp_pkt_queue_remove':
odp_pkt_queue.c:299:9: error: cast to pointer from integer of different 
size [-Werror=int-to-pointer-cast]

  pool = (queue_pool_t *)queue_pool;
 ^
odp_pkt_queue.c: In function '_odp_pkt_queue_stats_print':
odp_pkt_queue.c:350:9: error: cast to pointer from integer of different 
size [-Werror=int-to-pointer-cast]

  pool = (queue_pool_t *)queue_pool;
 ^
odp_pkt_queue.c: In function '_odp_queue_pool_destroy':
odp_pkt_queue.c:370:9: error: cast to pointer from integer of different 
size [-Werror=int-to-pointer-cast]

  pool = (queue_pool_t *)queue_pool;




On 13 November 2015 at 09:23, Maxim Uvarov > wrote:


now it compiles, but fails on execution in virtual machine:

./configure --with-platform=linux-generic
--prefix=/builds/check-odp-new.git/new-build
--host=aarch64-linux-gnu --enable-test-perf

--with-openssl-path=/builds/check-odp-new.git/installed/arm64/openssl-OpenSSL_1_0_1h
--enable-test-vald
--with-cunit-path=/builds/check-odp-new.git/installed/arm64/cunit-2.1-3
configure: WARNING: using cross tools not prefixed with host triplet
/tmp/ccQvP04V.s: Assembler messages:
/tmp/ccQvP04V.s:200: Error: selected processor does not support
`crc32w w3,w3,w0'
/tmp/ccQvP04V.s:239: Error: selected processor does not support
`crc32w w3,w3,w20'
/tmp/ccQvP04V.s:254: Error: selected processor does not support
`crc32w w3,w3,w0'
/tmp/ccQvP04V.s:285: Error: selected processor does not support
`crc32w w0,w0,w2'


I think we need to check u

Re: [lng-odp] [API-NEXT PATCHv10 0/4] Egress Traffic Manager

2015-11-12 Thread Alexandru Badicioiu
Compile with -march=armv8-a+crc.

Alex

On 13 November 2015 at 09:23, Maxim Uvarov  wrote:

> now it compiles, but fails on execution in virtual machine:
>
> ./configure --with-platform=linux-generic
> --prefix=/builds/check-odp-new.git/new-build --host=aarch64-linux-gnu
> --enable-test-perf
> --with-openssl-path=/builds/check-odp-new.git/installed/arm64/openssl-OpenSSL_1_0_1h
> --enable-test-vald
> --with-cunit-path=/builds/check-odp-new.git/installed/arm64/cunit-2.1-3
> configure: WARNING: using cross tools not prefixed with host triplet
> /tmp/ccQvP04V.s: Assembler messages:
> /tmp/ccQvP04V.s:200: Error: selected processor does not support `crc32w
> w3,w3,w0'
> /tmp/ccQvP04V.s:239: Error: selected processor does not support `crc32w
> w3,w3,w20'
> /tmp/ccQvP04V.s:254: Error: selected processor does not support `crc32w
> w3,w3,w0'
> /tmp/ccQvP04V.s:285: Error: selected processor does not support `crc32w
> w0,w0,w2'
>
>
> I think we need to check under ./configure if crc32 is supported then turn
> on that #ifdef branch.
>
> Maxim.
>
>
> On 11/12/2015 19:36, Bill Fischofer wrote:
>
>> Changes in v10
>> - Add back ARM definitions for _crc32w() from Alex that got dropped in v9
>>
>> Note: Checkpatch complains about the _asm() line.  Says spaces are needed
>> but
>> if spaces are added then complains that spaces are prohibited.  Rules
>> need to
>> be updated to ignore these sort of constructs.
>>
>> Changes in v9
>> - Rebase on top of latest queue fixes
>>
>> Changes in v8
>> - add ARM definition for __crc32w() function (from Alex)
>>
>> Changes in v7 (review comments by Maxim)
>> - Correct architecture ifdefs (use of arch dir in later patch)
>> - Correct doxygen for queue types
>> - Change internal APIs that use odp_ prefix to use _odp prefix
>> - Rebase to latest api-next
>>
>> Changes in v6
>> - Move documentation of packet colors to main API file
>> - Add ODP prefix to odp_tm_egress_kind_t enums
>>
>> Changes in v5
>> - Add include file odp_traffic_mngr_internal.h
>> - Add support for odp_tm_enq() from packets originating from ordered
>> queues
>>
>> Changes in v4
>> - Incorporate API changes suggested by Petri
>>
>> Changes in v3
>> - Fix checkpatch errors (Bill)
>>
>> Changes in v2
>> - Full patch submission (Barry)
>>
>> Barry Spinney (4):
>>api: tm: add tm API definitions
>>linux-generic: tm: implement traffic manager
>>linux-generic: tm: add tm to build
>>example: tm: traffic manager example
>>
>>   configure.ac   |1 +
>>   example/Makefile.am|2 +-
>>   example/traffic_mgmt/.gitignore|1 +
>>   example/traffic_mgmt/Makefile.am   |9 +
>>   example/traffic_mgmt/odp_traffic_mgmt.c|  781 ++
>>   include/odp.h  |1 +
>>   include/odp/api/packet.h   |   69 +
>>   include/odp/api/traffic_mngr.h | 1611 +++
>>   platform/linux-generic/Makefile.am |   13 +
>>   .../linux-generic/include/odp/plat/packet_types.h  |   11 +
>>   .../linux-generic/include/odp/plat/queue_types.h   |7 +
>>   .../include/odp/plat/traffic_mngr_types.h  |  185 ++
>>   platform/linux-generic/include/odp/traffic_mngr.h  |   35 +
>>   platform/linux-generic/include/odp_internal.h  |2 +
>>   .../include/odp_name_table_internal.h  |   61 +
>>   .../linux-generic/include/odp_packet_internal.h|5 +
>>   .../linux-generic/include/odp_pkt_queue_internal.h |   62 +
>>   .../linux-generic/include/odp_queue_internal.h |6 +
>>   .../include/odp_sorted_list_internal.h |   78 +
>>   .../include/odp_timer_wheel_internal.h |   68 +
>>   .../include/odp_traffic_mngr_internal.h|  324 +++
>>   platform/linux-generic/odp_init.c  |5 +
>>   platform/linux-generic/odp_name_table.c| 1371 ++
>>   platform/linux-generic/odp_packet_flags.c  |   46 +-
>>   platform/linux-generic/odp_pkt_queue.c |  379 +++
>>   platform/linux-generic/odp_queue.c |   60 +
>>   platform/linux-generic/odp_sorted_list.c   |  271 ++
>>   platform/linux-generic/odp_timer_wheel.c   |  907 +++
>>   platform/linux-generic/odp_traffic_mngr.c  | 2799
>> 
>>   29 files changed, 9168 insertions(+), 2 deletions(-)
>>   create mode 100644 example/traffic_mgmt/.gitignore
>>   create mode 100644 example/traffic_mgmt/Makefile.am
>>   create mode 100644 example/traffic_mgmt/odp_traffic_mgmt.c
>>   create mode 100644 include/odp/api/traffic_mngr.h
>>   create mode 100644
>> platform/linux-generic/include/odp/plat/traffic_mngr_types.h
>>   create mode 100644 platform/linux-generic/include/odp/traffic_mngr.h
>>   create mode 100644
>> platform/linux-generic/include/odp_name_table_internal.h
>>   create mode 100644
>> platform/linux-generic/include/

Re: [lng-odp] [API-NEXT PATCHv10 0/4] Egress Traffic Manager

2015-11-12 Thread Maxim Uvarov

now it compiles, but fails on execution in virtual machine:

./configure --with-platform=linux-generic 
--prefix=/builds/check-odp-new.git/new-build --host=aarch64-linux-gnu 
--enable-test-perf 
--with-openssl-path=/builds/check-odp-new.git/installed/arm64/openssl-OpenSSL_1_0_1h 
--enable-test-vald 
--with-cunit-path=/builds/check-odp-new.git/installed/arm64/cunit-2.1-3

configure: WARNING: using cross tools not prefixed with host triplet
/tmp/ccQvP04V.s: Assembler messages:
/tmp/ccQvP04V.s:200: Error: selected processor does not support `crc32w 
w3,w3,w0'
/tmp/ccQvP04V.s:239: Error: selected processor does not support `crc32w 
w3,w3,w20'
/tmp/ccQvP04V.s:254: Error: selected processor does not support `crc32w 
w3,w3,w0'
/tmp/ccQvP04V.s:285: Error: selected processor does not support `crc32w 
w0,w0,w2'



I think we need to check under ./configure if crc32 is supported then 
turn on that #ifdef branch.


Maxim.

On 11/12/2015 19:36, Bill Fischofer wrote:

Changes in v10
- Add back ARM definitions for _crc32w() from Alex that got dropped in v9

Note: Checkpatch complains about the _asm() line.  Says spaces are needed but
if spaces are added then complains that spaces are prohibited.  Rules need to
be updated to ignore these sort of constructs.

Changes in v9
- Rebase on top of latest queue fixes

Changes in v8
- add ARM definition for __crc32w() function (from Alex)

Changes in v7 (review comments by Maxim)
- Correct architecture ifdefs (use of arch dir in later patch)
- Correct doxygen for queue types
- Change internal APIs that use odp_ prefix to use _odp prefix
- Rebase to latest api-next

Changes in v6
- Move documentation of packet colors to main API file
- Add ODP prefix to odp_tm_egress_kind_t enums

Changes in v5
- Add include file odp_traffic_mngr_internal.h
- Add support for odp_tm_enq() from packets originating from ordered queues

Changes in v4
- Incorporate API changes suggested by Petri

Changes in v3
- Fix checkpatch errors (Bill)

Changes in v2
- Full patch submission (Barry)

Barry Spinney (4):
   api: tm: add tm API definitions
   linux-generic: tm: implement traffic manager
   linux-generic: tm: add tm to build
   example: tm: traffic manager example

  configure.ac   |1 +
  example/Makefile.am|2 +-
  example/traffic_mgmt/.gitignore|1 +
  example/traffic_mgmt/Makefile.am   |9 +
  example/traffic_mgmt/odp_traffic_mgmt.c|  781 ++
  include/odp.h  |1 +
  include/odp/api/packet.h   |   69 +
  include/odp/api/traffic_mngr.h | 1611 +++
  platform/linux-generic/Makefile.am |   13 +
  .../linux-generic/include/odp/plat/packet_types.h  |   11 +
  .../linux-generic/include/odp/plat/queue_types.h   |7 +
  .../include/odp/plat/traffic_mngr_types.h  |  185 ++
  platform/linux-generic/include/odp/traffic_mngr.h  |   35 +
  platform/linux-generic/include/odp_internal.h  |2 +
  .../include/odp_name_table_internal.h  |   61 +
  .../linux-generic/include/odp_packet_internal.h|5 +
  .../linux-generic/include/odp_pkt_queue_internal.h |   62 +
  .../linux-generic/include/odp_queue_internal.h |6 +
  .../include/odp_sorted_list_internal.h |   78 +
  .../include/odp_timer_wheel_internal.h |   68 +
  .../include/odp_traffic_mngr_internal.h|  324 +++
  platform/linux-generic/odp_init.c  |5 +
  platform/linux-generic/odp_name_table.c| 1371 ++
  platform/linux-generic/odp_packet_flags.c  |   46 +-
  platform/linux-generic/odp_pkt_queue.c |  379 +++
  platform/linux-generic/odp_queue.c |   60 +
  platform/linux-generic/odp_sorted_list.c   |  271 ++
  platform/linux-generic/odp_timer_wheel.c   |  907 +++
  platform/linux-generic/odp_traffic_mngr.c  | 2799 
  29 files changed, 9168 insertions(+), 2 deletions(-)
  create mode 100644 example/traffic_mgmt/.gitignore
  create mode 100644 example/traffic_mgmt/Makefile.am
  create mode 100644 example/traffic_mgmt/odp_traffic_mgmt.c
  create mode 100644 include/odp/api/traffic_mngr.h
  create mode 100644 
platform/linux-generic/include/odp/plat/traffic_mngr_types.h
  create mode 100644 platform/linux-generic/include/odp/traffic_mngr.h
  create mode 100644 platform/linux-generic/include/odp_name_table_internal.h
  create mode 100644 platform/linux-generic/include/odp_pkt_queue_internal.h
  create mode 100644 platform/linux-generic/include/odp_sorted_list_internal.h
  create mode 100644 platform/linux-generic/include/odp_timer_wheel_internal.h
  create mode 100644 platform/linux-generic/include/odp_traffic_mngr_internal.h
  create mode 100644 platform/linux-generic/odp_name_table.c
  create mode 100644 platform/linux-generic/odp_pkt_q

[lng-odp] [API-NEXT PATCHv10 0/4] Egress Traffic Manager

2015-11-12 Thread Bill Fischofer
Changes in v10
- Add back ARM definitions for _crc32w() from Alex that got dropped in v9

Note: Checkpatch complains about the _asm() line.  Says spaces are needed but
if spaces are added then complains that spaces are prohibited.  Rules need to
be updated to ignore these sort of constructs.

Changes in v9
- Rebase on top of latest queue fixes

Changes in v8
- add ARM definition for __crc32w() function (from Alex)

Changes in v7 (review comments by Maxim)
- Correct architecture ifdefs (use of arch dir in later patch)
- Correct doxygen for queue types
- Change internal APIs that use odp_ prefix to use _odp prefix
- Rebase to latest api-next

Changes in v6
- Move documentation of packet colors to main API file
- Add ODP prefix to odp_tm_egress_kind_t enums

Changes in v5
- Add include file odp_traffic_mngr_internal.h
- Add support for odp_tm_enq() from packets originating from ordered queues

Changes in v4
- Incorporate API changes suggested by Petri

Changes in v3
- Fix checkpatch errors (Bill)

Changes in v2
- Full patch submission (Barry)

Barry Spinney (4):
  api: tm: add tm API definitions
  linux-generic: tm: implement traffic manager
  linux-generic: tm: add tm to build
  example: tm: traffic manager example

 configure.ac   |1 +
 example/Makefile.am|2 +-
 example/traffic_mgmt/.gitignore|1 +
 example/traffic_mgmt/Makefile.am   |9 +
 example/traffic_mgmt/odp_traffic_mgmt.c|  781 ++
 include/odp.h  |1 +
 include/odp/api/packet.h   |   69 +
 include/odp/api/traffic_mngr.h | 1611 +++
 platform/linux-generic/Makefile.am |   13 +
 .../linux-generic/include/odp/plat/packet_types.h  |   11 +
 .../linux-generic/include/odp/plat/queue_types.h   |7 +
 .../include/odp/plat/traffic_mngr_types.h  |  185 ++
 platform/linux-generic/include/odp/traffic_mngr.h  |   35 +
 platform/linux-generic/include/odp_internal.h  |2 +
 .../include/odp_name_table_internal.h  |   61 +
 .../linux-generic/include/odp_packet_internal.h|5 +
 .../linux-generic/include/odp_pkt_queue_internal.h |   62 +
 .../linux-generic/include/odp_queue_internal.h |6 +
 .../include/odp_sorted_list_internal.h |   78 +
 .../include/odp_timer_wheel_internal.h |   68 +
 .../include/odp_traffic_mngr_internal.h|  324 +++
 platform/linux-generic/odp_init.c  |5 +
 platform/linux-generic/odp_name_table.c| 1371 ++
 platform/linux-generic/odp_packet_flags.c  |   46 +-
 platform/linux-generic/odp_pkt_queue.c |  379 +++
 platform/linux-generic/odp_queue.c |   60 +
 platform/linux-generic/odp_sorted_list.c   |  271 ++
 platform/linux-generic/odp_timer_wheel.c   |  907 +++
 platform/linux-generic/odp_traffic_mngr.c  | 2799 
 29 files changed, 9168 insertions(+), 2 deletions(-)
 create mode 100644 example/traffic_mgmt/.gitignore
 create mode 100644 example/traffic_mgmt/Makefile.am
 create mode 100644 example/traffic_mgmt/odp_traffic_mgmt.c
 create mode 100644 include/odp/api/traffic_mngr.h
 create mode 100644 platform/linux-generic/include/odp/plat/traffic_mngr_types.h
 create mode 100644 platform/linux-generic/include/odp/traffic_mngr.h
 create mode 100644 platform/linux-generic/include/odp_name_table_internal.h
 create mode 100644 platform/linux-generic/include/odp_pkt_queue_internal.h
 create mode 100644 platform/linux-generic/include/odp_sorted_list_internal.h
 create mode 100644 platform/linux-generic/include/odp_timer_wheel_internal.h
 create mode 100644 platform/linux-generic/include/odp_traffic_mngr_internal.h
 create mode 100644 platform/linux-generic/odp_name_table.c
 create mode 100644 platform/linux-generic/odp_pkt_queue.c
 create mode 100644 platform/linux-generic/odp_sorted_list.c
 create mode 100644 platform/linux-generic/odp_timer_wheel.c
 create mode 100644 platform/linux-generic/odp_traffic_mngr.c

-- 
2.1.4

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