Re: [dpdk-dev] [PATCH 2/3] ethdev: fail if Tx queue offload is not supported at all

2018-05-13 Thread Andrew Rybchenko
On 05/13/2018 08:37 AM, Shahaf Shuler wrote: Do not allow to request unsupported Tx offload since all checks are removed from PMDs because of consistency check in ethdev. Otherwise application may rely on offload which is not actually supported and send traffic with, for example, wrong checksums,

[dpdk-dev] [PATCH] crypto/scheduler: fix multicore rings re-use

2018-05-13 Thread Kirill Rybalchenko
When scheduler mode changed from multicore to roundrobin and back to multicore, scheduler tries to create memory rings with the same name and fails. The fix allows to lookup and re-use previously allocated memory rings. Fixes: 4c07e0552f0a ("crypto/scheduler: add multicore scheduling mode") Signe

[dpdk-dev] [PATCH] test: fix build with icc

2018-05-13 Thread Abhinandan Gujjar
This patch provides fix for icc compilation issue with event crypto adapter test application. Currently, number of elements in the session mempool is defined by max_nb_sessions & this is replaced with a macro. Fixes: 3c2c535ecfc0 ("test: add event crypto adapter auto-test") Reported-by: Pablo de

Re: [dpdk-dev] [PATCH] net/mlx5: fix compilation without tunnel RSS support

2018-05-13 Thread Shahaf Shuler
Sunday, May 13, 2018 4:28 PM, Xueming(Steven) Li: > Thanks for fixing this, one minor issue below. > > > -Original Message- > > From: Shahaf Shuler > > Sent: Sunday, May 13, 2018 4:08 PM > > To: Nélio Laranjeiro ; Adrien Mazarguil > > ; Yongseok Koh > > Cc: dev@dpdk.org; Xueming(Steven)

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

2018-05-13 Thread Andy Green
/projects/lagopus/src/dpdk/build/include/rte_ip.h: In function 'rte_ipv6_phdr_cksum': /projects/lagopus/src/dpdk/build/include/rte_ip.h: 378:18: warning: conversion to 'uint32_t' {aka 'unsigned int'} from 'int' may change the sign of the result [-Wsign-conversion] psd_hdr.proto = (ipv6_hdr->proto

[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: In function 'rte_ipv4_udptcp_cksum': /projects/lagopus/src/dpdk/build/include/rte_byteorder.h: 51:24: warning: conversion from 'long unsigned int' to 'uint32_t' {aka 'unsigned int'} may change value [-Wconversion] #define rte_bswap16(x) ((uint16_t

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

2018-05-13 Thread Andy Green
In file included from ./dpdk/worker.c:94: /projects/lagopus/src/dpdk/build/include/rte_ip.h: 332:9: warning: conversion from 'uint32_t' {aka 'unsigned int'} to 'uint16_t' {aka 'short unsigned int'} may change value [-Wconversion] return cksum; ^ /projects/lagopus/src/dpdk/build/incl

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

2018-05-13 Thread Andy Green
/projects/lagopus/src/dpdk/build/include/ rte_ip.h: In function 'rte_ipv4_cksum': /projects/lagopus/src/dpdk/build/include/ rte_ip.h:256:35: warning: conversion from 'int' to 'uint16_t' {aka 'short unsigned int'} may change value [-Wconversion] return (cksum == 0x) ? cksum : ~cksum;

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

2018-05-13 Thread Andy Green
In file included from /projects/lagopus/src/dpdk/ build/include/rte_ether.h:24, from /projects/lagopus/src/dpdk/ build/include/rte_ethdev.h:158, from ./dpdk/worker.c:90: /projects/lagopus/src/dpdk/build/include/rte_ip.h: In function 'rte_raw_cksum_mbuf': /projects/

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

2018-05-13 Thread Andy Green
In file included from /projects/lagopus/src/dpdk/ build/include/rte_rwlock.h:12, from ./mgr/lock.h:24, from ./mgr/sock_io.c:54: /projects/lagopus/src/dpdk/build/include/generic/ rte_rwlock.h: In function 'rte_rwlock_read_lock': /projects/lagopus/src/dpdk/build/incl

[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 1

[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/tes

[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_net/rte_ether.h |2 +- 1 file chan

[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 +1

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

2018-05-13 Thread Andy Green
/projects/lagopus/src/dpdk/build/include/rte_common.h:141:34: warning: conversion from 'long unsigned int' to 'uint16_t' {aka 'short unsigned int'} may change value [-Wconversion] #define RTE_PTR_DIFF(ptr1, ptr2) ((uintptr_t)(ptr1) - (uintptr_t)(ptr2)) ^ /projects

[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/libr

[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/rte_mbuf.

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

2018-05-13 Thread Andy Green
/projects/lagopus/src/dpdk/build/include/rte_common.h:384:2: warning: conversion from 'int' to 'uint16_t' {aka 'short unsigned int'} may change value [-Wconversion] __extension__ ({ \ ^ /projects/lagopus/src/dpdk/build/include/rte_mbuf.h:1204:16: note: in expansion of macro 'RTE_MIN

[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: Andy Green --

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

2018-05-13 Thread Andy Green
/projects/lagopus/src/dpdk/build/include/rte_ring_generic.h: In function '__rte_ring_move_prod_head': /projects/lagopus/src/dpdk/build/include/rte_ring_generic.h:76:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] const uint32_t cons_tail = r->cons.tail;

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

2018-05-13 Thread Andy Green
/projects/lagopus/src/dpdk/build/include/rte_ring.h:350:46: warning: conversion to 'uint32_t' {aka 'unsigned int'} from 'int' may change the sign of the result [-Wsign-conversion] update_tail(&r->prod, prod_head, prod_next, is_sp, 1); The visible apis take unsigned int, then call a private api t

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

2018-05-13 Thread Andy Green
/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 int' from 'long unsigned int' may change the sign of the result [-Wsign-conversion] srand48((long unsigned int)seedval); /proj

[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 100

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

2018-05-13 Thread Andy Green
Building dpdk as a shared library on systems without their own native strlcpy (eg, glibc) fails, because we do not allow the explicit export of the helper rte_strlcpy(). It used to be an inline, but it's now a function. Building static, there's no problem but configured to build shared, the users

[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/dpaa_et

[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/librte_ea

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

2018-05-13 Thread Andy Green
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, not when you build dpdk itself. v4 has absorbed more list comment and added 6 x patches at the end, from getting f

[dpdk-dev] [PATCH v3 4/4] net/bnx2x: solve overruns

2018-05-13 Thread Andy Green
Signed-off-by: Andy Green Fixes: 540a211084a7 ("bnx2x: driver core") Cc: sta...@dpdk.org Acked-by: Pablo de Lara --- drivers/net/bnx2x/bnx2x.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/bnx2x/bnx2x.c b/drivers/net/bnx2x/bnx2x.c index bfd9cce51..3892934

[dpdk-dev] [PATCH v3 3/4] net/mlx5: solve var may be used uninitialized

2018-05-13 Thread Andy Green
Signed-off-by: Andy Green Fixes: ccdcba53a3f4 ("net/mlx5: use Netlink to add/remove MAC addresses") Acked-by: Pablo de Lara --- drivers/net/mlx5/mlx5.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c index 8f983061a..4d379f

[dpdk-dev] [PATCH v3 2/4] net/bnx2x: correct unmeetable comparison

2018-05-13 Thread Andy Green
/home/agreen/projects/dpdk/drivers/net/bnx2x/elink.c: In function ‘elink_check_kr2_wa’: /home/agreen/projects/dpdk/drivers/net/bnx2x/elink.c:12922:28: error: bitwise comparison always evaluates to false [-Werror=tautological-compare] ((next_page & 0xe0) == 0x2; This was fixed elsewhere

[dpdk-dev] [PATCH v3 1/4] net/bnx2x: do not cast function pointers as a policy

2018-05-13 Thread Andy Green
This is stopping the compiler telling you when you have done something stupid... that is something none of us can afford... Now gcc 8.x can tell you did something stupid despite trying to hide the evidence. Remove all the "black magic" casts. Fix the actual problems. Signed-off-by: Andy Green

[dpdk-dev] [PATCH v3 0/4] GCC8 fixes for MLX4/5/BNX2X PMD

2018-05-13 Thread Andy Green
The following series fixes build breakage if you additionally enable CONFIG_RTE_LIBRTE_MLX4_PMD CONFIG_RTE_LIBRTE_MLX5_PMD CONFIG_RTE_LIBRTE_BNX2X_PMD --- Andy Green (4): net/bnx2x: do not cast function pointers as a policy net/bnx2x: correct unmeetable comparison net/mlx5: sol

[dpdk-dev] [PATCH v6 16/16] app/test-bbdev: strcpy ok for allocated string

2018-05-13 Thread Andy Green
Signed-off-by: Andy Green Fixes: f714a18885a6 ("app/testbbdev: add test application for bbdev") Cc: sta...@dpdk.org --- app/test-bbdev/test_bbdev_vector.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/test-bbdev/test_bbdev_vector.c b/app/test-bbdev/test_bbdev_vec

[dpdk-dev] [PATCH v6 15/16] app/test-bbdev: strcpy ok for allocated string

2018-05-13 Thread Andy Green
Signed-off-by: Andy Green Fixes: f714a18885a6 ("app/testbbdev: add test application for bbdev") Cc: sta...@dpdk.org --- app/test-bbdev/test_bbdev_vector.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/test-bbdev/test_bbdev_vector.c b/app/test-bbdev/test_bbdev_vector.

[dpdk-dev] [PATCH v6 14/16] app/proc-info: sprintf overrun bug

2018-05-13 Thread Andy Green
/home/agreen/projects/dpdk/app/proc-info/main.c: In function ‘nic_xstats_display’: /home/agreen/projects/dpdk/app/proc-info/main.c:495:45: error: ‘%s’ directive writing up to 255 bytes into a region of size between 165 and 232 [-Werror=format-overflow=] sprintf(buf, "PUTVAL %s/dpdkstat-port.%u/

[dpdk-dev] [PATCH v6 13/16] net/vdev_netvsc: convert snprintf to strlcpy

2018-05-13 Thread Andy Green
Continue snprintf to strlcpy conversions started by commit c022cb400e92 ("convert snprintf to strlcpy"). Signed-off-by: Andy Green Cc: sta...@dpdk.org Acked-by: Pablo de Lara --- drivers/net/vdev_netvsc/vdev_netvsc.c |7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/

[dpdk-dev] [PATCH v6 12/16] net/vdev_netvsc: readlink inputs cannot be aliased

2018-05-13 Thread Andy Green
/home/agreen/projects/dpdk/drivers/net/vdev_netvsc/ vdev_netvsc.c:335:2:error: passing argument 2 to restrict- qualified parameter aliases with argument 1 [-Werror=restrict] ret = readlink(buf, buf, size); ^~~ Signed-off-by: Andy Green Fixes: e7dc5d7becc5 ("net/vdev_netvsc: implement core fun

[dpdk-dev] [PATCH v6 11/16] net/sfc: make sure that copied stats name is NUL-terminated

2018-05-13 Thread Andy Green
Signed-off-by: Andy Green Acked-by: Andrew Rybchenko Fixes: 73280c1e4ff2 ("net/sfc: support xstats retrieval by ID") Fixes: 7b9891769f4b ("net/sfc: support extended statistics") Cc: sta...@dpdk.org --- drivers/net/sfc/sfc_ethdev.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) d

[dpdk-dev] [PATCH v6 08/16] net/nfp: don't memcpy out of source range

2018-05-13 Thread Andy Green
/home/agreen/projects/dpdk/drivers/net/nfp/nfp_net.c:669:2: error: ‘memcpy’ forming offset [5, 6] is out of the bounds [0, 4] of object ‘tmp’ with type ‘uint32_t’ {aka ‘unsigned int’} [-Werror=array-bounds] memcpy(&hw->mac_addr[0], &tmp, sizeof(struct ether_addr)); Signed-off-by: Andy Green Acke

[dpdk-dev] [PATCH v6 09/16] net/qede: strncpy length constant and NUL

2018-05-13 Thread Andy Green
Signed-off-by: Andy Green Fixes: 8427c6647964 ("net/qede/base: add attention formatting string") Cc: sta...@dpdk.org --- drivers/net/qede/base/ecore_int.c |8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/net/qede/base/ecore_int.c b/drivers/net/qede/base/ecor

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

2018-05-13 Thread Andy Green
/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: ‘strncpy’ output may be truncated copying 12 bytes from a string of length 127 [-Werror=stringop-truncation] strncpy((char *)drv_versio

[dpdk-dev] [PATCH v6 07/16] net/nfp/nfpcore: off-by-one and no NUL on strncpy use

2018-05-13 Thread Andy Green
/home/agreen/projects/dpdk/drivers/net/nfp/nfpcore/nfp_resource.c: 76:2:error: ‘strncpy’ output may be truncated copying 8 bytes from a string of length 8 [-Werror=stringop-truncation] strncpy(name_pad, res->name, sizeof(name_pad)); Signed-off-by: Andy Green Fixes: c7e9729da6b5 ("net/nfp: suppo

[dpdk-dev] [PATCH v6 06/16] net/nfp/nfpcore: solve strncpy misuse

2018-05-13 Thread Andy Green
Signed-off-by: Andy Green Acked-by: Alejandro Lucero Tested-by: Alejandro Lucero Fixes: c7e9729da6b5 ("net/nfp: support CPP") --- drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c b/dr

[dpdk-dev] [PATCH v6 04/16] bus/dpaa: solve inconsistent struct alignment

2018-05-13 Thread Andy Green
The actual descriptor for qm_mr_entry is 64-byte aligned. But the original code plays a trick, and puts a u8 common to the three descriptor subtypes in the union afterwards outside their structure definitions. Unfortunately since they compose a struct qm_fd with alignment 8, this trick destroys t

[dpdk-dev] [PATCH v6 05/16] net/axgbe: solve broken eeprom string comp

2018-05-13 Thread Andy Green
/home/agreen/projects/dpdk/drivers/net/axgbe/axgbe_phy_impl.c:576:6: error: ‘__builtin_memcmp_eq’ reading 16 bytes from a region of size 9 [-Werror=stringop-overflow=] if (memcmp(&sfp_eeprom->base[AXGBE_SFP_BASE_VENDOR_NAME], ^ AXGBE

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

2018-05-13 Thread Andy Green
In function ‘pci_get_kernel_driver_by_path’, inlined from ‘pci_scan_one.isra.1’ at /home/agreen/projects/dpdk/ drivers/bus/pci/linux/pci.c:317:8: /home/agreen/projects/dpdk/drivers/bus/pci/linux/pci.c:57:3: error: ‘strncpy’ specified bound depends on the length of the source argument [-

[dpdk-dev] [PATCH v6 02/16] net/nfp: solve buffer overflow

2018-05-13 Thread Andy Green
/home/agreen/projects/dpdk/drivers/net/nfp/nfp_net.c: In function ‘nfp_pf_pci_probe’: /home/agreen/projects/dpdk/drivers/net/nfp/nfp_net.c:3160: 23: error: ‘%s’ directive writing up to 99 bytes into a region of size 76 [-Werror=format-overflow=] sprintf(fw_name, "%s/%s.nffw", DEFAULT_FW_PATH, ser

[dpdk-dev] [PATCH v6 00/16] Fix default build on gcc8.0.1

2018-05-13 Thread Andy Green
This series allows dpdk master to build on Fedora 28, with the x86_64 default config. Acked-by: Neil Horman --- Andy Green (16): devtools/check-git: provide more generic grep pattern net/nfp: solve buffer overflow bus/pci: replace strncpy dangerous code bus/dpaa: solve in

[dpdk-dev] [PATCH v6 01/16] devtools/check-git: provide more generic grep pattern

2018-05-13 Thread Andy Green
On Fedora 28, every patch is faulted for "Wrong headline uppercase", because [A-Z] is not always case sensitive. Change to use [[:upper:]] Signed-off-by: Andy Green --- devtools/check-git-log.sh |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/devtools/check-git-log.sh

Re: [dpdk-dev] [PATCH v5 12/16] net/vdev_netvsc: readlink inputs cannot be aliased

2018-05-13 Thread Andy Green
On 05/13/2018 03:20 PM, Matan Azrad wrote: Hi Andy From: Andy Green /home/agreen/projects/dpdk/drivers/net/vdev_netvsc/ Please replace "/home/agreen/projects/dpdk" in $DPDK_DIR, I think this is relevant for all the series. vdev_netvsc.c:335:2:error: passing argument 2 to restrict- qualifi

[dpdk-dev] [PATCH] net/tap: perform proto field update for tun only

2018-05-13 Thread Vipin Varghese
The TX function is shared between TAP and TUN PMD. Checking TUN-TAP type field will ensure the TAP PMD will always have protocol field as 0. Signed-off-by: Vipin Varghese --- drivers/net/tap/rte_eth_tap.c | 50 +++ drivers/net/tap/rte_eth_tap.h | 10 ++

[dpdk-dev] [RFC] Add UDP GSO Support

2018-05-13 Thread Jiayu Hu
With the support of UDP Fragmentation Offload (UFO) and TCP Segmentation Offload (TSO) in virtio, VMs can exchange large UDP and TCP packets exceeding MTU between each other, which can greatly reduce per-packet processing overheads. When the destination of the large TCP and UDP packets is crossing

[dpdk-dev] [PATCH] app/testpmd: fix print unused parameter name

2018-05-13 Thread zhiyong . yang
The second parameter "name" in the function rte_eth_dev_detach has been already redefined as "char *name __rte_unused", "port_id" is printed instead of "name" in testpmd. Fixes: b65ecf199324 ("devargs: rename legacy API") Cc: sta...@dpdk.org Signed-off-by: Zhiyong Yang --- app/test-pmd/testpmd.c

Re: [dpdk-dev] [PATCH 0/6] Testpmd: fix port hotplug

2018-05-13 Thread Thomas Monjalon
> Matan Azrad (6): > app/testpmd: fix valid ports prints > app/testpmd: fix forward ports update > app/testpmd: fix forward ports Rx flush > app/testpmd: fix synchronic port hotplug > app/testpmd: fix removed device link status asking > app/testpmd: fix asynchronic port removal Applied

Re: [dpdk-dev] [PATCH] net/bonding: fix slave activation simultaneously

2018-05-13 Thread Thomas Monjalon
Someone to review please? 24/04/2018 13:29, Matan Azrad: > The bonding PMD decides to activate\deactivate its slaves according to > the slaves link statuses. > Thus, it registers to the LSC events of the slaves ports and > activates\deactivates them from its LSC callbacks called asynchronously > b

Re: [dpdk-dev] [dpdk-stable] [PATCH] app/testpmd: fix slave port detection

2018-05-13 Thread Thomas Monjalon
> > > Testpmd allows to create and control bonding devices by run time > > > command lines using the bonding PMD API. > > > > > > Some bonding device slaves operations(close, stop, etc) should not be > > > used by the application and must be managed by the bonding PMD. > > > > > > Thus, Testpmd man

Re: [dpdk-dev] [PATCH 2/2] app/tesetpmd: disable memory locking for bsdapp

2018-05-13 Thread Thomas Monjalon
> > If mlockall() is called while allocated VA space is bigger than > > amount of available RAM, FreeBSD kernel will deadlock and need > > a hard reboot. We do allocate big amounts of memory because of > > how new memory subsystem works, so calling mlockall() will cause > > a deadlock. So, disable

Re: [dpdk-dev] [PATCH v3 08/24] rte_ring_generic.h: stack declarations before code

2018-05-13 Thread Thomas Monjalon
14/05/2018 02:09, Andy Green: > > On 05/14/2018 07:44 AM, Thomas Monjalon wrote: > > 14/05/2018 01:21, Andy Green: > >> > >> On 05/14/2018 12:47 AM, Thomas Monjalon wrote: > >>> 12/05/2018 03:59, Andy Green: > /projects/lagopus/src/dpdk/build/include/rte_ring_generic.h: > In function '__

Re: [dpdk-dev] [PATCH] lib: clear experimental version tag in linker scripts

2018-05-13 Thread Thomas Monjalon
27/04/2018 21:30, Neil Horman: > On Fri, Apr 27, 2018 at 04:55:20PM +0100, Ferruh Yigit wrote: > > On 4/27/2018 4:42 PM, Neil Horman wrote: > > > On Fri, Apr 27, 2018 at 04:17:55PM +0100, Ferruh Yigit wrote: > > >> Remove version tag from experimental block in linker version scripts > > >> (.map fi

[dpdk-dev] BPF in DPDK 18.05 as experimental

2018-05-13 Thread Thomas Monjalon
DPDK 18.05-rc3 will have a BPF experimental framework. The symbols have been marked as experimental in the map file, but the doxygen has no experimental mention, the section in MAINTAINERS has not the EXPERIMENTAL tag, and the API functions have not the attribute __rte_experimental. Konstantin, pl

Re: [dpdk-dev] [PATCH] ipc: fix duplicate string copy

2018-05-13 Thread Thomas Monjalon
> > Coverity issue: 272582 > > > > Fixes: 2147c0950580 ("ipc: clean up code") > > Cc: jianfeng@intel.com > > > > Signed-off-by: Anatoly Burakov > > Acked-by: Harry van Haaren Applied, thanks

Re: [dpdk-dev] [PATCH 1/3] mem: fix index for unmapping segments on failure

2018-05-13 Thread Thomas Monjalon
> > Segment index was calculated incorrectly, causing free_seg to > > attempt to free segments that do not exist. > > > > Fixes: a5ff05d60fc5 ("mem: support unmapping pages at runtime") > > Cc: anatoly.bura...@intel.com > > > > Signed-off-by: Anatoly Burakov > > Acked-by: Konstantin Ananyev S

Re: [dpdk-dev] [PATCH v3 24/24] test_table_pipeline: repair munged indirection level

2018-05-13 Thread Andy Green
On 05/14/2018 04:33 AM, Thomas Monjalon wrote: 12/05/2018 04:00, Andy Green: Signed-off-by: Andy Green May be a fix of Fixes: 4c387fcdf777 ("pipeline: add new functions for action handlers") rte_pipeline_table_action_handler_miss table_action_stub_miss(struct rte_pipeline *p, struct r

Re: [dpdk-dev] [PATCH] memalloc: fix potential underflow on mem size calculation

2018-05-13 Thread Thomas Monjalon
03/05/2018 15:03, Anatoly Burakov: > If total memory is already bigger than max memory, an underflow > will occur on subtraction. Fix it by simply stopping whenever > we already have amount of memory that is bigger than maximum. > > Fixes: 66cc45e293ed ("mem: replace memseg with memseg lists") > C

Re: [dpdk-dev] [PATCH v3 08/24] rte_ring_generic.h: stack declarations before code

2018-05-13 Thread Andy Green
On 05/14/2018 07:44 AM, Thomas Monjalon wrote: 14/05/2018 01:21, Andy Green: On 05/14/2018 12:47 AM, Thomas Monjalon wrote: 12/05/2018 03:59, Andy Green: /projects/lagopus/src/dpdk/build/include/rte_ring_generic.h: In function '__rte_ring_move_prod_head': /projects/lagopus/src/dpdk/build/in

Re: [dpdk-dev] [PATCH v3 18/24] rte_ether.h: explicit cast avoiding truncation warning

2018-05-13 Thread Andy Green
On 05/14/2018 01:02 AM, Thomas Monjalon wrote: 12/05/2018 04:00, 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 */

Re: [dpdk-dev] [dpdk-stable] [PATCH] memzone: fix memzone size on reserving biggest memzone

2018-05-13 Thread Thomas Monjalon
> > Size of malloc heap elements include overhead, which sould not > > be counted as part of memzone. > > > > Fixes: fafcc11985a2 ("mem: rework memzone to be allocated by malloc") > > Cc: sta...@dpdk.org > > > > Signed-off-by: Anatoly Burakov > > Acked-by: Konstantin Ananyev Applied, thanks

Re: [dpdk-dev] [PATCH v3 17/24] rte_byteorder.h: explicit cast for return promotion

2018-05-13 Thread Andy Green
On 05/14/2018 12:59 AM, Thomas Monjalon wrote: 12/05/2018 04:00, Andy Green: --- a/lib/librte_eal/common/include/generic/rte_byteorder.h +++ b/lib/librte_eal/common/include/generic/rte_byteorder.h @@ -123,7 +123,7 @@ typedef uint64_t rte_le64_t; /**< 64-bit little-endian value. */ static in

Re: [dpdk-dev] [PATCH] memzone: document reserving zero-length memzones

2018-05-13 Thread Thomas Monjalon
03/05/2018 18:25, Anatoly Burakov: > Currently, reserving a memzone with length set to 0 will not trigger > any memory allocations, and memzone will instead be looking through > already allocated memory only. Document this limitation. > > Signed-off-by: Anatoly Burakov Applied, thanks

Re: [dpdk-dev] [PATCH v3 02/24] lib/librte_ethdev: change eth-dev-ops API to return int

2018-05-13 Thread Thomas Monjalon
14/05/2018 01:10, Andy Green: > > On 05/13/2018 10:58 PM, Thomas Monjalon wrote: > > 12/05/2018 03:58, Andy Green: > >> Signed-off-by: Andy Green > > [...] > >> --- a/lib/librte_ethdev/rte_ethdev_core.h > >> +++ b/lib/librte_ethdev/rte_ethdev_core.h > >> -typedef uint32_t (*eth_rx_queue_count_t)(

Re: [dpdk-dev] [PATCH v3 08/24] rte_ring_generic.h: stack declarations before code

2018-05-13 Thread Thomas Monjalon
14/05/2018 01:21, Andy Green: > > On 05/14/2018 12:47 AM, Thomas Monjalon wrote: > > 12/05/2018 03:59, Andy Green: > >> /projects/lagopus/src/dpdk/build/include/rte_ring_generic.h: > >> In function '__rte_ring_move_prod_head': > >> /projects/lagopus/src/dpdk/build/include/rte_ring_generic.h:76:3:

Re: [dpdk-dev] [PATCH] memzone: fix race condition on alloc failure

2018-05-13 Thread Thomas Monjalon
> > Deallocation used the wrong function, which could have resulted in > > race conditions because the function does not use locks internally. > > > > Fixes: 1403f87d4fb8 ("malloc: enable memory hotplug support") > > Cc: anatoly.bura...@intel.com > > > > Signed-off-by: Anatoly Burakov > > Acked

Re: [dpdk-dev] [PATCH v2 2/2] mem: unmap unneeded space

2018-05-13 Thread Thomas Monjalon
08/05/2018 22:20, Thomas Monjalon: > 02/05/2018 23:00, Thomas Monjalon: > > 30/04/2018 14:50, Bruce Richardson: > > > On Mon, Apr 30, 2018 at 12:21:43PM +0100, Anatoly Burakov wrote: > > > > When we ask to reserve virtual areas, we usually include > > > > alignment in the mapping size, and that mem

Re: [dpdk-dev] [PATCH v3 11/24] rte_mbuf.h: avoid warnings from inadvertant promotion

2018-05-13 Thread Andy Green
On 05/14/2018 12:54 AM, Thomas Monjalon wrote: 12/05/2018 03:59, Andy Green: @@ -836,8 +836,9 @@ rte_mbuf_refcnt_update(struct rte_mbuf *m, int16_t value) * reference counter can occur. */ if (likely(rte_mbuf_refcnt_read(m) == 1)) { - rte_mbuf_refcnt_set

Re: [dpdk-dev] [PATCH v3 08/24] rte_ring_generic.h: stack declarations before code

2018-05-13 Thread Andy Green
On 05/14/2018 12:47 AM, Thomas Monjalon wrote: 12/05/2018 03:59, Andy Green: /projects/lagopus/src/dpdk/build/include/rte_ring_generic.h: In function '__rte_ring_move_prod_head': /projects/lagopus/src/dpdk/build/include/rte_ring_generic.h:76:3: warning: ISO C90 forbids mixed declarations and c

Re: [dpdk-dev] [PATCH v3 06/24] /lib/librte_eal: stage cast from uint64 to long

2018-05-13 Thread Andy Green
On 05/14/2018 12:24 AM, Thomas Monjalon wrote: 12/05/2018 03:59, Andy Green: warning: conversion to 'uint64_t' {aka 'long unsigned int'} from 'long int' may change the sign of the result [-Wsign-conversion] val = lrand48(); ^~~ [...] rte_rand(void) { uint64_t val;

Re: [dpdk-dev] [PATCH] mem: fix typo in local function name

2018-05-13 Thread Thomas Monjalon
02/05/2018 11:28, Burakov, Anatoly: > On 01-May-18 8:38 PM, Thomas Monjalon wrote: > > Fixes: 582bed1e1d1d ("mem: support mapping hugepages at runtime") > > > > Signed-off-by: Thomas Monjalon > > Acked-by: Anatoly Burakov Applied

Re: [dpdk-dev] [PATCH v3 02/24] lib/librte_ethdev: change eth-dev-ops API to return int

2018-05-13 Thread Andy Green
On 05/13/2018 10:58 PM, Thomas Monjalon wrote: 12/05/2018 03:58, Andy Green: Signed-off-by: Andy Green [...] --- a/lib/librte_ethdev/rte_ethdev_core.h +++ b/lib/librte_ethdev/rte_ethdev_core.h -typedef uint32_t (*eth_rx_queue_count_t)(struct rte_eth_dev *dev, -

Re: [dpdk-dev] [PATCH] eal: fix typo in doc of pointer offset macro

2018-05-13 Thread Thomas Monjalon
01/05/2018 21:35, Thomas Monjalon: > Fixes: af75078fece3 ("first public release") > Cc: sta...@dpdk.org > > Signed-off-by: Thomas Monjalon Applied

Re: [dpdk-dev] [PATCH v3 01/24] lib/librte_eal: import libbsd strlcpy

2018-05-13 Thread Andy Green
On 05/13/2018 10:56 PM, Thomas Monjalon wrote: Hi, 12/05/2018 03:58, Andy Green: Signed-off-by: Andy Green Why do we need to replace rte_strlcpy fallback? GCC 8 complains about the fallback using snprintf? No; the first version of this patch just fixed the compiler warnings. But Stephen

Re: [dpdk-dev] [PATCH] eal: copy optarg when parsing mempool ops name

2018-05-13 Thread Thomas Monjalon
07/05/2018 07:42, santosh: > > On Friday 04 May 2018 04:01 PM, Andrew Rybchenko wrote: > > From: Ivan Malov > > > > The code aimed to pick and remember the value of > > mempool ops name from EAL command line arguments does not > > copy the string and remembers the pointer provided > > by getopt_l

Re: [dpdk-dev] [PATCH 1/3] raw/skeleton_rawdev: fix resource leak

2018-05-13 Thread Thomas Monjalon
09/05/2018 17:26, Shreyansh Jain: > Fixes: 55ca1b0f2151 ("raw/skeleton: add test cases") > Coverity issue: 260402 > > Signed-off-by: Shreyansh Jain Series applied, thanks

Re: [dpdk-dev] [PATCH 1/2] bus/fslmc: fix memory leak and cleanup

2018-05-13 Thread Thomas Monjalon
10/05/2018 12:46, Hemant Agrawal: > On 5/9/2018 8:57 PM, Shreyansh Jain wrote: > > Fixes: 828d51d8fc3e ("bus/fslmc: refactor scan and probe functions") > > Coverity issue: 268338 > > Cc: sta...@dpdk.org > > > > Signed-off-by: Shreyansh Jain > > --- > Acked-by: Hemant Agrawal Series applied, than

Re: [dpdk-dev] [PATCH 1/5] bus/dpaa: support device blacklisting

2018-05-13 Thread Thomas Monjalon
09/05/2018 07:41, Shreyansh Jain: > On Wednesday 25 April 2018 06:26 PM, Hemant Agrawal wrote: > > Signed-off-by: Hemant Agrawal > > --- > > doc/guides/cryptodevs/dpaa_sec.rst | 13 + > > doc/guides/nics/dpaa.rst | 10 > > drivers/bus/dpaa/dpaa_bus.c| 101 > >

Re: [dpdk-dev] [PATCH v2] app/test: enhance sanity script

2018-05-13 Thread Thomas Monjalon
Hi, 10/05/2018 12:36, Jananee Parthasarathy: > 1. Sanity Script is enhanced with additional test cases > being added to autotest_data.py How long they are? How did you choose to group them? > 2. Fixed in autotest_test_funcs.py to handle test cases > which returns "Skipped" as result. > The iss

Re: [dpdk-dev] [PATCH] lib/librte_ip_frag:fix ip frag process log

2018-05-13 Thread Thomas Monjalon
Any review please? 18/04/2018 10:51, Li Han: > in ip_frag_process,some IP_FRAG_LOG content is wrong > > Signed-off-by: Li Han

Re: [dpdk-dev] [dpdk-stable] [PATCH v4] kni: fix possible rx_q mbuf leaks and speed up alloc_q release

2018-05-13 Thread Thomas Monjalon
04/05/2018 14:46, Ferruh Yigit: > On 4/19/2018 4:12 AM, Yangchao Zhou wrote: > > rx_q fifo can only be released by kernel thread. There may be > > mbuf leaks in rx_q because kernel threads are randomly stopped. > > > > When the kni is released and netdev is unregisterd, convert the > > physical ad

Re: [dpdk-dev] [dpdk-stable] [PATCH v3] examples/ipsec-secgw: replace strncpy with strlcpy

2018-05-13 Thread Thomas Monjalon
> > Use strlcpy instead of strncpy. > > Use strcpy where boundchecks on destination is not needed. > > > > Fixes: 0d547ed037 ("examples/ipsec-secgw: support configuration file") > > Fixes: 07b156199f ("examples/ipsec-secgw: fix configuration string > > termination") > > Fixes: a1469c319f ("example

Re: [dpdk-dev] [PATCH v2] examples/vhost_scsi: replace strncpy with strlcpy

2018-05-13 Thread Thomas Monjalon
10/05/2018 15:31, Bruce Richardson: > On Thu, May 10, 2018 at 01:05:44PM +0100, Reshma Pattan wrote: > > Use strlcpy instead of strncpy. > > > > Fixes: db75c7af19 ("examples/vhost_scsi: introduce a new sample app") > > CC: sta...@dpdk.org > > > > Signed-off-by: Reshma Pattan > > --- > > v2: repl

Re: [dpdk-dev] [dpdk-stable] [PATCH] examples/quota_watermark: fix gcc 8.0.1 cast between incompatible types

2018-05-13 Thread Thomas Monjalon
09/05/2018 13:35, Reshma Pattan: > Gcc 8.0.1 reports incompatible cast between types i.e. from > `void (*)(void *)` to `(int (*)(void *)`. > > Change the pipeline_stage prototype to retun int type > to fix the issue. > > Fixes: a0ffcb257a ("examples/quota_watermark: correct code indentation") > C

Re: [dpdk-dev] [PATCH] examples: fix typdef in performance thread app

2018-05-13 Thread Thomas Monjalon
10/05/2018 07:31, David Hunt: > The function pthread_create() expects void *(*func) (void *) > for function pointer, however, lthread_func_t was defined as > void (*func) (void *), so now gcc 8.1 warns that the cast is > incorrect, causing a compilation failure. This patch changes > the declaration

Re: [dpdk-dev] [PATCH] test: fix incorrect cast in pipeline unit test

2018-05-13 Thread Thomas Monjalon
> > New warning with gcc 8.1: > > The table_action_stub_miss() function was incorrectly declared as returning > > a > > typedef of rte_pipeline_table_action_handler_miss, instead of what it should > > have been, an int. > > Changed this to declare the function as returning an int, and now when the

Re: [dpdk-dev] [PATCH v4] app/test: fix reorder test failure

2018-05-13 Thread Thomas Monjalon
04/05/2018 12:47, Reshma Pattan: > mbufs are being freed twice in error, once in rte_mempool_put_bulk() > and then in rte_reorder_free(). Refactor the code so that we use > rte_reorder_free() to free mbufs in the reorder buffer, and use > rte_pktmbuf_free() to free any unused or drained mbufs. > >

Re: [dpdk-dev] [PATCH] test: fix incorrect cast in distributor unit test

2018-05-13 Thread Thomas Monjalon
> > New warning with gcc 8.1: > > When casting the function pointer passed to > > rte_eal_remote_launch() as an lcore_function_t *, it expects the cast > > function > > to return an int, but instead it was returning void. Fixed to return an int. > > > > Fixes: c3eabff124e6 ("distributor: add unit

Re: [dpdk-dev] [PATCH v3 22/24] rte_hash_crc.h: stack vars declared at top of function

2018-05-13 Thread Thomas Monjalon
12/05/2018 04:00, Andy Green: > /projects/lagopus/src/dpdk/build/include/rte_hash_crc.h: > In function 'crc32c_2words': > /projects/lagopus/src/dpdk/build/include/rte_hash_crc.h:347:2: > warning: ISO C90 forbids mixed declarations and code > [-Wdeclaration-after-statement] > uint32_t crc, term1,

Re: [dpdk-dev] [PATCH v3 23/24] rte_hash_crc.h: explicit casts for truncation

2018-05-13 Thread Thomas Monjalon
12/05/2018 04:00, Andy Green: > /projects/lagopus/src/dpdk/build/include/rte_hash_crc.h: > In function 'crc32c_sse42_u64_mimic': > /projects/lagopus/src/dpdk/build/include/rte_hash_crc.h:402:40: > warning: conversion from 'uint64_t' {aka 'long unsigned int'} > to 'uint32_t' {aka 'unsigned int'} may

Re: [dpdk-dev] [PATCH v3 21/24] rte_ethdev.h: explicit cast for truncation

2018-05-13 Thread Thomas Monjalon
12/05/2018 04:00, Andy Green: > /projects/lagopus/src/dpdk/build/include/rte_ethdev.h: > In function 'rte_eth_tx_buffer_flush': > /projects/lagopus/src/dpdk/build/include/rte_ethdev.h:4248:55: > warning: conversion from 'int' to 'uint16_t' > {aka 'short unsigned int'} may change value [-Wconversion

Re: [dpdk-dev] [PATCH v3 19/24] rte_ether.h: stack vars declared at top of function

2018-05-13 Thread Thomas Monjalon
12/05/2018 04:00, Andy Green: > /projects/lagopus/src/dpdk/build/include/rte_ether.h: > In function 'rte_vlan_strip': > /projects/lagopus/src/dpdk/build/include/rte_ether.h:357:2: > warning: ISO C90 forbids mixed declarations and code > [-Wdeclaration-after-statement] > struct vlan_hdr *vh = (str

Re: [dpdk-dev] [PATCH v3 07/24] rte_spinlock.h: stack declarations before code

2018-05-13 Thread Thomas Monjalon
12/05/2018 03:59, Andy Green: > /projects/lagopus/src/dpdk/build/include/rte_spinlock.h: > In function 'rte_try_tm': > /projects/lagopus/src/dpdk/build/include/rte_spinlock.h:82:2: > warning: ISO C90 forbids mixed declarations and code > [-Wdeclaration-after-statement] > int retries = RTE_RTM_MAX

  1   2   >