From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 87C31EE49A0 for ; Wed, 23 Aug 2023 06:59:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231276AbjHWG73 (ORCPT ); Wed, 23 Aug 2023 02:59:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50674 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231194AbjHWG73 (ORCPT ); Wed, 23 Aug 2023 02:59:29 -0400 Received: from out-37.mta0.migadu.com (out-37.mta0.migadu.com [91.218.175.37]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E96BECDD for ; Tue, 22 Aug 2023 23:59:26 -0700 (PDT) Message-ID: <86137972-fa63-ef07-3842-3a678329864a@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1692773964; 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=JBuitAfShYT5yjJqohH65eUyXBkcIa7zwJcRrZBv9C0=; b=pJWkR9ObHdIgmBOPK2hAFmcOxHKN40edGEApsCwk/DjYevO39NRDZGgSXsNaLJ86t/pNNk wxBV9D1A1DfYAXRsxjLxucN0o5RSp1Z57tM58mejtpUNMtrOTjlLYc45ukcTzMDvJrq6UL TPTChaIacTqV0YFHaSdBoOwCJWfBsek= Date: Wed, 23 Aug 2023 14:59:10 +0800 MIME-Version: 1.0 Subject: Re: [PATCH 1/2] RDMA/rxe: add missing newline to rxe_set_mtu message To: "Zhijian Li (Fujitsu)" , Zhu Yanjun , "pmladek@suse.com" , "senozhatsky@chromium.org" , Steven Rostedt , "john.ogness@linutronix.de" Cc: "linux-rdma@vger.kernel.org" , "jgg@ziepe.ca" , "leon@kernel.org" , "linux-kernel@vger.kernel.org" , "rpearsonhpe@gmail.com" References: <20230823021306.170901-1-lizhijian@fujitsu.com> <54f43b58-4986-f2c3-7488-ecaf150b1e79@fujitsu.com> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Zhu Yanjun In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org 在 2023/8/23 14:47, Zhijian Li (Fujitsu) 写道: > > On 23/08/2023 14:35, Zhu Yanjun wrote: >> On Wed, Aug 23, 2023 at 2:25 PM Zhijian Li (Fujitsu) >> wrote: >>> >>> >>> On 23/08/2023 14:12, Zhu Yanjun wrote: >>>> 在 2023/8/23 10:13, Li Zhijian 写道: >>>>> A newline help flushing message out. >>>> rxe_info_dev will finally call printk to output information. >>>> >>>> In this link https://github.com/torvalds/linux/blob/master/Documentation/core-api/printk-basics.rst, >>>> " >>>> All printk() messages are printed to the kernel log buffer, which is a ring buffer exported to userspace through /dev/kmsg. The usual way to read it is using dmesg. >>>> " >>>> Do you mean that a new line will help the kernel log buffer flush message out? >>> Yeah, the message will be buffered until it is full or it meets a newline. >> Add PRINTK reviewers: >> >> Petr Mladek >> Sergey Senozhatsky >> Steven Rostedt >> John Ogness >> >> This is about printk. They can decide this commit. > I don't think it's a printk stuff. Do you get me? I mean, prinkt reviewer will check the statement "the message will be buffered until it is full or it meets a newline." correct or not. Zhu Yanjun > > In general, when developers add some printk()/pr_info() to print some message in the kernel, they expect this message will be printed in time. > So most of the printk()/pr_info() calls in current kernel accompany a '\n' at the end. > > And printk() will also print message to 'console' by default, console could be a serial port(ttyS0) or tty1 etc. > > Thanks > Zhijian > > >> Zhu Yanjun >> >>> >>> >>>> Zhu Yanjun >>>>> Signed-off-by: Li Zhijian >>>>> --- >>>>> drivers/infiniband/sw/rxe/rxe.c | 2 +- >>>>> 1 file changed, 1 insertion(+), 1 deletion(-) >>>>> >>>>> diff --git a/drivers/infiniband/sw/rxe/rxe.c b/drivers/infiniband/sw/rxe/rxe.c >>>>> index 54c723a6edda..cb2c0d54aae1 100644 >>>>> --- a/drivers/infiniband/sw/rxe/rxe.c >>>>> +++ b/drivers/infiniband/sw/rxe/rxe.c >>>>> @@ -161,7 +161,7 @@ void rxe_set_mtu(struct rxe_dev *rxe, unsigned int ndev_mtu) >>>>> port->attr.active_mtu = mtu; >>>>> port->mtu_cap = ib_mtu_enum_to_int(mtu); >>>>> - rxe_info_dev(rxe, "Set mtu to %d", port->mtu_cap); >>>>> + rxe_info_dev(rxe, "Set mtu to %d\n", port->mtu_cap); >>>>> } >>>>> /* called by ifc layer to create new rxe device. >>> >