Re: [dpdk-dev] Build fixes for musl libc

2021-02-20 Thread Natanael Copa
Hi, Sorry, I thought I would be able to allocate time yesterday but got distracted. I would appreciate if someone else could follow up, since I don’t know when I´ll find time for it. Thanks! -nc > 18. feb. 2021 kl. 17:13 skrev Thomas Monjalon : > > Hi Natanael, > > 06/11/2020 11:44, David

[dpdk-dev] [PATCH v4 7/8] common/dpaax: simplify pr debug/err/warn macros

2020-11-05 Thread Natanael Copa
Simplify pr_debug, pr_err and pr_warn macros by add an intermediate pr_msg macro. This way we only need test for SUPPRESS_PRINTS once. Signed-off-by: Natanael Copa Acked-by: Hemant Agrawal --- drivers/common/dpaax/caamflib/compat.h | 28 +++--- 1 file changed, 12 insertions

[dpdk-dev] [PATCH v4 8/8] eal: add missing include to fix build with musl libc

2020-11-05 Thread Natanael Copa
: 176bb37ca6f3 ("eal: introduce internal wrappers for file operations") Cc: sta...@dpdk.org Signed-off-by: Natanael Copa --- lib/librte_eal/unix/eal_file.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/librte_eal/unix/eal_file.c b/lib/librte_eal/unix/eal_file.c index 1b26475

[dpdk-dev] [PATCH v4 6/8] common/dpaax: build fix for musl libc

2020-11-05 Thread Natanael Copa
") Cc: sta...@dpdk.org Signed-off-by: Natanael Copa Acked-by: Hemant Agrawal --- drivers/common/dpaax/caamflib/compat.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/common/dpaax/caamflib/compat.h b/drivers/common/dpaax/caamflib/compat.h index

[dpdk-dev] [PATCH v4 5/8] bus/dpaa: fix detection of 64 bit arch

2020-11-05 Thread Natanael Copa
a: support FMAN frame queue lookup") Cc: sta...@dpdk.org Signed-off-by: Natanael Copa --- drivers/bus/dpaa/include/fsl_qman.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/bus/dpaa/include/fsl_qman.h b/drivers/bus/dpaa/include/fsl_qman.h index 10212f0fd..7ef2f3b2e

[dpdk-dev] [PATCH v4 4/8] bus/dpaa: use warn instead of error to improve portability

2020-11-05 Thread Natanael Copa
) Fixes: 5b22cf744689 ("bus/dpaa: introducing FMan configurations") Cc: sta...@dpdk.org Signed-off-by: Natanael Copa --- drivers/bus/dpaa/base/fman/netcfg_layer.c | 4 ++-- drivers/bus/dpaa/base/qbman/bman_driver.c | 12 drivers/bus/dpaa/base/qbman/qman_driver.c | 15 ++---

[dpdk-dev] [PATCH v4 3/8] bus/pci: add fallback for out* for non GNU libc

2020-11-05 Thread Natanael Copa
ce to `outl_p' pci_uio.c:(.text+0xadf): undefined reference to `outb_p' We also handle the non-x86 with macros to factor out various ifdefs in the code. Bugzilla ID: 35 Fixes: c752998b5e2e ("pci: introduce library and driver") Cc: sta...@dpdk.org Signed-off-by: Natanael Copa -

[dpdk-dev] [PATCH v4 2/8] net/cxgbe: fix uint build error with musl libc

2020-11-05 Thread Natanael Copa
error: unknown type name 'uint' 201 |uint synmapen:1; /* SYN Map Enable */ |^~~~ Fixes: bfcb257d3014 ("net/cxgbe: enable RSS for VF") Cc: sta...@dpdk.org Signed-off-by: Natanael Copa --- drivers/net/cxgbe/base/common.h | 18 +- 1 file change

[dpdk-dev] [PATCH v4 1/8] app/testpmd: fix uint build error with musl libc

2020-11-05 Thread Natanael Copa
type name 'uint'; did you mean 'int'? 813 | uint8_t *hash_key, uint hash_key_len); | ^~~~ | int Fixes: 8205e241b2b0 ("app/testpmd: add missing type to RSS hash commands") Cc: sta...@dpdk.org

[dpdk-dev] Build fixes for musl libc

2020-11-05 Thread Natanael Copa
add "Fixes:" tags add a couple of patches fro eal Sorry that it took so long time to follow up. Natanael Copa (8): app/testpmd: fix uint build error with musl libc net/cxgbe: fix uint build error with musl libc bus/pci: add fallback for out* for non GNU libc bus/dpaa: use wa

Re: [dpdk-dev] [PATCH v3 03/15] bus/pci: add fallback for out[lwb]_p for non GNU libc

2019-07-04 Thread Natanael Copa
On Thu, 04 Jul 2019 15:20:55 +0200 Thomas Monjalon wrote: > 04/07/2019 14:16, Natanael Copa: > > On Sat, 30 Mar 2019 23:22:27 +0100 > > Thomas Monjalon wrote: > > > > > 13/03/2019 18:06, Natanael Copa: > > > > Add a fallback for non-GNU libc

Re: [dpdk-dev] [PATCH v3 03/15] bus/pci: add fallback for out[lwb]_p for non GNU libc

2019-07-04 Thread Natanael Copa
On Sat, 30 Mar 2019 23:22:27 +0100 Thomas Monjalon wrote: > 13/03/2019 18:06, Natanael Copa: > > Add a fallback for non-GNU libc systems like musl libc for the > > non-standard functions outl_p, outw_p and outb_p. > > > > This ifixes the following buildtime errors w

[dpdk-dev] [PATCH v3 15/15] eal/linux: simplify debug message in sigbus_handler

2019-03-13 Thread Natanael Copa
7;: ../lib/librte_eal/linuxapp/eal/eal_dev.c:70:3: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] (int)pthread_self(), info->si_addr); ^ Signed-off-by: Natanael Copa --- lib/librte_eal/linux/eal/eal_dev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 delet

Re: [dpdk-dev] [PATCH v2 03/15] bus/pci: add fallback for out[lwb]_p for non GNU libc

2019-03-13 Thread Natanael Copa
On Wed, 13 Mar 2019 11:13:40 + Ferruh Yigit wrote: > On 3/12/2019 10:16 AM, Natanael Copa wrote: > > Add a fallback for non-GNU libc systems like musl libc for the > > non-standard functions outl_p, outw_p and outb_p. > > > > This ifixes the following buildtim

[dpdk-dev] [PATCH v3 14/15] net/netvsc: fix compile warning for fcntl.h include

2019-03-13 Thread Natanael Copa
Fix the following warning when building with musl libc: In file included from ../drivers/net/netvsc/hn_vf.c:14: /usr/include/sys/fcntl.h:1:2: warning: #warning redirecting incorrect #include to [-Wcpp] #warning redirecting incorrect #include to ^~~ Signed-off-by: Natanael Copa

[dpdk-dev] [PATCH v3 13/15] crypto/dpaa2_sec: simplify pr_{debug, err, warn} macros

2019-03-13 Thread Natanael Copa
Simplify pr_debug, pr_err and pr_warn macros by add an intermediate pr_msg macro. This way we only need test for SUPPRESS_PRINTS once. Signed-off-by: Natanael Copa --- drivers/crypto/dpaa2_sec/hw/compat.h | 28 1 file changed, 12 insertions(+), 16 deletions(-) diff

[dpdk-dev] [PATCH v3 11/15] bus/dpaa: fix warning: "__WORDSIZE" is not defined, evaluates to 0

2019-03-13 Thread Natanael Copa
There is no standard saying that __WORDSIZE should be be defined or in what include it should be defined. Use a portable way to detect 64 bit environment. This fixes a warning when building with musl libc: warning: "__WORDSIZE" is not defined, evaluates to 0 [-Wundef] Signed-off-by

[dpdk-dev] [PATCH v3 12/15] crypto/dpaa2_sec: build fix for musl libc

2019-03-13 Thread Natanael Copa
The swab16/swab32/swab64 are Linux specific and nog GNU libc specific. Keep the check for __GLIBC__ just in case other GNU systems depends on this (Hurd or GNU/kFreeBSD). This fixes a build error with musl libc. Signed-off-by: Natanael Copa --- drivers/crypto/dpaa2_sec/hw/compat.h | 10

[dpdk-dev] [PATCH v3 09/15] app/test: fix setting of -D_GNU_SOURCE with meson

2019-03-13 Thread Natanael Copa
e_cpuset_t; ^ The problem is that cpu_set_t is only defined when _GNU_SOURCE is set. Signed-off-by: Natanael Copa --- app/test/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/test/meson.build b/app/test/meson.build index 05e5ddeb0..2f2ec5057 100644 ---

[dpdk-dev] [PATCH v3 10/15] bus/dpaa: use warn(3) instead of error(3) to improve portability

2019-03-13 Thread Natanael Copa
Fix build with musl libc by using warn(3) instead of error(3). This also fixes error message for kzmalloc failures which previously would have given "Unknown error -1". Signed-off-by: Natanael Copa --- drivers/bus/dpaa/base/fman/netcfg_layer.c | 4 ++-- drivers/bus/dpaa/

[dpdk-dev] [PATCH v3 08/15] app/test: include fcntl.h due to use of O_RDONLY

2019-03-13 Thread Natanael Copa
Fix following build error with musl libc: ../app/test/test_eal_flags.c:152:55: error: 'O_RDONLY' undeclared (first use in this function) fd = openat(dirfd(hugepage_dir), dirent->d_name, O_RDONLY); ^~~~ Signed-off-by:

[dpdk-dev] [PATCH v3 05/15] bus/fslmc: fix compile error with musl libc

2019-03-13 Thread Natanael Copa
This fixes the following compile error with musl libc: ../drivers/bus/fslmc/qbman/include/compat.h:41:10: error: 'stdout' undeclared (first use in this function) fflush(stdout); \ ^~ Signed-off-by: Natanael Copa --- drivers/bus/fslmc/qbman/include/compat.h | 1

[dpdk-dev] [PATCH v3 07/15] net/nfp: build fix for musl libc

2019-03-13 Thread Natanael Copa
Fixes following build error on systems without execinfo.h: ../drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c:19:10: fatal error: execinfo.h: No such file or directory #include ^~~~ Signed-off-by: Natanael Copa --- drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c | 2 ++ 1 file

[dpdk-dev] [PATCH v3 06/15] bus/fslmc: remove unused include of error.h

2019-03-13 Thread Natanael Copa
remove the include. Signed-off-by: Natanael Copa --- drivers/bus/fslmc/qbman/include/compat.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/bus/fslmc/qbman/include/compat.h b/drivers/bus/fslmc/qbman/include/compat.h index ae84528b9..1ddd69e12 100644 --- a/drivers/bus/fslmc/qbman

[dpdk-dev] [PATCH v3 04/15] bus/pci: factor out various ifdefs in pci_uio_ioport_{read, write}

2019-03-13 Thread Natanael Copa
define the macros so we can remove various #if defined(RTE_ARCH_X86) Ref: https://bugs.dpdk.org/show_bug.cgi?id=35#c6 Signed-off-by: Natanael Copa --- drivers/bus/pci/linux/pci_uio.c | 54 +++-- 1 file changed, 24 insertions(+), 30 deletions(-) diff --git a/drivers

[dpdk-dev] [PATCH v3 03/15] bus/pci: add fallback for out[lwb]_p for non GNU libc

2019-03-13 Thread Natanael Copa
ce to `outl_p' pci_uio.c:(.text+0xadf): undefined reference to `outb_p' fixes https://bugs.dpdk.org/show_bug.cgi?id=35 Signed-off-by: Natanael Copa --- drivers/bus/pci/linux/pci_uio.c | 32 +--- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/driver

[dpdk-dev] [PATCH v3 02/15] net/cxgbe: replace uint with unsigned int

2019-03-13 Thread Natanael Copa
Improve portability and fix build error with musl libc: In file included from ../drivers/net/cxgbe/cxgbe_filter.c:7: ../drivers/net/cxgbe/base/common.h:201:4: error: unknown type name 'uint' uint synmapen:1; /* SYN Map Enable */ ^~~~ Signed-off-by: Natanael Copa --- drivers

[dpdk-dev] [PATCH v3 00/15] Build fixes for musl libc

2019-03-13 Thread Natanael Copa
patch set to enable automatted tests and logic for patchwork patchset. Natanael Copa (15): app/testpmd: replace uint with unsigned int net/cxgbe: replace uint with unsigned int bus/pci: add fallback for out[lwb]_p for non GNU libc bus/pci: factor out various ifdefs in pci_uio_ioport_{read

[dpdk-dev] [PATCH v3 01/15] app/testpmd: replace uint with unsigned int

2019-03-13 Thread Natanael Copa
uint8_t *hash_key, uint hash_key_len); ^~~~ int Signed-off-by: Natanael Copa --- app/test-pmd/testpmd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h index fa4887853..8

Re: [dpdk-dev] [PATCH 00/15] Build fixes for musl libc

2019-03-13 Thread Natanael Copa
vers/bus/dpaa/include/netcfg.h:12:10: fatal error: argp.h: > No such file or directory >  #include argp is a GNU extension and in Alpine we have it as a separate addon package. Try `apk add argp-standalone`. I also had to unset the RTE_BACKTRACE when building with ninja. > On 11/03/2

[dpdk-dev] [PATCH v2 15/15] eal/linux: simplify debug message in sigbus_handler

2019-03-12 Thread Natanael Copa
7;: ../lib/librte_eal/linuxapp/eal/eal_dev.c:70:3: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] (int)pthread_self(), info->si_addr); ^ Signed-off-by: Natanael Copa --- v1 -> v2: remove gettid() and remove thread id from debug message. lib/librte_

[dpdk-dev] [PATCH v2 12/15] crypto/dpaa2_sec: build fix for musl libc

2019-03-12 Thread Natanael Copa
The swab16/swab32/swab64 are Linux specific and nog GNU libc specific. Keep the check for __GLIBC__ just in case other GNU systems depends on this (Hurd or GNU/kFreeBSD). This fixes a build error with musl libc. Signed-off-by: Natanael Copa --- v1 -> v2 fixed coding style issues reported

[dpdk-dev] [PATCH v2 04/15] bus/pci: factor out various ifdefs in pci_uio_ioport_{read, write}

2019-03-12 Thread Natanael Copa
define the macros so we can remove various #if defined(RTE_ARCH_X86) Ref: https://bugs.dpdk.org/show_bug.cgi?id=35#c6 Signed-off-by: Natanael Copa --- v1 -> v2 fixed coding style issues reported by checkpatch drivers/bus/pci/linux/pci_uio.c | 54 +++-- 1 f

[dpdk-dev] [PATCH v2 03/15] bus/pci: add fallback for out[lwb]_p for non GNU libc

2019-03-12 Thread Natanael Copa
ce to `outl_p' pci_uio.c:(.text+0xadf): undefined reference to `outb_p' fixes https://bugs.dpdk.org/show_bug.cgi?id=35 Signed-off-by: Natanael Copa --- v2 - fixed coding style issues reported by checkpatch drivers/bus/pci/linux/pci_uio.c | 32 +--- 1 f

[dpdk-dev] [PATCH 15/15] eal/linux: use gettid(2) for debug message in sigbus_handler

2019-03-11 Thread Natanael Copa
7;: ../lib/librte_eal/linuxapp/eal/eal_dev.c:70:3: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] (int)pthread_self(), info->si_addr); ^ Signed-off-by: Natanael Copa --- This is not reallly a compile error, but the warning looked a bit scary, and code looke

[dpdk-dev] [PATCH 14/15] net/netvsc: fix compile warning for fcntl.h include

2019-03-11 Thread Natanael Copa
Fix the following warning when building with musl libc: In file included from ../drivers/net/netvsc/hn_vf.c:14: /usr/include/sys/fcntl.h:1:2: warning: #warning redirecting incorrect #include to [-Wcpp] #warning redirecting incorrect #include to ^~~ Signed-off-by: Natanael Copa

[dpdk-dev] [PATCH 13/15] crypto/dpaa2_sec: simplify pr_{debug, err, warn} macros

2019-03-11 Thread Natanael Copa
Simplify pr_debug, pr_err and pr_warn macros by add an intermediate pr_msg macro. This way we only need test for SUPPRESS_PRINTS once. Signed-off-by: Natanael Copa --- This does not really fix any error, but I cleaned it up while at it. Feel free to skip this patch. drivers/crypto/dpaa2_sec

[dpdk-dev] [PATCH 11/15] bus/dpaa: fix warning: "__WORDSIZE" is not defined, evaluates to 0

2019-03-11 Thread Natanael Copa
There is no standard saying that __WORDSIZE should be be defined or in what include it should be defined. Use a portable way to detect 64 bit environment. This fixes a warning when building with musl libc: warning: "__WORDSIZE" is not defined, evaluates to 0 [-Wundef] Signed-off-by

[dpdk-dev] [PATCH 12/15] crypto/dpaa2_sec: build fix for musl libc

2019-03-11 Thread Natanael Copa
The swab16/swab32/swab64 are Linux specific and nog GNU libc specific. Keep the check for __GLIBC__ just in case other GNU systems depends on this (Hurd or GNU/kFreeBSD). This fixes a build error with musl libc. Signed-off-by: Natanael Copa --- I guess the check for __linux__ and __GLIBC__

[dpdk-dev] [PATCH 10/15] bus/dpaa: use warn(3) instead of error(3) to improve portability

2019-03-11 Thread Natanael Copa
Fix build with musl libc by using warn(3) instead of error(3). This also fixes error message for kzmalloc failures which previously would have given "Unknown error -1". Signed-off-by: Natanael Copa --- Note that err.h is not in POSIX standard either, but is implemented in musl libc.

[dpdk-dev] [PATCH 08/15] app/test: include fcntl.h due to use of O_RDONLY

2019-03-11 Thread Natanael Copa
Fix following build error with musl libc: ../app/test/test_eal_flags.c:152:55: error: 'O_RDONLY' undeclared (first use in this function) fd = openat(dirfd(hugepage_dir), dirent->d_name, O_RDONLY); ^~~~ Signed-off-by:

[dpdk-dev] [PATCH 07/15] net/nfp: build fix for musl libc

2019-03-11 Thread Natanael Copa
Fixes following build error on systems without execinfo.h: ../drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c:19:10: fatal error: execinfo.h: No such file or directory #include ^~~~ Signed-off-by: Natanael Copa --- drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c | 2 ++ 1 file

[dpdk-dev] [PATCH 06/15] bus/fslmc: remove unused include of error.h

2019-03-11 Thread Natanael Copa
remove the include. Signed-off-by: Natanael Copa --- drivers/bus/fslmc/qbman/include/compat.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/bus/fslmc/qbman/include/compat.h b/drivers/bus/fslmc/qbman/include/compat.h index ae84528b9..1ddd69e12 100644 --- a/drivers/bus/fslmc/qbman

[dpdk-dev] [PATCH 09/15] app/test: fix setting of -D_GNU_SOURCE with meson

2019-03-11 Thread Natanael Copa
e_cpuset_t; ^ The problem is that cpu_set_t is only defined when _GNU_SOURCE is set. Signed-off-by: Natanael Copa --- app/test/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/test/meson.build b/app/test/meson.build index 05e5ddeb0..2f2ec5057 100644 ---

[dpdk-dev] [PATCH 05/15] bus/fslmc: fix compile error with musl libc

2019-03-11 Thread Natanael Copa
This fixes the following compile error with musl libc: ../drivers/bus/fslmc/qbman/include/compat.h:41:10: error: 'stdout' undeclared (first use in this function) fflush(stdout); \ ^~ Signed-off-by: Natanael Copa --- drivers/bus/fslmc/qbman/include/compat.h | 1

[dpdk-dev] [PATCH 04/15] bus/pci: factor out various ifdefs in pci_uio_ioport_{read, write}

2019-03-11 Thread Natanael Copa
define the macros so we can remove various #if defined(RTE_ARCH_X86) Ref: https://bugs.dpdk.org/show_bug.cgi?id=35#c6 Signed-off-by: Natanael Copa --- Please note that this is only compile tested with musl libc on x86_64. drivers/bus/pci/linux/pci_uio.c | 54

[dpdk-dev] [PATCH 03/15] bus/pci: add fallback for out[lwb]_p for non GNU libc

2019-03-11 Thread Natanael Copa
ce to `outl_p' pci_uio.c:(.text+0xadf): undefined reference to `outb_p' fixes https://bugs.dpdk.org/show_bug.cgi?id=35 Signed-off-by: Natanael Copa --- Please note that this is only compile tested with musl libc. drivers/bus/pci/linux/pci_uio.c | 32 +--- 1 f

[dpdk-dev] [PATCH 02/15] net/cxgbe: replace uint with unsigned int

2019-03-11 Thread Natanael Copa
Improve portability and fix build error with musl libc: In file included from ../drivers/net/cxgbe/cxgbe_filter.c:7: ../drivers/net/cxgbe/base/common.h:201:4: error: unknown type name 'uint' uint synmapen:1; /* SYN Map Enable */ ^~~~ Signed-off-by: Natanael Copa --- drivers

[dpdk-dev] [PATCH 00/15] Build fixes for musl libc

2019-03-11 Thread Natanael Copa
A set of patches to fix build with musl libc. I also did a few cleanups wrt macros and fixed a few scary compiler warnings while at it. Please note that those are only compile tested on x86_64 with musl libc. Natanael Copa (15): app/testpmd: replace uint with unsigned int net/cxgbe: replace

[dpdk-dev] [PATCH 01/15] app/testpmd: replace uint with unsigned int

2019-03-11 Thread Natanael Copa
uint8_t *hash_key, uint hash_key_len); ^~~~ int Signed-off-by: Natanael Copa --- app/test-pmd/testpmd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h index fa4887853..8