patch 'cryptodev: fix unduly newlines in logs' has been queued to stable release 20.11.7

luca.boccassi at gmail.com luca.boccassi at gmail.com
Thu Nov 3 10:27:15 CET 2022


Hi,

FYI, your patch has been queued to stable release 20.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/05/22. 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/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/3c6f65c8741cff891db01ec3dc7dedac754f8886

Thanks.

Luca Boccassi

---
>From 3c6f65c8741cff891db01ec3dc7dedac754f8886 Mon Sep 17 00:00:00 2001
From: Olivier Matz <olivier.matz at 6wind.com>
Date: Thu, 29 Sep 2022 14:05:01 +0200
Subject: [PATCH] cryptodev: fix unduly newlines in logs

[ upstream commit a0a17e2a3ef42393e9e256aeb01fefbb90f9b1bd ]

The CDEV_LOG_* macros already add a '\n' at the end of
the line. Remove it from format strings to avoid duplicated
newlines.

Fixes: 9e6edea4180 ("cryptodev: add APIs to assist PMD initialisation")
Fixes: e764cd72a9b ("cryptodev: update symmetric session structure")
Fixes: 1d6f89885e1 ("cryptodev: add sym session mempool create")
Fixes: 1f1e4b7cbaa ("cryptodev: use single mempool for asymmetric session")
Fixes: 757f40e28e1 ("cryptodev: modify return value for asym session create")
Fixes: cea66374dcb ("cryptodev: support asymmetric operations")

Signed-off-by: Olivier Matz <olivier.matz at 6wind.com>
Reviewed-by: David Marchand <david.marchand at redhat.com>
Acked-by: Akhil Goyal <gakhil at marvell.com>
---
 lib/librte_cryptodev/rte_cryptodev.c     | 20 ++++++++++----------
 lib/librte_cryptodev/rte_cryptodev_pmd.c |  4 ++--
 lib/librte_cryptodev/rte_cryptodev_pmd.h |  2 +-
 3 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index 3d95ac6ea2..3c32952282 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -1088,13 +1088,13 @@ rte_cryptodev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id,
 	}
 
 	if (!qp_conf) {
-		CDEV_LOG_ERR("qp_conf cannot be NULL\n");
+		CDEV_LOG_ERR("qp_conf cannot be NULL");
 		return -EINVAL;
 	}
 
 	if ((qp_conf->mp_session && !qp_conf->mp_session_private) ||
 			(!qp_conf->mp_session && qp_conf->mp_session_private)) {
-		CDEV_LOG_ERR("Invalid mempools\n");
+		CDEV_LOG_ERR("Invalid mempools");
 		return -EINVAL;
 	}
 
@@ -1107,7 +1107,7 @@ rte_cryptodev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id,
 		pool_priv = rte_mempool_get_priv(qp_conf->mp_session);
 		if (!pool_priv || qp_conf->mp_session->private_data_size <
 				sizeof(*pool_priv)) {
-			CDEV_LOG_ERR("Invalid mempool\n");
+			CDEV_LOG_ERR("Invalid mempool");
 			return -EINVAL;
 		}
 
@@ -1118,7 +1118,7 @@ rte_cryptodev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id,
 			obj_size) || (s.nb_drivers <= dev->driver_id) ||
 			rte_cryptodev_sym_get_private_session_size(dev_id) >
 				obj_priv_size) {
-			CDEV_LOG_ERR("Invalid mempool\n");
+			CDEV_LOG_ERR("Invalid mempool");
 			return -EINVAL;
 		}
 	}
@@ -1407,7 +1407,7 @@ rte_cryptodev_sym_session_pool_create(const char *name, uint32_t nb_elts,
 
 	obj_sz = rte_cryptodev_sym_get_header_session_size() + user_data_size;
 	if (obj_sz > elt_size)
-		CDEV_LOG_INFO("elt_size %u is expanded to %u\n", elt_size,
+		CDEV_LOG_INFO("elt_size %u is expanded to %u", elt_size,
 				obj_sz);
 	else
 		obj_sz = elt_size;
@@ -1417,14 +1417,14 @@ rte_cryptodev_sym_session_pool_create(const char *name, uint32_t nb_elts,
 			NULL, NULL, NULL, NULL,
 			socket_id, 0);
 	if (mp == NULL) {
-		CDEV_LOG_ERR("%s(name=%s) failed, rte_errno=%d\n",
+		CDEV_LOG_ERR("%s(name=%s) failed, rte_errno=%d",
 			__func__, name, rte_errno);
 		return NULL;
 	}
 
 	pool_priv = rte_mempool_get_priv(mp);
 	if (!pool_priv) {
-		CDEV_LOG_ERR("%s(name=%s) failed to get private data\n",
+		CDEV_LOG_ERR("%s(name=%s) failed to get private data",
 			__func__, name);
 		rte_mempool_free(mp);
 		return NULL;
@@ -1472,7 +1472,7 @@ rte_cryptodev_sym_session_create(struct rte_mempool *mp)
 	struct rte_cryptodev_sym_session_pool_private_data *pool_priv;
 
 	if (!rte_cryptodev_sym_is_valid_session_pool(mp)) {
-		CDEV_LOG_ERR("Invalid mempool\n");
+		CDEV_LOG_ERR("Invalid mempool");
 		return NULL;
 	}
 
@@ -1506,7 +1506,7 @@ rte_cryptodev_asym_session_create(struct rte_mempool *mp)
 			rte_cryptodev_asym_get_header_session_size();
 
 	if (!mp) {
-		CDEV_LOG_ERR("invalid mempool\n");
+		CDEV_LOG_ERR("invalid mempool");
 		return NULL;
 	}
 
@@ -1889,7 +1889,7 @@ rte_crypto_op_pool_create(const char *name, enum rte_crypto_op_type type,
 		elt_size += RTE_MAX(sizeof(struct rte_crypto_sym_op),
 		                    sizeof(struct rte_crypto_asym_op));
 	} else {
-		CDEV_LOG_ERR("Invalid op_type\n");
+		CDEV_LOG_ERR("Invalid op_type");
 		return NULL;
 	}
 
diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.c b/lib/librte_cryptodev/rte_cryptodev_pmd.c
index e342daabc4..5445b015d9 100644
--- a/lib/librte_cryptodev/rte_cryptodev_pmd.c
+++ b/lib/librte_cryptodev/rte_cryptodev_pmd.c
@@ -94,11 +94,11 @@ rte_cryptodev_pmd_create(const char *name,
 	struct rte_cryptodev *cryptodev;
 
 	if (params->name[0] != '\0') {
-		CDEV_LOG_INFO("User specified device name = %s\n", params->name);
+		CDEV_LOG_INFO("User specified device name = %s", params->name);
 		name = params->name;
 	}
 
-	CDEV_LOG_INFO("Creating cryptodev %s\n", name);
+	CDEV_LOG_INFO("Creating cryptodev %s", name);
 
 	CDEV_LOG_INFO("Initialisation parameters - name: %s,"
 			"socket id: %d, max queue pairs: %u",
diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.h b/lib/librte_cryptodev/rte_cryptodev_pmd.h
index 6c46acf7c2..f35c66868f 100644
--- a/lib/librte_cryptodev/rte_cryptodev_pmd.h
+++ b/lib/librte_cryptodev/rte_cryptodev_pmd.h
@@ -541,7 +541,7 @@ set_sym_session_private_data(struct rte_cryptodev_sym_session *sess,
 		uint8_t driver_id, void *private_data)
 {
 	if (unlikely(sess->nb_drivers <= driver_id)) {
-		CDEV_LOG_ERR("Set private data for driver %u not allowed\n",
+		CDEV_LOG_ERR("Set private data for driver %u not allowed",
 				driver_id);
 		return;
 	}
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-11-03 09:27:28.857362508 +0000
+++ 0057-cryptodev-fix-unduly-newlines-in-logs.patch	2022-11-03 09:27:25.465424221 +0000
@@ -1 +1 @@
-From a0a17e2a3ef42393e9e256aeb01fefbb90f9b1bd Mon Sep 17 00:00:00 2001
+From 3c6f65c8741cff891db01ec3dc7dedac754f8886 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a0a17e2a3ef42393e9e256aeb01fefbb90f9b1bd ]
+
@@ -16 +17,0 @@
-Cc: stable at dpdk.org
@@ -22,4 +23,4 @@
- lib/cryptodev/cryptodev_pmd.c |  4 ++--
- lib/cryptodev/cryptodev_pmd.h |  2 +-
- lib/cryptodev/rte_cryptodev.c | 26 +++++++++++++-------------
- 3 files changed, 16 insertions(+), 16 deletions(-)
+ lib/librte_cryptodev/rte_cryptodev.c     | 20 ++++++++++----------
+ lib/librte_cryptodev/rte_cryptodev_pmd.c |  4 ++--
+ lib/librte_cryptodev/rte_cryptodev_pmd.h |  2 +-
+ 3 files changed, 13 insertions(+), 13 deletions(-)
@@ -27,36 +28,5 @@
-diff --git a/lib/cryptodev/cryptodev_pmd.c b/lib/cryptodev/cryptodev_pmd.c
-index d90b2570b1..77b269f312 100644
---- a/lib/cryptodev/cryptodev_pmd.c
-+++ b/lib/cryptodev/cryptodev_pmd.c
-@@ -99,11 +99,11 @@ rte_cryptodev_pmd_create(const char *name,
- 	struct rte_cryptodev *cryptodev;
- 
- 	if (params->name[0] != '\0') {
--		CDEV_LOG_INFO("User specified device name = %s\n", params->name);
-+		CDEV_LOG_INFO("User specified device name = %s", params->name);
- 		name = params->name;
- 	}
- 
--	CDEV_LOG_INFO("Creating cryptodev %s\n", name);
-+	CDEV_LOG_INFO("Creating cryptodev %s", name);
- 
- 	CDEV_LOG_INFO("Initialisation parameters - name: %s,"
- 			"socket id: %d, max queue pairs: %u",
-diff --git a/lib/cryptodev/cryptodev_pmd.h b/lib/cryptodev/cryptodev_pmd.h
-index 96d7e225b0..09ba952455 100644
---- a/lib/cryptodev/cryptodev_pmd.h
-+++ b/lib/cryptodev/cryptodev_pmd.h
-@@ -652,7 +652,7 @@ set_sym_session_private_data(struct rte_cryptodev_sym_session *sess,
- 		uint8_t driver_id, void *private_data)
- {
- 	if (unlikely(sess->nb_drivers <= driver_id)) {
--		CDEV_LOG_ERR("Set private data for driver %u not allowed\n",
-+		CDEV_LOG_ERR("Set private data for driver %u not allowed",
- 				driver_id);
- 		return;
- 	}
-diff --git a/lib/cryptodev/rte_cryptodev.c b/lib/cryptodev/rte_cryptodev.c
-index 0b3c64df89..9e76a1c72d 100644
---- a/lib/cryptodev/rte_cryptodev.c
-+++ b/lib/cryptodev/rte_cryptodev.c
-@@ -1351,13 +1351,13 @@ rte_cryptodev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id,
+diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
+index 3d95ac6ea2..3c32952282 100644
+--- a/lib/librte_cryptodev/rte_cryptodev.c
++++ b/lib/librte_cryptodev/rte_cryptodev.c
+@@ -1088,13 +1088,13 @@ rte_cryptodev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id,
@@ -78 +48 @@
-@@ -1370,7 +1370,7 @@ rte_cryptodev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id,
+@@ -1107,7 +1107,7 @@ rte_cryptodev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id,
@@ -87 +57 @@
-@@ -1381,7 +1381,7 @@ rte_cryptodev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id,
+@@ -1118,7 +1118,7 @@ rte_cryptodev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id,
@@ -96 +66 @@
-@@ -1921,7 +1921,7 @@ rte_cryptodev_sym_session_pool_create(const char *name, uint32_t nb_elts,
+@@ -1407,7 +1407,7 @@ rte_cryptodev_sym_session_pool_create(const char *name, uint32_t nb_elts,
@@ -105,27 +75 @@
-@@ -1931,14 +1931,14 @@ rte_cryptodev_sym_session_pool_create(const char *name, uint32_t nb_elts,
- 			NULL, NULL, NULL, NULL,
- 			socket_id, 0);
- 	if (mp == NULL) {
--		CDEV_LOG_ERR("%s(name=%s) failed, rte_errno=%d\n",
-+		CDEV_LOG_ERR("%s(name=%s) failed, rte_errno=%d",
- 			__func__, name, rte_errno);
- 		return NULL;
- 	}
- 
- 	pool_priv = rte_mempool_get_priv(mp);
- 	if (!pool_priv) {
--		CDEV_LOG_ERR("%s(name=%s) failed to get private data\n",
-+		CDEV_LOG_ERR("%s(name=%s) failed to get private data",
- 			__func__, name);
- 		rte_mempool_free(mp);
- 		return NULL;
-@@ -1969,7 +1969,7 @@ rte_cryptodev_asym_session_pool_create(const char *name, uint32_t nb_elts,
- 				max_priv_sz = priv_sz;
- 		}
- 	if (max_priv_sz == 0) {
--		CDEV_LOG_INFO("Could not set max private session size\n");
-+		CDEV_LOG_INFO("Could not set max private session size");
- 		return NULL;
- 	}
- 
-@@ -1982,14 +1982,14 @@ rte_cryptodev_asym_session_pool_create(const char *name, uint32_t nb_elts,
+@@ -1417,14 +1417,14 @@ rte_cryptodev_sym_session_pool_create(const char *name, uint32_t nb_elts,
@@ -148 +92 @@
-@@ -2036,7 +2036,7 @@ rte_cryptodev_sym_session_create(struct rte_mempool *mp)
+@@ -1472,7 +1472,7 @@ rte_cryptodev_sym_session_create(struct rte_mempool *mp)
@@ -157,2 +101,2 @@
-@@ -2086,7 +2086,7 @@ rte_cryptodev_asym_session_create(uint8_t dev_id,
- 		return -EINVAL;
+@@ -1506,7 +1506,7 @@ rte_cryptodev_asym_session_create(struct rte_mempool *mp)
+ 			rte_cryptodev_asym_get_header_session_size();
@@ -163 +107 @@
- 		return -EINVAL;
+ 		return NULL;
@@ -166 +110 @@
-@@ -2570,7 +2570,7 @@ rte_crypto_op_pool_create(const char *name, enum rte_crypto_op_type type,
+@@ -1889,7 +1889,7 @@ rte_crypto_op_pool_create(const char *name, enum rte_crypto_op_type type,
@@ -174,0 +119,31 @@
+diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.c b/lib/librte_cryptodev/rte_cryptodev_pmd.c
+index e342daabc4..5445b015d9 100644
+--- a/lib/librte_cryptodev/rte_cryptodev_pmd.c
++++ b/lib/librte_cryptodev/rte_cryptodev_pmd.c
+@@ -94,11 +94,11 @@ rte_cryptodev_pmd_create(const char *name,
+ 	struct rte_cryptodev *cryptodev;
+ 
+ 	if (params->name[0] != '\0') {
+-		CDEV_LOG_INFO("User specified device name = %s\n", params->name);
++		CDEV_LOG_INFO("User specified device name = %s", params->name);
+ 		name = params->name;
+ 	}
+ 
+-	CDEV_LOG_INFO("Creating cryptodev %s\n", name);
++	CDEV_LOG_INFO("Creating cryptodev %s", name);
+ 
+ 	CDEV_LOG_INFO("Initialisation parameters - name: %s,"
+ 			"socket id: %d, max queue pairs: %u",
+diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.h b/lib/librte_cryptodev/rte_cryptodev_pmd.h
+index 6c46acf7c2..f35c66868f 100644
+--- a/lib/librte_cryptodev/rte_cryptodev_pmd.h
++++ b/lib/librte_cryptodev/rte_cryptodev_pmd.h
+@@ -541,7 +541,7 @@ set_sym_session_private_data(struct rte_cryptodev_sym_session *sess,
+ 		uint8_t driver_id, void *private_data)
+ {
+ 	if (unlikely(sess->nb_drivers <= driver_id)) {
+-		CDEV_LOG_ERR("Set private data for driver %u not allowed\n",
++		CDEV_LOG_ERR("Set private data for driver %u not allowed",
+ 				driver_id);
+ 		return;
+ 	}


More information about the stable mailing list