From: "Zhijian Li (Fujitsu)" <lizhijian@fujitsu.com>
To: Zhu Yanjun <zyjzyj2000@gmail.com>,
"pmladek@suse.com" <pmladek@suse.com>,
"senozhatsky@chromium.org" <senozhatsky@chromium.org>,
Steven Rostedt <rostedt@goodmis.org>,
"john.ogness@linutronix.de" <john.ogness@linutronix.de>
Cc: Zhu Yanjun <yanjun.zhu@linux.dev>,
"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
"jgg@ziepe.ca" <jgg@ziepe.ca>,
"leon@kernel.org" <leon@kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"rpearsonhpe@gmail.com" <rpearsonhpe@gmail.com>
Subject: Re: [PATCH 1/2] RDMA/rxe: add missing newline to rxe_set_mtu message
Date: Wed, 23 Aug 2023 06:47:07 +0000 [thread overview]
Message-ID: <e823d7aa-99d6-1417-8aca-c89db1c350b9@fujitsu.com> (raw)
In-Reply-To: <CAD=hENcGfS0++mTTX4z-YT3SAx=5OYyqSf89=AkOCD9+SrUtag@mail.gmail.com>
On 23/08/2023 14:35, Zhu Yanjun wrote:
> On Wed, Aug 23, 2023 at 2:25 PM Zhijian Li (Fujitsu)
> <lizhijian@fujitsu.com> 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 <pmladek@suse.com>
> Sergey Senozhatsky <senozhatsky@chromium.org>
> Steven Rostedt <rostedt@goodmis.org>
> John Ogness <john.ogness@linutronix.de>
>
> This is about printk. They can decide this commit.
I don't think it's a printk stuff.
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 <lizhijian@fujitsu.com>
>>>> ---
>>>> 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.
>>>
next prev parent reply other threads:[~2023-08-23 6:47 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-23 2:13 Li Zhijian
2023-08-23 2:13 ` [PATCH 2/2] RDMA/rxe: Call rxe_set_mtu after rxe_register_device Li Zhijian
2023-08-23 2:46 ` Daisuke Matsuda (Fujitsu)
2023-08-23 2:43 ` [PATCH 1/2] RDMA/rxe: add missing newline to rxe_set_mtu message Daisuke Matsuda (Fujitsu)
2023-08-23 3:04 ` Zhijian Li (Fujitsu)
2023-08-23 5:10 ` Daisuke Matsuda (Fujitsu)
2023-08-23 6:12 ` Zhu Yanjun
2023-08-23 6:25 ` Zhijian Li (Fujitsu)
2023-08-23 6:35 ` Zhu Yanjun
2023-08-23 6:47 ` Zhijian Li (Fujitsu) [this message]
2023-08-23 6:59 ` Zhu Yanjun
2023-08-23 7:20 ` Zhijian Li (Fujitsu)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e823d7aa-99d6-1417-8aca-c89db1c350b9@fujitsu.com \
--to=lizhijian@fujitsu.com \
--cc=jgg@ziepe.ca \
--cc=john.ogness@linutronix.de \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=pmladek@suse.com \
--cc=rostedt@goodmis.org \
--cc=rpearsonhpe@gmail.com \
--cc=senozhatsky@chromium.org \
--cc=yanjun.zhu@linux.dev \
--cc=zyjzyj2000@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®