[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <681F9A5A-63F0-432A-B188-CF4FC11AF2A8@fb.com>
Date: Thu, 20 May 2021 16:35:45 +0000
From: Song Liu <songliubraving@...com>
To: Dmitrii Banshchikov <me@...que.spb.ru>
CC: Song Liu <song@...nel.org>, bpf <bpf@...r.kernel.org>,
Alexei Starovoitov <ast@...nel.org>,
"David S . Miller" <davem@...emloft.net>,
Daniel Borkmann <daniel@...earbox.net>,
Andrii Nakryiko <andrii@...nel.org>, Martin Lau <kafai@...com>,
Yonghong Song <yhs@...com>,
John Fastabend <john.fastabend@...il.com>,
KP Singh <kpsingh@...nel.org>,
Networking <netdev@...r.kernel.org>, Andrey Ignatov <rdna@...com>
Subject: Re: [PATCH bpf-next 02/11] bpfilter: Add logging facility
> On May 20, 2021, at 12:08 AM, Dmitrii Banshchikov <me@...que.spb.ru> wrote:
>
> On Wed, May 19, 2021 at 10:32:25AM -0700, Song Liu wrote:
>> On Tue, May 18, 2021 at 11:05 PM Dmitrii Banshchikov <me@...que.spb.ru> wrote:
>>>
>>> There are three logging levels for messages: FATAL, NOTICE and DEBUG.
>>> When a message is logged with FATAL level it results in bpfilter
>>> usermode helper termination.
>>
>> Could you please explain why we choose to have 3 levels? Will we need
>> more levels,
>> like WARNING, ERROR, etc.?
>
>
> I found that I need one level for development - to trace what
> goes rignt and wrong. At the same time as those messages go to
> dmesg this level is too verbose to be used under normal
> circumstances. That is why another level is introduced. And the
> last one exists to verify invariants or error condintions from
> which there is no right way to recover and they result in
> bpfilter termination.
/dev/kmsg supports specifying priority of the message. Like:
echo '<4> This message have priority of 4' > /dev/kmsg
Therefore, with proper priority settings, we can have more levels safely.
Does this make sense?
Thanks,
Song
[...]
Powered by blists - more mailing lists