From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D9E5DA054A for ; Tue, 25 Oct 2022 17:09:54 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D545942C3C; Tue, 25 Oct 2022 17:09:54 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 22B0242C38 for ; Tue, 25 Oct 2022 17:09:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1666710591; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Y5iEv8V4GEc0e27C5TdCN7SOlDB92pjT1YzaO6o3FOc=; b=ax0AnpABb0cE0xZ2dUtTr2Gm4tXGLnqOpzo/SS57H3MYJFArT9jYMBm0HrotPQAXn5NRf3 Nrj7DqEghbihUatpZe4ph8p6Q1xA9JqG9akJAIhlwS6Hr7J9t9rmJR19XPro0myqJJ5YDX LUn7+gE+Cy3HapF81u8YrywpIRY4IVE= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-324-52A-WPiuPrWRZBxFoNYw_A-1; Tue, 25 Oct 2022 11:09:50 -0400 X-MC-Unique: 52A-WPiuPrWRZBxFoNYw_A-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 9267A858F17; Tue, 25 Oct 2022 15:09:48 +0000 (UTC) Received: from rh.redhat.com (unknown [10.39.192.13]) by smtp.corp.redhat.com (Postfix) with ESMTP id E65BC477F5C; Tue, 25 Oct 2022 15:09:46 +0000 (UTC) From: Kevin Traynor To: Olivier Matz Cc: David Marchand , Akhil Goyal , dpdk stable Subject: patch 'cryptodev: fix unduly newlines in logs' has been queued to stable release 21.11.3 Date: Tue, 25 Oct 2022 16:07:15 +0100 Message-Id: <20221025150734.142189-80-ktraynor@redhat.com> In-Reply-To: <20221025150734.142189-1-ktraynor@redhat.com> References: <20221025150734.142189-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org 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 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 Reviewed-by: David Marchand Acked-by: Akhil Goyal --- 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@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,