Re: [dpdk-dev] Stable ABI status of rte_meter_[t|s]rtcm_profile_config

2018-08-01 Thread Andy Green
On 08/01/2018 06:47 PM, Kevin Traynor wrote: On 05/28/2018 04:31 AM, Andy Green wrote: Hi - Between 18.02 and the putative 18.05 there were changes in the way the meter stuff deals with its config. I updated the related code in lagopus, but I get warnings about using the new APIs (it'

Re: [dpdk-dev] Stable ABI status of rte_meter_[t|s]rtcm_profile_config

2018-05-30 Thread Andy Green
On 05/30/2018 05:55 PM, Singh, Jasvinder wrote: On 05/28/2018 11:31 AM, Andy Green wrote: Hi - Between 18.02 and the putative 18.05 there were changes in the way the meter stuff deals with its config. I updated the related code in lagopus, but I get warnings about using the new APIs

Re: [dpdk-dev] Stable ABI status of rte_meter_[t|s]rtcm_profile_config

2018-05-29 Thread Andy Green
On 05/28/2018 11:31 AM, Andy Green wrote: Hi - Between 18.02 and the putative 18.05 there were changes in the way the meter stuff deals with its config. I updated the related code in lagopus, but I get warnings about using the new APIs (it's the same for rte_meter_trtcm_profile_c

[dpdk-dev] [PATCH v2 2/2] ring: fix sign conversion warning

2018-05-28 Thread Andy Green
the sign of the result [-Wsign-conversion] n = __rte_ring_move_cons_head(r, is_sc, n, behavior, ^ Signed-off-by: Andy Green Fixes: e8ed5056c8 ("ring: remove signed type flip-flopping") ^ --- lib/librte_ring

[dpdk-dev] [PATCH v2 0/2] dpdk header fixes for aarch64

2018-05-28 Thread Andy Green
On Xenial / 16.04 native aarch64 build with gcc 5.4.0, lagopus build finds a couple more issues hiding in dpdk headers. --- Andy Green (2): ring: fix declaration after code ring: fix sign conversion warning lib/librte_ring/rte_ring.h |2 +- lib/librte_ring

[dpdk-dev] [PATCH v2 1/2] ring: fix declaration after code

2018-05-28 Thread Andy Green
d declarations and code [-Wdeclaration-after-statement] const uint32_t prod_tail = r->prod.tail; ^ Signed-off-by: Andy Green Fixes: 39368ebfc6 ("ring: introduce C11 memory model barrier option") --- lib/librte_ring/rte_ring_c11_mem.h |8 1 file changed, 4 insertions(

Re: [dpdk-dev] [PATCH 1/2] ring: fix declaration after code

2018-05-28 Thread Andy Green
On 05/28/2018 04:15 PM, Gavin Hu wrote: do { +const uint32_t cons_tail = r->cons.tail; + /* Reset n to the initial burst count */ n = max; *old_head = __atomic_load_n(&r->prod.head, __ATOMIC_ACQUIRE); -const uint32_t cons_tail = r->cons.tail; + [Gavin Hu] The ACQUIRE and RELEASE pai

[dpdk-dev] Stable ABI status of rte_meter_[t|s]rtcm_profile_config

2018-05-27 Thread Andy Green
Hi - Between 18.02 and the putative 18.05 there were changes in the way the meter stuff deals with its config. I updated the related code in lagopus, but I get warnings about using the new APIs (it's the same for rte_meter_trtcm_profile_config()) ./dpdk/meter.c: In function 'dpdk_register_m

[dpdk-dev] [PATCH 0/2] dpdk header fixes for aarch64

2018-05-27 Thread Andy Green
On Xenial / 16.04 native aarch64 build with gcc 5.4.0, lagopus build finds a couple more issues hiding in dpdk headers. --- Andy Green (2): ring: fix declaration after code ring: fix sign conversion warning lib/librte_ring/rte_ring.h |2 +- lib/librte_ring

[dpdk-dev] [PATCH 2/2] ring: fix sign conversion warning

2018-05-27 Thread Andy Green
the sign of the result [-Wsign-conversion] n = __rte_ring_move_cons_head(r, is_sc, n, behavior, ^ Signed-off-by: Andy Green Fixes: e8ed5056c8 ("ring: remove signed type flip-flopping") ^ --- lib/librte_ring

[dpdk-dev] [PATCH 1/2] ring: fix declaration after code

2018-05-27 Thread Andy Green
d declarations and code [-Wdeclaration-after-statement] const uint32_t prod_tail = r->prod.tail; ^ Signed-off-by: Andy Green Fixes: 39368ebfc6 ("ring: introduce C11 memory model barrier option") --- lib/librte_ring/rte_ring_c11_mem.h |8 ++-- 1 file changed, 6 insertions(

Re: [dpdk-dev] [PATCH v7 0/8] Fixes for GCC8 against lagopus

2018-05-22 Thread Andy Green
On 05/22/2018 05:13 PM, Bruce Richardson wrote: On Tue, May 22, 2018 at 09:24:07AM +0800, Andy Green wrote: The following series fixes build problems in dpdk master headers, found when using it as the dpdk subproject in lagopus. These errors are coming when you try to use the dpdk headers

Re: [dpdk-dev] [PATCH v6 5/8] rte_mbuf.h: avoid implicit demotion in 64-bit arith

2018-05-21 Thread Andy Green
On 05/21/2018 08:27 PM, Bruce Richardson wrote: On Mon, May 21, 2018 at 10:01:18AM +0800, Andy Green wrote: /projects/lagopus/src/dpdk/build/include/rte_mbuf.h: In function 'rte_validate_tx_offload': /projects/lagopus/src/dpdk/build/include/rte_mbuf.h: 2112:19: warning: con

[dpdk-dev] [PATCH v7 6/8] rte_mbuf.h: choose correct type for temp

2018-05-21 Thread Andy Green
); ^~~ The temp is consumed as a size_t. So let's make it a size_t in the first place. Fixes: 1feda4d8fc ("mbuf: add a function to linearize a packet") Signed-off-by: Andy Green Acked-by: Bruce Richardson --- lib/librte_mbuf

Re: [dpdk-dev] [PATCH v6 8/8] rte_ethdev.h: align sign and scope of temp var

2018-05-21 Thread Andy Green
On 05/21/2018 09:30 PM, Bruce Richardson wrote: On Mon, May 21, 2018 at 10:01:33AM +0800, Andy Green wrote: /projects/lagopus/src/dpdk/build/include/rte_ethdev.h: In function 'rte_eth_rx_burst': /projects/lagopus/src/dpdk/build/include/rte_ethdev.h: 3836:18: warning: conversion t

[dpdk-dev] [PATCH v7 7/8] rte_mbuf.h: add and subtract explicitly to avoid promotion

2018-05-21 Thread Andy Green
agopus/src/dpdk/build/include/rte_mbuf.h: 2082:19: warning: conversion from 'int' to 'uint16_t' {aka 'short unsigned int'} may change value [-Wconversion] head->nb_segs += tail->nb_segs; ^~~~ Also uint16_t uint1

[dpdk-dev] [PATCH v7 8/8] rte_ethdev.h: align sign and scope of temp var

2018-05-21 Thread Andy Green
it is inside a preprocessor conditional. Bringing the declaration of the var to the top of the function would require that also being given its own preprocessor conditional, or a (void)var to avoid an unused var warning. The basic block is no worse than those imho. Signed-off-by: Andy Green

[dpdk-dev] [PATCH v7 0/8] Fixes for GCC8 against lagopus

2018-05-21 Thread Andy Green
applied in this version. --- Andy Green (8): lib/librte_eal: change type of tmp rte_rwlock.h: gcc8 sign conversion warnings rte_ip.h: cast type decided by sizeof to uint32 rte_mbuf.h: reduce temp to match uint16 types rte_mbuf.h: avoid implicit demotion in 64-bit arith

[dpdk-dev] [PATCH v7 2/8] rte_rwlock.h: gcc8 sign conversion warnings

2018-05-21 Thread Andy Green
, it has always been implicitly cast to uint32_t when it is used in the arguments to rte_atomic32_cmpset()... gcc8.1 objects to the implicit cast now and requires us to cast it explicitly. Fixes: af75078fec ("first public release") Signed-off-by: Andy Green Acked-by: Bruce Richardson ---

[dpdk-dev] [PATCH v7 4/8] rte_mbuf.h: reduce temp to match uint16 types

2018-05-21 Thread Andy Green
;mbuf: fix cloning with private mbuf data") Fixes: 1a60a0daa6 ("mbuf: fix segments number type increase") Signed-off-by: Andy Green Acked-by: Bruce Richardson --- lib/librte_mbuf/rte_mbuf.h |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/librte_mbuf/rte_mbu

[dpdk-dev] [PATCH v7 1/8] lib/librte_eal: change type of tmp

2018-05-21 Thread Andy Green
h: 618:13: warning: conversion to 'size_t' {aka 'long unsigned int'} from 'int' may change the sign of the result [-Wsign-conversion] tmp -= len; ^~ We can eliminate the problems by setting the type of tmp to size_t in the fir

[dpdk-dev] [PATCH v7 3/8] rte_ip.h: cast type decided by sizeof to uint32

2018-05-21 Thread Andy Green
unsigned long. So the error actually relates to the result of the outer subtraction. The actual error is "you are trying to put an unsigned long into a uint32_t". We always did so, the fix is just to inform the compiler it is intentional with an explicit cast. Fixes: 6006818cfb (&

[dpdk-dev] [PATCH v7 5/8] rte_mbuf.h: avoid implicit demotion in 64-bit arith

2018-05-21 Thread Andy Green
Length. */ We want to do the arithmetic entirely in uint64_t space, but with the +=, the rhs type becomes int since the bitfields will fit in int. Elaborate the artithmetic to be u64 = u64 + int + int, so the type of the result is correct to be stored in the u64. Fixes: 4fb7e803eb ("ethdev:

[dpdk-dev] [PATCH] lib/librte_eal: change type of tmp

2018-05-21 Thread Andy Green
h: 618:13: warning: conversion to 'size_t' {aka 'long unsigned int'} from 'int' may change the sign of the result [-Wsign-conversion] tmp -= len; ^~ We can eliminate the problems by setting the type of tmp to size_t in the fir

Re: [dpdk-dev] [PATCH v5 01/21] lib/librte_ethdev: change eth-dev-ops API to return int

2018-05-21 Thread Andy Green
On 05/21/2018 02:52 PM, Stephen Hemminger wrote: On Sun, 20 May 2018 02:43:58 + Shreyansh Jain wrote: This doesn't feel correct. A counter, especially the number of descriptors in a queue, doesn't have a negative value. So, 1) this is an unnatural return and 2) we litter the code with u

Re: [dpdk-dev] [PATCH v5 00/21] Fixes for GCC8 against lagopus

2018-05-20 Thread Andy Green
On 05/21/2018 06:18 AM, Thomas Monjalon wrote: Andy Green (21): lib/librte_ethdev: change eth-dev-ops API to return int rte_string_fns.h: fix gcc8.1 sign conv warning in lstrcpy lib/librte_eal: explicit tmp cast /lib/librte_eal: stage cast from uint64 to long

[dpdk-dev] [PATCH v6 7/8] rte_mbuf.h: add and subtract explicitly to avoid promotion

2018-05-20 Thread Andy Green
agopus/src/dpdk/build/include/rte_mbuf.h: 2082:19: warning: conversion from 'int' to 'uint16_t' {aka 'short unsigned int'} may change value [-Wconversion] head->nb_segs += tail->nb_segs; ^~~~ Also uint16_t

[dpdk-dev] [PATCH v6 6/8] rte_mbuf.h: choose correct type for temp

2018-05-20 Thread Andy Green
); ^~~ The temp is consumed as a size_t. So let's make it a size_t in the first place. Fixes: 1feda4d8fc ("mbuf: add a function to linearize a packet") Signed-off-by: Andy Green --- lib/librte_mbuf/rte_mbuf.h |2 +- 1 file

[dpdk-dev] [PATCH v6 5/8] rte_mbuf.h: avoid implicit demotion in 64-bit arith

2018-05-20 Thread Andy Green
Length. */ We want to do the arithmetic entirely in uint64_t space, but there is an implicit demotion to int created by the +=. Remove the +=. Fixes: 4fb7e803eb ("ethdev: add Tx preparation") Signed-off-by: Andy Green --- lib/librte_mbuf/rte_mbuf.h |3 ++- 1 file changed, 2 inserti

[dpdk-dev] [PATCH v6 8/8] rte_ethdev.h: align sign and scope of temp var

2018-05-20 Thread Andy Green
it is inside a preprocessor conditional. Bringing the declaration of the var to the top of the function would require that also being given its own preprocessor conditional, or a (void)var to avoid an unused var warning. The basic block is no worse than those imho. Signed-off-by: Andy Green

[dpdk-dev] [PATCH v6 0/8] Fixes for GCC8 against lagopus

2018-05-20 Thread Andy Green
clarity. There is no new patch content. Extra explanation is added (along with Fixes: already). I confirmed with master plus these patches, the only remaing compile errors in lagopus are from lagopus itself. --- Andy Green (8): lib/librte_eal: explicit tmp cast rte_rwlock.h: gcc8

[dpdk-dev] [PATCH v6 1/8] lib/librte_eal: explicit tmp cast

2018-05-20 Thread Andy Green
e sign of the result [-Wsign-conversion] tmp -= len; ^~ int tmp; ... -tmp -= len; +tmp -= (int)len; Signed-off-by: Andy Green Fixes: d35cc1fe6a ("eal/x86: revert select optimized memcpy at run-time") --- .../common/include/arch/x86/rte_m

[dpdk-dev] [PATCH v6 4/8] rte_mbuf.h: reduce temp to match uint16 types

2018-05-20 Thread Andy Green
;mbuf: fix cloning with private mbuf data") Fixes: 1a60a0daa6 ("mbuf: fix segments number type increase") Signed-off-by: Andy Green --- lib/librte_mbuf/rte_mbuf.h |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbu

[dpdk-dev] [PATCH v6 2/8] rte_rwlock.h: gcc8 sign conversion warnings

2018-05-20 Thread Andy Green
, it has always been implicitly cast to uint32_t when it is used in the arguments to rte_atomic32_cmpset()... gcc8.1 objects to the implicit cast now and requires us to cast it explicitly. Fixes: af75078fec ("first public release") Signed-off-by: Andy Green --- lib/librte_eal/common/include/g

[dpdk-dev] [PATCH v6 3/8] rte_ip.h: cast type decided by sizeof to uint32

2018-05-20 Thread Andy Green
unsigned long. So the error actually relates to the result of the outer subtraction. The actual error is "you are trying to put an unsigned long into a uint32_t". We always did so, the fix is just to inform the compiler it is intentional with an explicit cast. Fixes: 6006818cfb (&qu

Re: [dpdk-dev] [PATCH v5 01/21] lib/librte_ethdev: change eth-dev-ops API to return int

2018-05-19 Thread Andy Green
On 05/20/2018 10:43 AM, Shreyansh Jain wrote: -Original Message- From: Andy Green [mailto:a...@warmcat.com] Sent: Friday, May 18, 2018 4:42 PM To: Shreyansh Jain ; dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v5 01/21] lib/librte_ethdev: change eth- dev-ops API to return int On 05/18

[dpdk-dev] [PATCH] rte_ethdev.h: fix gcc8.1 sign conversion warining

2018-05-18 Thread Andy Green
esult [-Wsign-conversion] return (*dev->dev_ops->rx_queue_count)(dev, queue_id); ~^~~~~~~~~ Signed-off-by: Andy Green Fixes: 439a90b5f2 ("ethdev: reorder inline functions") --- lib/librte_ethdev/rte_ethdev.h |2 +- 1 file

Re: [dpdk-dev] [PATCH v5 01/21] lib/librte_ethdev: change eth-dev-ops API to return int

2018-05-18 Thread Andy Green
On 05/18/2018 06:59 PM, Shreyansh Jain wrote: -Original Message- From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Andy Green Sent: Thursday, May 17, 2018 7:19 PM To: dev@dpdk.org Subject: [dpdk-dev] [PATCH v5 01/21] lib/librte_ethdev: change eth-dev- ops API to return int Signed

Re: [dpdk-dev] [PATCH v4 15/23] rte_ethdev.h: align sign and scope of temp var

2018-05-17 Thread Andy Green
On 05/17/2018 09:54 PM, Bruce Richardson wrote: On Mon, May 14, 2018 at 01:10:43PM +0800, Andy Green wrote: Signed-off-by: Andy Green --- lib/librte_ethdev/rte_ethdev.h | 25 +++-- 1 file changed, 15 insertions(+), 10 deletions(-) While I dislike the changes below

Re: [dpdk-dev] [PATCH v5 01/21] lib/librte_ethdev: change eth-dev-ops API to return int

2018-05-17 Thread Andy Green
On 05/17/2018 09:55 PM, Bruce Richardson wrote: On Thu, May 17, 2018 at 09:48:57PM +0800, Andy Green wrote: Signed-off-by: Andy Green --- What's the reason for this change of type? I was asked to do it on the list... the original patch I sent was triggered by gcc8 warnings and

[dpdk-dev] [PATCH] rte_string_fns.h: fix gcc8.1 sign conv warning in lstrcpy

2018-05-17 Thread Andy Green
' may change the sign of the result [-Wsign-conversion] return snprintf(dst, size, "%s", src); ^~~~~~ Signed-off-by: Andy Green --- lib/librte_eal/common/include/rte_string_fns.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib

[dpdk-dev] [PATCH v5 21/21] rte_byteorder.h: explicit cast for return promotion

2018-05-17 Thread Andy Green
der.h:126:9: note: in expansion of macro 'RTE_STATIC_BSWAP16' return RTE_STATIC_BSWAP16(x); ^~ The other two sizes are going to be afflicted the same, so get the same fix. Signed-off-by: Andy Green --- .../common/include/generic/rte_byteorder.h |6 +++

[dpdk-dev] [PATCH v5 20/21] rte_ethdev.h: align sign and scope of temp var

2018-05-17 Thread Andy Green
: 3851:9: warning: conversion to 'uint16_t' {aka 'short unsigned int'} from 'int16_t' {aka 'short int'} may change the sign of the result [-Wsign-conversion] return nb_rx; ^ Signed-off-by: Andy Green --- lib/librte_ethdev/rte_ethdev.h |

[dpdk-dev] [PATCH v5 19/21] rte_mbuf.h: explicit casts to uint16 to avoid warnings

2018-05-17 Thread Andy Green
buf_data_len(mbuf); ^~~ /projects/lagopus/src/dpdk/build/include/rte_mbuf.h: 2180:51: warning: conversion to 'size_t' {aka 'long unsigned int'} from 'int' may change the sign of the result [-Wsign-conversion] rte_memcpy(buffer, rte_pktmbuf_

[dpdk-dev] [PATCH v5 15/21] rte_ip.h: cast type decided by sizeof to uint32

2018-05-17 Thread Andy Green
/projects/lagopus/src/dpdk/build/include/rte_ip.h:321:11: note: in expansion of macro 'rte_be_to_cpu_16' l4_len = rte_be_to_cpu_16(ipv4_hdr->total_length) - ^~~~ Signed-off-by: Andy Green --- lib/librte_net/rte_ip.h |4 ++-- 1 file changed, 2 insertions

[dpdk-dev] [PATCH v5 18/21] rte_mbuf.h: explicit cast for size type to uint32

2018-05-17 Thread Andy Green
on] mbuf_size = sizeof(struct rte_mbuf) + priv_size; ^~ Signed-off-by: Andy Green --- lib/librte_mbuf/rte_mbuf.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h index 0580ec8a0..7849192c6 100644 --

[dpdk-dev] [PATCH v5 13/21] rte_ip.h: cast input to bswap16 to be uint16

2018-05-17 Thread Andy Green
opus/src/dpdk/build/include/ rte_byteorder.h:53:25: note: in definition of macro 'rte_bswap16' rte_arch_bswap16(x))) ^ Signed-off-by: Andy Green --- lib/librte_net/rte_ip.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/l

[dpdk-dev] [PATCH v5 17/21] rte_ip.h: cast away gcc8 warning on rte_ipv6_phdr_cksum

2018-05-17 Thread Andy Green
-conversion] psd_hdr.proto = (ipv6_hdr->proto << 24); Signed-off-by: Andy Green --- lib/librte_net/rte_ip.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_net/rte_ip.h b/lib/librte_net/rte_ip.h index c46398548..72dc2456a 100644 --- a/lib/librte_net/rte_ip

[dpdk-dev] [PATCH v5 16/21] rte_ip.h: cast return checksum size to uint16

2018-05-17 Thread Andy Green
^ /projects/lagopus/src/dpdk/build/include/rte_ip.h: In function 'rte_ipv6_udptcp_cksum': /projects/lagopus/src/dpdk/build/include/rte_ip.h:421:9: warning: conversion from 'uint32_t' {aka 'unsigned int'} to 'uint16_t' {aka 'short unsigned int'}

[dpdk-dev] [PATCH v5 14/21] rte_ip.h: cast around promotion to int

2018-05-17 Thread Andy Green
eturn (cksum == 0x) ? cksum : ~cksum; ~~~~~~^~~~ Signed-off-by: Andy Green --- lib/librte_net/rte_ip.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_net/rte_ip.h b/lib/librte_net/rte_ip.h index b46a0c717..8689e9113 100644 --- a/lib/

[dpdk-dev] [PATCH v5 12/21] rte_rwlock.h: gcc8 sign conversion warnings

2018-05-17 Thread Andy Green
nction 'rte_rwlock_write_lock': /projects/lagopus/src/dpdk/build/include/generic/ rte_rwlock.h:110:15: warning: unsigned conversion from 'int' to 'uint32_t' {aka 'unsigned int'} changes value from '-1' to '4294967295' [-Wsign-conversion]

[dpdk-dev] [PATCH v5 10/21] rte_mbuf.h: explicit cast restricting ptrdiff to uint16

2018-05-17 Thread Andy Green
tr_t)(ptr1) - (uintptr_t)(ptr2)) ^ /projects/lagopus/src/dpdk/build/include/rte_mbuf.h:1360:13: note: in expansion of macro 'RTE_PTR_DIFF' *buf_len = RTE_PTR_DIFF(shinfo, buf_addr); Signed-off-by: Andy Green Acked-by: Bruce Richardson --- lib/librte_mbuf/rte_mbuf.h |2 +- 1 file changed, 1 i

[dpdk-dev] [PATCH v5 11/21] rte_ether.h: explicit cast avoiding truncation warning

2018-05-17 Thread Andy Green
/projects/lagopus/src/dpdk/build/include/rte_ether.h:213:13: warning: conversion from 'int' to 'uint8_t' {aka 'unsigned char'} may change value [-Wconversion] addr[0] &= ~ETHER_GROUP_ADDR; /* clear multicast bit */ Signed-off-by: Andy Green Acked-by: Bru

[dpdk-dev] [PATCH v5 09/21] rte_mbuf.h: make sure RTE-MIN compares same types

2018-05-17 Thread Andy Green
6: note: in expansion of macro 'RTE_MIN' m->data_off = RTE_MIN(RTE_PKTMBUF_HEADROOM, (uint16_t)m->buf_len); RTE_PKTMBUF_HEADROOM is typ 128, so it doesn't make trouble. Signed-off-by: Andy Green Acked-by: Bruce Richardson --- lib/librte_mbuf/rte_mbuf.h |3 ++- 1 file change

[dpdk-dev] [PATCH v5 08/21] rte_mbuf.h: explicit casts for int16 to uint16

2018-05-17 Thread Andy Green
differences to the atomic16 are signed, but the atomic16 itself is unsigned. It needs to be made explicit with casts. Signed-off-by: Andy Green If we want it for 18.05: Acked-by: Olivier Matz --- lib/librte_mbuf/rte_mbuf.h | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions

[dpdk-dev] [PATCH v5 07/21] rte_mbuf.h: avoid warnings from inadvertant promotion

2018-05-17 Thread Andy Green
"1 + value", where value is an uint16_t causes promotion to a signed int. The compiler complained that we are shoving an int into a uint16_t return type with different size and sign. Bumping and returning value directly instead removes the promotion and the problem. Signed-off-by:

[dpdk-dev] [PATCH v5 06/21] rte_ring.h: remove signed type flipflopping

2018-05-17 Thread Andy Green
unsigned int, then call a private api taking an int, which finally calls an api taking an unsigned int. Convert the private api to take unsigned int removing 5 x warning similar to that shown above. Signed-off-by: Andy Green --- lib/librte_ring/rte_ring.h |4 ++-- lib/librte_r

[dpdk-dev] [PATCH v5 04/21] /lib/librte_eal: stage cast from uint64 to long

2018-05-17 Thread Andy Green
rc/dpdk/build/include/rte_random.h:53:6: warning: conversion to 'long unsigned int' from 'long int' may change the sign of the result [-Wsign-conversion] val += lrand48(); Signed-off-by: Andy Green --- lib/librte_eal/common/include/rte_random.h |6 +++--- 1 file chan

[dpdk-dev] [PATCH v5 05/21] rte_ring_generic.h: stack declarations before code

2018-05-17 Thread Andy Green
uint32_t prod_tail = r->prod.tail; Signed-off-by: Andy Green Fixes: 0dfc98c507b1 ("ring: separate out head index manipulation") --- lib/librte_ring/rte_ring_generic.h |6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/librte_ring/rte_ring_generic.h b/lib/

[dpdk-dev] [PATCH v5 03/21] lib/librte_eal: explicit tmp cast

2018-05-17 Thread Andy Green
0x0B); break;\ ^~~~ /projects/lagopus/src/dpdk/build/include/rte_memcpy.h: 793:2: note: in expansion of macro 'MOVEUNALIGNED_LEFT47' MOVEUNALIGNED_LEFT47(dst, src, n, srcofs); ^~~~ Signed-off-by: Andy Green --- .../common/include/arch

[dpdk-dev] [PATCH v5 01/21] lib/librte_ethdev: change eth-dev-ops API to return int

2018-05-17 Thread Andy Green
Signed-off-by: Andy Green --- drivers/net/ark/ark_ethdev_rx.c |4 ++-- drivers/net/ark/ark_ethdev_rx.h |3 +-- drivers/net/avf/avf_rxtx.c |4 ++-- drivers/net/avf/avf_rxtx.h |2 +- drivers/net/bnxt/bnxt_ethdev.c |5 +++-- drivers/net/dpaa

[dpdk-dev] [PATCH v5 02/21] rte_string_fns.h: fix gcc8.1 sign conv warning in lstrcpy

2018-05-17 Thread Andy Green
In file included from ./dpdk/dpdk.c:88: /projects/lagopus/src/dpdk/build/include/rte_string_fns.h: In function 'rte_strlcpy': /projects/lagopus/src/dpdk/build/include/rte_string_fns.h:58:9: warning: conversion to 'size_t' {aka 'long unsigned int'} from 'int' may change the sign of the result [-Wsig

[dpdk-dev] [PATCH v5 00/21] Fixes for GCC8 against lagopus

2018-05-17 Thread Andy Green
like the solutions for those now belong in lagopus, not DPDK after this series. (Applies to v3) Reviewed-by: Stephen Hemminger --- Andy Green (21): lib/librte_ethdev: change eth-dev-ops API to return int rte_string_fns.h: fix gcc8.1 sign conv warning in lstrcpy lib/librte_eal

Re: [dpdk-dev] [PATCH v4 13/23] rte_mbuf.h: explicit casts to uint16 to avoid warnings

2018-05-17 Thread Andy Green
On 05/17/2018 06:58 PM, Bruce Richardson wrote: On Mon, May 14, 2018 at 01:10:32PM +0800, Andy Green wrote: Signed-off-by: Andy Green --- lib/librte_mbuf/rte_mbuf.h | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib

Re: [dpdk-dev] [PATCH v4 12/23] rte_mbuf.h: explicit cast for size type to uint32

2018-05-17 Thread Andy Green
On 05/17/2018 06:53 PM, Bruce Richardson wrote: On Mon, May 14, 2018 at 01:10:27PM +0800, Andy Green wrote: Signed-off-by: Andy Green --- lib/librte_mbuf/rte_mbuf.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf

Re: [dpdk-dev] [PATCH v4 01/23] lib/librte_eal: import libbsd strlcpy

2018-05-17 Thread Andy Green
On 05/17/2018 08:56 PM, Bruce Richardson wrote: On Thu, May 17, 2018 at 08:35:21PM +0800, Andy Green wrote: On 05/17/2018 06:36 PM, Bruce Richardson wrote: On Mon, May 14, 2018 at 01:09:32PM +0800, Andy Green wrote: Signed-off-by: Andy Green --- lib/librte_eal/common

Re: [dpdk-dev] [PATCH v4 05/23] /lib/librte_eal: stage cast from uint64 to long

2018-05-17 Thread Andy Green
On 05/17/2018 06:47 PM, Bruce Richardson wrote: On Mon, May 14, 2018 at 01:09:52PM +0800, Andy Green wrote: /projects/lagopus/src/dpdk/build/include/rte_random.h: In function 'rte_srand': /projects/lagopus/src/dpdk/build/include/rte_random.h:34:10: warning: conversion to 'long

Re: [dpdk-dev] [PATCH v4 01/23] lib/librte_eal: import libbsd strlcpy

2018-05-17 Thread Andy Green
On 05/17/2018 06:36 PM, Bruce Richardson wrote: On Mon, May 14, 2018 at 01:09:32PM +0800, Andy Green wrote: Signed-off-by: Andy Green --- lib/librte_eal/common/eal_common_string_fns.c | 34 lib/librte_eal/common/include/rte_string_fns.h |7 + 2 files

Re: [dpdk-dev] [PATCH v2 2/2] app/crypto-perf: fix memcpy source

2018-05-16 Thread Andy Green
On 05/16/2018 08:28 PM, Jerin Jacob wrote: Since arm64 was using plain memcpy for rte_memcpy, gcc 8.1, could detect size was more than source address range. In this case, the source was wrong. /export/dpdk.org/test/test/test_cryptodev.c: In function 'test_multi_session_random_usage': /export/d

Re: [dpdk-dev] [PATCH] bus/pci: fix driver name string manipulation

2018-05-15 Thread Andy Green
On 05/15/2018 06:31 PM, Jerin Jacob wrote: -Original Message- Date: Tue, 15 May 2018 18:19:19 +0800 From: Andy Green To: Jerin Jacob , dev@dpdk.org CC: tho...@monjalon.net, ferruh.yi...@intel.com, Pablo de Lara Subject: Re: [dpdk-dev] [PATCH] bus/pci: fix driver name string

Re: [dpdk-dev] [PATCH] bus/pci: fix driver name string manipulation

2018-05-15 Thread Andy Green
ound) on some PMDs. You are right... but... Cc: Andy Green Cc: Pablo de Lara Fixes: fe5f777b538 ("bus/pci: replace strncpy by strlcpy") Signed-off-by: Jerin Jacob --- drivers/bus/pci/linux/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/bus/pci/l

Re: [dpdk-dev] [PATCH v5 03/16] bus/pci: replace strncpy dangerous code

2018-05-15 Thread Andy Green
h. But it doesn't matter the patch is indeed wrong... I just sent you and the list a fix on top of the incomplete patch. "bus/pci: correct the earlier strlcpy conversion" Sorry... -Andy -Original Message- From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Andy Green Sen

[dpdk-dev] [PATCH] bus/pci: correct the earlier strlcpy conversion

2018-05-15 Thread Andy Green
Fixes: fe5f777b5383 ("bus/pci: replace strncpy by strlcpy") Signed-off-by: Andy Green --- drivers/bus/pci/linux/pci.c |7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/bus/pci/linux/pci.c b/drivers/bus/pci/linux/pci.c index a73ee49c2..004600f1c 10

Re: [dpdk-dev] release candidate 18.05-rc3

2018-05-14 Thread Andy Green
On 05/15/2018 07:18 AM, Ferruh Yigit wrote: A new DPDK release candidate is ready for testing: https://dpdk.org/browse/dpdk/tag/?id=v18.05-rc3 The release notes should be complete now: http://dpdk.org/doc/guides/rel_notes/release_18_05.html What's new in -rc3? - proper

Re: [dpdk-dev] [PATCH v6 10/16] net/qede: solve broken strncpy

2018-05-14 Thread Andy Green
On 05/15/2018 05:14 AM, Ferruh Yigit wrote: On 5/14/2018 9:20 PM, Ferruh Yigit wrote: On 5/14/2018 6:00 AM, Andy Green wrote: /home/agreen/projects/dpdk/drivers/net/qede/qede_main.c: In function ‘qed_slowpath_start’: /home/agreen/projects/dpdk/drivers/net/qede/qede_main.c:307:3: error

Re: [dpdk-dev] [PATCH v4 17/23] test_table_pipeline: repair munged indirection level

2018-05-14 Thread Andy Green
On 05/14/2018 06:35 PM, Singh, Jasvinder wrote: -Original Message- From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Andy Green Sent: Monday, May 14, 2018 6:11 AM To: dev@dpdk.org Subject: [dpdk-dev] [PATCH v4 17/23] test_table_pipeline: repair munged indirection level Signed

[dpdk-dev] [PATCH v4 23/23] rte_ip.h: cast away gcc8 warning on rte_ipv6_phdr_cksum

2018-05-13 Thread Andy Green
-conversion] psd_hdr.proto = (ipv6_hdr->proto << 24); Signed-off-by: Andy Green --- lib/librte_net/rte_ip.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_net/rte_ip.h b/lib/librte_net/rte_ip.h index c46398548..72dc2456a 100644 --- a/lib/librte_net/rte_ip

[dpdk-dev] [PATCH v4 21/23] rte_ip.h: cast type decided by sizeof to uint32

2018-05-13 Thread Andy Green
/projects/lagopus/src/dpdk/build/include/rte_ip.h:321:11: note: in expansion of macro 'rte_be_to_cpu_16' l4_len = rte_be_to_cpu_16(ipv4_hdr->total_length) - ^~~~ Signed-off-by: Andy Green --- lib/librte_net/rte_ip.h |4 ++-- 1 file changed, 2 insertions

[dpdk-dev] [PATCH v4 22/23] rte_ip.h: cast return checksum size to uint16

2018-05-13 Thread Andy Green
^ /projects/lagopus/src/dpdk/build/include/rte_ip.h: In function 'rte_ipv6_udptcp_cksum': /projects/lagopus/src/dpdk/build/include/rte_ip.h:421:9: warning: conversion from 'uint32_t' {aka 'unsigned int'} to 'uint16_t' {aka 'short unsigned int'}

[dpdk-dev] [PATCH v4 20/23] rte_ip.h: cast around promotion to int

2018-05-13 Thread Andy Green
eturn (cksum == 0x) ? cksum : ~cksum; ~~~~~~^~~~ Signed-off-by: Andy Green --- lib/librte_net/rte_ip.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_net/rte_ip.h b/lib/librte_net/rte_ip.h index b46a0c717..8689e9113 100644 --- a/lib/

[dpdk-dev] [PATCH v4 19/23] rte_ip.h: cast input to bswap16 to be uint16

2018-05-13 Thread Andy Green
opus/src/dpdk/build/include/ rte_byteorder.h:53:25: note: in definition of macro 'rte_bswap16' rte_arch_bswap16(x))) ^ Signed-off-by: Andy Green --- lib/librte_net/rte_ip.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/l

[dpdk-dev] [PATCH v4 18/23] rte_rwlock.h: gcc8 sign conversion warnings

2018-05-13 Thread Andy Green
nction 'rte_rwlock_write_lock': /projects/lagopus/src/dpdk/build/include/generic/ rte_rwlock.h:110:15: warning: unsigned conversion from 'int' to 'uint32_t' {aka 'unsigned int'} changes value from '-1' to '4294967295' [-Wsign-conversion]

[dpdk-dev] [PATCH v4 15/23] rte_ethdev.h: align sign and scope of temp var

2018-05-13 Thread Andy Green
Signed-off-by: Andy Green --- lib/librte_ethdev/rte_ethdev.h | 25 +++-- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h index 49c2ebbd5..2cb5fe3be 100644 --- a/lib/librte_ethdev/rte_ethdev.h

[dpdk-dev] [PATCH v4 16/23] rte_byteorder.h: explicit cast for return promotion

2018-05-13 Thread Andy Green
Signed-off-by: Andy Green --- .../common/include/generic/rte_byteorder.h |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/librte_eal/common/include/generic/rte_byteorder.h b/lib/librte_eal/common/include/generic/rte_byteorder.h index 9bed85cca..7d9a1463c

[dpdk-dev] [PATCH v4 17/23] test_table_pipeline: repair munged indirection level

2018-05-13 Thread Andy Green
Signed-off-by: Andy Green --- test/test/test_table_pipeline.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/test/test_table_pipeline.c b/test/test/test_table_pipeline.c index 5ec4c5244..70dbd25f4 100644 --- a/test/test/test_table_pipeline.c +++ b/test

[dpdk-dev] [PATCH v4 14/23] rte_ether.h: explicit cast avoiding truncation warning

2018-05-13 Thread Andy Green
/projects/lagopus/src/dpdk/build/include/rte_ether.h:213:13: warning: conversion from 'int' to 'uint8_t' {aka 'unsigned char'} may change value [-Wconversion] addr[0] &= ~ETHER_GROUP_ADDR; /* clear multicast bit */ Signed-off-by: Andy Green --- lib/librte

[dpdk-dev] [PATCH v4 12/23] rte_mbuf.h: explicit cast for size type to uint32

2018-05-13 Thread Andy Green
Signed-off-by: Andy Green --- lib/librte_mbuf/rte_mbuf.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h index 0580ec8a0..169f3d3b0 100644 --- a/lib/librte_mbuf/rte_mbuf.h +++ b/lib/librte_mbuf/rte_mbuf.h @@ -1577,7

[dpdk-dev] [PATCH v4 11/23] rte_mbuf.h: explicit cast restricting ptrdiff to uint16

2018-05-13 Thread Andy Green
tr_t)(ptr1) - (uintptr_t)(ptr2)) ^ /projects/lagopus/src/dpdk/build/include/rte_mbuf.h:1360:13: note: in expansion of macro 'RTE_PTR_DIFF' *buf_len = RTE_PTR_DIFF(shinfo, buf_addr); Signed-off-by: Andy Green --- lib/librte_mbuf/rte_mbuf.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) d

[dpdk-dev] [PATCH v4 09/23] rte_mbuf.h: explicit casts for int16 to uint16

2018-05-13 Thread Andy Green
differences to the atomic16 are signed, but the atomic16 itself is unsigned. It needs to be made explicit with casts. Signed-off-by: Andy Green --- lib/librte_mbuf/rte_mbuf.h | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib

[dpdk-dev] [PATCH v4 13/23] rte_mbuf.h: explicit casts to uint16 to avoid warnings

2018-05-13 Thread Andy Green
Signed-off-by: Andy Green --- lib/librte_mbuf/rte_mbuf.h | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h index 169f3d3b0..3cd76abbc 100644 --- a/lib/librte_mbuf/rte_mbuf.h +++ b/lib/librte_mbuf

[dpdk-dev] [PATCH v4 10/23] rte_mbuf.h: make sure RTE-MIN compares same types

2018-05-13 Thread Andy Green
6: note: in expansion of macro 'RTE_MIN' m->data_off = RTE_MIN(RTE_PKTMBUF_HEADROOM, (uint16_t)m->buf_len); RTE_PKTMBUF_HEADROOM is typ 128, so it doesn't make trouble. Signed-off-by: Andy Green --- lib/librte_mbuf/rte_mbuf.h |3 ++- 1 file changed, 2 insertions(+), 1 deletio

[dpdk-dev] [PATCH v4 08/23] rte_mbuf.h: avoid warnings from inadvertant promotion

2018-05-13 Thread Andy Green
"1 + value", where value is an uint16_t causes promotion to a signed int. The compiler complained that we are shoving an int into a uint16_t return type with different size and sign. Bumping and returning value directly instead removes the promotion and the problem. Signed-off-by:

[dpdk-dev] [PATCH v4 06/23] rte_ring_generic.h: stack declarations before code

2018-05-13 Thread Andy Green
uint32_t prod_tail = r->prod.tail; Signed-off-by: Andy Green Fixes: 0dfc98c507b1 ("ring: separate out head index manipulation") --- lib/librte_ring/rte_ring_generic.h |6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/librte_ring/rte_ring_generic.h b/lib/

[dpdk-dev] [PATCH v4 07/23] rte_ring.h: remove signed type flipflopping

2018-05-13 Thread Andy Green
unsigned int, then call a private api taking an int, which finally calls an api taking an unsigned int. Convert the private api to take unsigned int removing 5 x warning similar to that shown above. Signed-off-by: Andy Green --- lib/librte_ring/rte_ring.h |4 ++-- lib/librte_r

[dpdk-dev] [PATCH v4 05/23] /lib/librte_eal: stage cast from uint64 to long

2018-05-13 Thread Andy Green
rc/dpdk/build/include/rte_random.h:53:6: warning: conversion to 'long unsigned int' from 'long int' may change the sign of the result [-Wsign-conversion] val += lrand48(); Signed-off-by: Andy Green --- lib/librte_eal/common/include/rte_random.h |6 +++--- 1 file chan

[dpdk-dev] [PATCH v4 04/23] lib/librte_eal: explicit tmp cast

2018-05-13 Thread Andy Green
Signed-off-by: Andy Green --- .../common/include/arch/x86/rte_memcpy.h |8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/librte_eal/common/include/arch/x86/rte_memcpy.h b/lib/librte_eal/common/include/arch/x86/rte_memcpy.h index 5ead68ab2..f9ea0ab69

[dpdk-dev] [PATCH v4 02/23] rte_eal_version_map: export rte-strlcpy

2018-05-13 Thread Andy Green
instance where nothing else will do but use the api name on the commit title... Signed-off-by: Andy Green --- lib/librte_eal/rte_eal_version.map |1 + 1 file changed, 1 insertion(+) diff --git a/lib/librte_eal/rte_eal_version.map b/lib/librte_eal/rte_eal_version.map index 859723974..9d5b679

[dpdk-dev] [PATCH v4 03/23] lib/librte_ethdev: change eth-dev-ops API to return int

2018-05-13 Thread Andy Green
Signed-off-by: Andy Green --- drivers/net/ark/ark_ethdev_rx.c |4 ++-- drivers/net/ark/ark_ethdev_rx.h |3 +-- drivers/net/avf/avf_rxtx.c |4 ++-- drivers/net/avf/avf_rxtx.h |2 +- drivers/net/bnxt/bnxt_ethdev.c |5 +++-- drivers/net/dpaa

[dpdk-dev] [PATCH v4 01/23] lib/librte_eal: import libbsd strlcpy

2018-05-13 Thread Andy Green
Signed-off-by: Andy Green --- lib/librte_eal/common/eal_common_string_fns.c | 34 lib/librte_eal/common/include/rte_string_fns.h |7 + 2 files changed, 36 insertions(+), 5 deletions(-) diff --git a/lib/librte_eal/common/eal_common_string_fns.c b/lib

[dpdk-dev] [PATCH v4 00/23] Fixes for GCC8 against lagopus

2018-05-13 Thread Andy Green
--- Andy Green (23): lib/librte_eal: import libbsd strlcpy rte_eal_version_map: export rte-strlcpy lib/librte_ethdev: change eth-dev-ops API to return int lib/librte_eal: explicit tmp cast /lib/librte_eal: stage cast from uint64 to long rte_ring_generic.h: stack

  1   2   3   4   >