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

Kevin Traynor ktraynor at redhat.com
Tue Oct 25 17:07:15 CEST 2022


Hi,

FYI, your patch has been queued to stable release 21.11.3

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/01/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/6638450e4b8cb42f1deebf600c63e7c04373a33f

Thanks.

Kevin

---
>From 6638450e4b8cb42f1deebf600c63e7c04373a33f 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/cryptodev/cryptodev_pmd.c |  4 ++--
 lib/cryptodev/cryptodev_pmd.h |  2 +-
 lib/cryptodev/rte_cryptodev.c | 20 ++++++++++----------
 3 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/lib/cryptodev/cryptodev_pmd.c b/lib/cryptodev/cryptodev_pmd.c
index 739a0b3f34..3b8ccdcede 100644
--- a/lib/cryptodev/cryptodev_pmd.c
+++ b/lib/cryptodev/cryptodev_pmd.c
@@ -97,9 +97,9 @@ rte_cryptodev_pmd_create(const char *name,
 
 	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,"
diff --git a/lib/cryptodev/cryptodev_pmd.h b/lib/cryptodev/cryptodev_pmd.h
index 56e659b474..bc71cada4a 100644
--- a/lib/cryptodev/cryptodev_pmd.h
+++ b/lib/cryptodev/cryptodev_pmd.h
@@ -624,5 +624,5 @@ set_sym_session_private_data(struct rte_cryptodev_sym_session *sess,
 {
 	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 e38d7b067a..bf75ce70ad 100644
--- a/lib/cryptodev/rte_cryptodev.c
+++ b/lib/cryptodev/rte_cryptodev.c
@@ -1225,5 +1225,5 @@ 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;
 	}
@@ -1231,5 +1231,5 @@ rte_cryptodev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id,
 	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;
 	}
@@ -1244,5 +1244,5 @@ rte_cryptodev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id,
 		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;
 		}
@@ -1255,5 +1255,5 @@ rte_cryptodev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_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;
 		}
@@ -1813,5 +1813,5 @@ 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
@@ -1823,5 +1823,5 @@ rte_cryptodev_sym_session_pool_create(const char *name, uint32_t nb_elts,
 			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;
@@ -1830,5 +1830,5 @@ rte_cryptodev_sym_session_pool_create(const char *name, uint32_t nb_elts,
 	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);
@@ -1878,5 +1878,5 @@ rte_cryptodev_sym_session_create(struct rte_mempool *mp)
 
 	if (!rte_cryptodev_sym_is_valid_session_pool(mp)) {
-		CDEV_LOG_ERR("Invalid mempool\n");
+		CDEV_LOG_ERR("Invalid mempool");
 		return NULL;
 	}
@@ -1912,5 +1912,5 @@ rte_cryptodev_asym_session_create(struct rte_mempool *mp)
 
 	if (!mp) {
-		CDEV_LOG_ERR("invalid mempool\n");
+		CDEV_LOG_ERR("invalid mempool");
 		return NULL;
 	}
@@ -2296,5 +2296,5 @@ rte_crypto_op_pool_create(const char *name, enum rte_crypto_op_type type,
 		                    sizeof(struct rte_crypto_asym_op));
 	} else {
-		CDEV_LOG_ERR("Invalid op_type\n");
+		CDEV_LOG_ERR("Invalid op_type");
 		return NULL;
 	}
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:19:00.355145274 +0100
+++ 0080-cryptodev-fix-unduly-newlines-in-logs.patch	2022-10-25 14:18:58.510798446 +0100
@@ -1 +1 @@
-From a0a17e2a3ef42393e9e256aeb01fefbb90f9b1bd Mon Sep 17 00:00:00 2001
+From 6638450e4b8cb42f1deebf600c63e7c04373a33f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a0a17e2a3ef42393e9e256aeb01fefbb90f9b1bd ]
+
@@ -16 +17,0 @@
-Cc: stable at dpdk.org
@@ -24,2 +25,2 @@
- lib/cryptodev/rte_cryptodev.c | 26 +++++++++++++-------------
- 3 files changed, 16 insertions(+), 16 deletions(-)
+ lib/cryptodev/rte_cryptodev.c | 20 ++++++++++----------
+ 3 files changed, 13 insertions(+), 13 deletions(-)
@@ -28 +29 @@
-index d90b2570b1..77b269f312 100644
+index 739a0b3f34..3b8ccdcede 100644
@@ -31 +32 @@
-@@ -100,9 +100,9 @@ rte_cryptodev_pmd_create(const char *name,
+@@ -97,9 +97,9 @@ rte_cryptodev_pmd_create(const char *name,
@@ -44 +45 @@
-index 96d7e225b0..09ba952455 100644
+index 56e659b474..bc71cada4a 100644
@@ -47 +48 @@
-@@ -653,5 +653,5 @@ set_sym_session_private_data(struct rte_cryptodev_sym_session *sess,
+@@ -624,5 +624,5 @@ set_sym_session_private_data(struct rte_cryptodev_sym_session *sess,
@@ -55 +56 @@
-index 0b3c64df89..9e76a1c72d 100644
+index e38d7b067a..bf75ce70ad 100644
@@ -58 +59 @@
-@@ -1352,5 +1352,5 @@ rte_cryptodev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id,
+@@ -1225,5 +1225,5 @@ rte_cryptodev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id,
@@ -65 +66 @@
-@@ -1358,5 +1358,5 @@ rte_cryptodev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id,
+@@ -1231,5 +1231,5 @@ rte_cryptodev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id,
@@ -72 +73 @@
-@@ -1371,5 +1371,5 @@ rte_cryptodev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id,
+@@ -1244,5 +1244,5 @@ rte_cryptodev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id,
@@ -79 +80 @@
-@@ -1382,5 +1382,5 @@ rte_cryptodev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id,
+@@ -1255,5 +1255,5 @@ rte_cryptodev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id,
@@ -86 +87 @@
-@@ -1922,5 +1922,5 @@ rte_cryptodev_sym_session_pool_create(const char *name, uint32_t nb_elts,
+@@ -1813,5 +1813,5 @@ rte_cryptodev_sym_session_pool_create(const char *name, uint32_t nb_elts,
@@ -93,22 +94 @@
-@@ -1932,5 +1932,5 @@ rte_cryptodev_sym_session_pool_create(const char *name, uint32_t nb_elts,
- 			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;
-@@ -1939,5 +1939,5 @@ rte_cryptodev_sym_session_pool_create(const char *name, uint32_t nb_elts,
- 	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);
-@@ -1970,5 +1970,5 @@ rte_cryptodev_asym_session_pool_create(const char *name, uint32_t nb_elts,
- 		}
- 	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;
- 	}
-@@ -1983,5 +1983,5 @@ rte_cryptodev_asym_session_pool_create(const char *name, uint32_t nb_elts,
+@@ -1823,5 +1823,5 @@ rte_cryptodev_sym_session_pool_create(const char *name, uint32_t nb_elts,
@@ -121 +101 @@
-@@ -1990,5 +1990,5 @@ rte_cryptodev_asym_session_pool_create(const char *name, uint32_t nb_elts,
+@@ -1830,5 +1830,5 @@ rte_cryptodev_sym_session_pool_create(const char *name, uint32_t nb_elts,
@@ -128 +108 @@
-@@ -2037,5 +2037,5 @@ rte_cryptodev_sym_session_create(struct rte_mempool *mp)
+@@ -1878,5 +1878,5 @@ rte_cryptodev_sym_session_create(struct rte_mempool *mp)
@@ -135 +115 @@
-@@ -2087,5 +2087,5 @@ rte_cryptodev_asym_session_create(uint8_t dev_id,
+@@ -1912,5 +1912,5 @@ rte_cryptodev_asym_session_create(struct rte_mempool *mp)
@@ -140 +120 @@
- 		return -EINVAL;
+ 		return NULL;
@@ -142 +122 @@
-@@ -2571,5 +2571,5 @@ rte_crypto_op_pool_create(const char *name, enum rte_crypto_op_type type,
+@@ -2296,5 +2296,5 @@ rte_crypto_op_pool_create(const char *name, enum rte_crypto_op_type type,



More information about the stable mailing list