[dpdk-stable] patch 'common/dpaax/caamflib: fix build with musl' has been queued to stable release 19.11.9

Christian Ehrhardt christian.ehrhardt at canonical.com
Mon May 17 18:07:50 CEST 2021


Hi,

FYI, your patch has been queued to stable release 19.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/19/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/6b51c0a4e900ea28b97262537ff31fec396f9bd8

Thanks.

Christian Ehrhardt <christian.ehrhardt at canonical.com>

---
>From 6b51c0a4e900ea28b97262537ff31fec396f9bd8 Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa at alpinelinux.org>
Date: Thu, 5 Nov 2020 22:17:14 +0100
Subject: [PATCH] common/dpaax/caamflib: fix build with musl

[ upstream commit 8bf3ff3c37ec1786470dfa7b8056e3304bbba14f ]

The swab16/swab32/swab64 are Linux specific and not 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.

Fixes: 04711d41a872 ("crypto/dpaa2_sec: add run-time assembler for descriptor")

Signed-off-by: Natanael Copa <ncopa at alpinelinux.org>
Acked-by: Hemant Agrawal <hemant.agrawal at nxp.com>
Signed-off-by: Thomas Monjalon <thomas at monjalon.net>
Acked-by: Andrew Rybchenko <andrew.rybchenko at oktetlabs.ru>
Acked-by: David Marchand <david.marchand at redhat.com>
---
 drivers/common/dpaax/caamflib/compat.h | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/common/dpaax/caamflib/compat.h b/drivers/common/dpaax/caamflib/compat.h
index ce946ccb5c..95d887a9d6 100644
--- a/drivers/common/dpaax/caamflib/compat.h
+++ b/drivers/common/dpaax/caamflib/compat.h
@@ -11,7 +11,7 @@
 #include <stdint.h>
 #include <errno.h>
 
-#ifdef __GLIBC__
+#ifdef RTE_EXEC_ENV_LINUX
 #include <string.h>
 #include <stdlib.h>
 #include <stdio.h>
@@ -24,7 +24,7 @@
 #error "Undefined endianness"
 #endif
 
-#else
+#else /* !RTE_EXEC_ENV_LINUX */
 #error Environment not supported!
 #endif
 
@@ -40,7 +40,7 @@
 #define __maybe_unused __attribute__((unused))
 #endif
 
-#if defined(__GLIBC__) && !defined(pr_debug)
+#if !defined(pr_debug)
 #if !defined(SUPPRESS_PRINTS) && defined(RTA_DEBUG)
 #define pr_debug(fmt, ...) \
 	RTE_LOG(DEBUG, PMD, "%s(): " fmt "\n", __func__, ##__VA_ARGS__)
@@ -49,7 +49,7 @@
 #endif
 #endif /* pr_debug */
 
-#if defined(__GLIBC__) && !defined(pr_err)
+#if !defined(pr_err)
 #if !defined(SUPPRESS_PRINTS)
 #define pr_err(fmt, ...) \
 	RTE_LOG(ERR, PMD, "%s(): " fmt "\n", __func__, ##__VA_ARGS__)
@@ -58,7 +58,7 @@
 #endif
 #endif /* pr_err */
 
-#if defined(__GLIBC__) && !defined(pr_warn)
+#if !defined(pr_warn)
 #if !defined(SUPPRESS_PRINTS)
 #define pr_warn(fmt, ...) \
 	RTE_LOG(WARNING, PMD, "%s(): " fmt "\n", __func__, ##__VA_ARGS__)
@@ -101,7 +101,7 @@
 #endif
 
 /* Use Linux naming convention */
-#ifdef __GLIBC__
+#if defined(RTE_EXEC_ENV_LINUX) || defined(__GLIBC__)
 	#define swab16(x) rte_bswap16(x)
 	#define swab32(x) rte_bswap32(x)
 	#define swab64(x) rte_bswap64(x)
-- 
2.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:31.155847951 +0200
+++ 0041-common-dpaax-caamflib-fix-build-with-musl.patch	2021-05-17 17:40:29.171809476 +0200
@@ -1 +1 @@
-From 8bf3ff3c37ec1786470dfa7b8056e3304bbba14f Mon Sep 17 00:00:00 2001
+From 6b51c0a4e900ea28b97262537ff31fec396f9bd8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8bf3ff3c37ec1786470dfa7b8056e3304bbba14f ]
+
@@ -13 +14,0 @@
-Cc: stable at dpdk.org
@@ -25 +26 @@
-index 36ee4b5335..c1a693498d 100644
+index ce946ccb5c..95d887a9d6 100644
@@ -47 +48 @@
- #define __maybe_unused __rte_unused
+ #define __maybe_unused __attribute__((unused))


More information about the stable mailing list