From patchwork Mon Jun 27 09:27:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Marchand X-Patchwork-Id: 113463 X-Patchwork-Delegate: maxime.coquelin@redhat.com 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 3D886A0552; Mon, 27 Jun 2022 11:27:49 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2FBBA41141; Mon, 27 Jun 2022 11:27:49 +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 709524282B for ; Mon, 27 Jun 2022 11:27:47 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1656322067; 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=zhQbA4vFCFk4ALQX3NWtFRaBBVDpEAQSQZIwTqyoK4g=; b=FtwtHI5qhs1ajOgPwFqzsgNCvoM2bfyP+ARXleYTJZjnEuaxTxnZS2F1dWP7mtpYVgMnjR scuE/LmXcabgtEVyy5F0GrPmtCSQsgKhzD3Vz662v8aBqmmJgU+P4UAgpNEFonoNN9rOyB st2tYs8yURSchdszPHQMdreoni4edCA= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-328-39UmnOT3MeixaOsPE1PrUQ-1; Mon, 27 Jun 2022 05:27:42 -0400 X-MC-Unique: 39UmnOT3MeixaOsPE1PrUQ-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id AB51D1C07824; Mon, 27 Jun 2022 09:27:41 +0000 (UTC) Received: from localhost.localdomain (unknown [10.40.192.104]) by smtp.corp.redhat.com (Postfix) with ESMTP id 66217815B; Mon, 27 Jun 2022 09:27:40 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: maxime.coquelin@redhat.com, chenbo.xia@intel.com, stable@dpdk.org, Yuanhan Liu , Jens Freimann Subject: [PATCH 1/4] vhost: add some trailing newline in log messages Date: Mon, 27 Jun 2022 11:27:25 +0200 Message-Id: <20220627092728.78214-2-david.marchand@redhat.com> In-Reply-To: <20220627092728.78214-1-david.marchand@redhat.com> References: <20220627092728.78214-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=david.marchand@redhat.com 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 VHOST_LOG_* macros don't append a newline. Add missing ones. Fixes: e623e0c6d8a5 ("vhost: add reconnect ability") Fixes: af1475918124 ("vhost: introduce API to start a specific driver") Fixes: 2dfeebe26546 ("vhost: check return of mutex initialization") Cc: stable@dpdk.org Signed-off-by: David Marchand Reviewed-by: Chenbo Xia --- lib/vhost/socket.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/vhost/socket.c b/lib/vhost/socket.c index 7a0f63af14..24d60ca149 100644 --- a/lib/vhost/socket.c +++ b/lib/vhost/socket.c @@ -499,7 +499,7 @@ vhost_user_reconnect_init(void) ret = pthread_mutex_init(&reconn_list.mutex, NULL); if (ret < 0) { - VHOST_LOG_CONFIG(ERR, "%s: failed to initialize mutex", __func__); + VHOST_LOG_CONFIG(ERR, "%s: failed to initialize mutex\n", __func__); return ret; } TAILQ_INIT(&reconn_list.head); @@ -507,9 +507,9 @@ vhost_user_reconnect_init(void) ret = rte_ctrl_thread_create(&reconn_tid, "vhost_reconn", NULL, vhost_user_client_reconnect, NULL); if (ret != 0) { - VHOST_LOG_CONFIG(ERR, "failed to create reconnect thread"); + VHOST_LOG_CONFIG(ERR, "failed to create reconnect thread\n"); if (pthread_mutex_destroy(&reconn_list.mutex)) - VHOST_LOG_CONFIG(ERR, "%s: failed to destroy reconnect mutex", __func__); + VHOST_LOG_CONFIG(ERR, "%s: failed to destroy reconnect mutex\n", __func__); } return ret; @@ -1170,8 +1170,8 @@ rte_vhost_driver_start(const char *path) "vhost-events", NULL, fdset_event_dispatch, &vhost_user.fdset); if (ret != 0) { - VHOST_LOG_CONFIG(ERR, "(%s) failed to create fdset handling thread", path); - + VHOST_LOG_CONFIG(ERR, "(%s) failed to create fdset handling thread\n", + path); fdset_pipe_uninit(&vhost_user.fdset); return -1; }