From patchwork Mon Dec 18 09:27:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Marchand X-Patchwork-Id: 135257 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1F53543733; Mon, 18 Dec 2023 10:28:54 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1305D410FB; Mon, 18 Dec 2023 10:28:27 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 38A1D40EDF for ; Mon, 18 Dec 2023 10:28:25 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1702891704; 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=a/bnnX3v/dNrndqeH8GLe0TiwlitB16H38kXl9zD4Eo=; b=cw6lrKOTsG6Cq+x0vdhLUWs8nTisOEr26xEQegaPrCliu7PFsM/j4bLG5tSonXXt+gqKPn 5k+7kh9+MBV90IaUQs3Gx8bGXWbBVRFVK1AJc59KQDxmf/Z/jivKwpKFk4UKt/O6fnbsme bIeRrgTxjR6GZp0wA2weSvyzHQppR/Q= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-443-6u0LwzgEOHq6TOvEd8AEaA-1; Mon, 18 Dec 2023 04:28:20 -0500 X-MC-Unique: 6u0LwzgEOHq6TOvEd8AEaA-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 47C6785A58E; Mon, 18 Dec 2023 09:28:19 +0000 (UTC) Received: from dmarchan.redhat.com (unknown [10.45.224.218]) by smtp.corp.redhat.com (Postfix) with ESMTP id 249195190; Mon, 18 Dec 2023 09:28:17 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: thomas@monjalon.net, ferruh.yigit@amd.com, bruce.richardson@intel.com, stephen@networkplumber.org, mb@smartsharesystems.com, Tyler Retzlaff , Konstantin Ananyev , Dmitry Kozlyuk , Narcisa Ana Maria Vasile , Dmitry Malloy , Pallavi Kadam , Andrew Rybchenko Subject: [PATCH v3 08/14] lib: simplify multilines log messages Date: Mon, 18 Dec 2023 10:27:30 +0100 Message-ID: <20231218092738.749604-9-david.marchand@redhat.com> In-Reply-To: <20231218092738.749604-1-david.marchand@redhat.com> References: <20231117131824.1977792-1-david.marchand@redhat.com> <20231218092738.749604-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Those error log messages don't need to span on multiple lines. Signed-off-by: David Marchand Acked-by: Tyler Retzlaff Reviewed-by: Andrew Rybchenko --- Changes since RFC v2: - fixed format string crossing line boundaries, --- lib/acl/tb_mem.c | 4 ++-- lib/bpf/bpf_stub.c | 6 ++---- lib/eal/windows/eal_hugepages.c | 4 ++-- lib/ethdev/rte_ethdev.c | 12 ++++-------- 4 files changed, 10 insertions(+), 16 deletions(-) diff --git a/lib/acl/tb_mem.c b/lib/acl/tb_mem.c index 6a9d96aaed..4ee65b23da 100644 --- a/lib/acl/tb_mem.c +++ b/lib/acl/tb_mem.c @@ -26,8 +26,8 @@ tb_pool(struct tb_mem_pool *pool, size_t sz) size = sz + pool->alignment - 1; block = calloc(1, size + sizeof(*pool->block)); if (block == NULL) { - RTE_LOG(ERR, ACL, "%s(%zu)\n failed, currently allocated " - "by pool: %zu bytes\n", __func__, sz, pool->alloc); + RTE_LOG(ERR, ACL, "%s(%zu) failed, currently allocated by pool: %zu bytes\n", + __func__, sz, pool->alloc); siglongjmp(pool->fail, -ENOMEM); return NULL; } diff --git a/lib/bpf/bpf_stub.c b/lib/bpf/bpf_stub.c index ebc5343896..83c2203622 100644 --- a/lib/bpf/bpf_stub.c +++ b/lib/bpf/bpf_stub.c @@ -19,8 +19,7 @@ rte_bpf_elf_load(const struct rte_bpf_prm *prm, const char *fname, return NULL; } - RTE_BPF_LOG(ERR, "%s() is not supported with current config\n" - "rebuild with libelf installed\n", + RTE_BPF_LOG(ERR, "%s() is not supported, rebuild with libelf installed\n", __func__); rte_errno = ENOTSUP; return NULL; @@ -36,8 +35,7 @@ rte_bpf_convert(const struct bpf_program *prog) return NULL; } - RTE_BPF_LOG(ERR, "%s() is not supported with current config\n" - "rebuild with libpcap installed\n", + RTE_BPF_LOG(ERR, "%s() is not supported, rebuild with libpcap installed\n", __func__); rte_errno = ENOTSUP; return NULL; diff --git a/lib/eal/windows/eal_hugepages.c b/lib/eal/windows/eal_hugepages.c index b007dceb39..775c67e4c4 100644 --- a/lib/eal/windows/eal_hugepages.c +++ b/lib/eal/windows/eal_hugepages.c @@ -105,8 +105,8 @@ int eal_hugepage_info_init(void) { if (hugepage_claim_privilege() < 0) { - RTE_LOG(ERR, EAL, "Cannot claim hugepage privilege\n" - "Verify that large-page support privilege is assigned to the current user\n"); + RTE_LOG(ERR, EAL, + "Cannot claim hugepage privilege, check large-page support privilege\n"); return -1; } diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c index b9d99ece15..9dd0efa9d8 100644 --- a/lib/ethdev/rte_ethdev.c +++ b/lib/ethdev/rte_ethdev.c @@ -6709,8 +6709,7 @@ rte_eth_ip_reassembly_capability_get(uint16_t port_id, if (dev->data->dev_configured == 0) { RTE_ETHDEV_LOG(ERR, - "Device with port_id=%u is not configured.\n" - "Cannot get IP reassembly capability\n", + "port_id=%u is not configured, cannot get IP reassembly capability\n", port_id); return -EINVAL; } @@ -6745,8 +6744,7 @@ rte_eth_ip_reassembly_conf_get(uint16_t port_id, if (dev->data->dev_configured == 0) { RTE_ETHDEV_LOG(ERR, - "Device with port_id=%u is not configured.\n" - "Cannot get IP reassembly configuration\n", + "port_id=%u is not configured, cannot get IP reassembly configuration\n", port_id); return -EINVAL; } @@ -6779,16 +6777,14 @@ rte_eth_ip_reassembly_conf_set(uint16_t port_id, if (dev->data->dev_configured == 0) { RTE_ETHDEV_LOG(ERR, - "Device with port_id=%u is not configured.\n" - "Cannot set IP reassembly configuration\n", + "port_id=%u is not configured, cannot set IP reassembly configuration\n", port_id); return -EINVAL; } if (dev->data->dev_started != 0) { RTE_ETHDEV_LOG(ERR, - "Device with port_id=%u started,\n" - "cannot configure IP reassembly params.\n", + "port_id=%u is started, cannot configure IP reassembly params.\n", port_id); return -EINVAL; }