Just to make it clear, Yonghong means that *the helper function
bpf_trace_printk()* should be used mostly for debug. eBPF itself can
perfectly be used in production.

If you needed to stream data from eBPF programs to user space in
production applications, the way to go would be to use perf maps and
related helpers. This would provide better performances than
bpf_trace_printk().

Best regards,
Quentin


2018-03-28 13:14 UTC-0700 ~ Y Song via iovisor-dev
<[email protected]>
> No, this can still be used. The warning just tells you this should
> mostly be used in debug mode.
>
> On Wed, Mar 28, 2018 at 11:59 AM, Saran Kumar Krishnan via iovisor-dev
> <[email protected]> wrote:
>> Hi -
>>
>>
>> When I use bpf_trace_printk - I am getting this NOTICE. Does it mean, that
>> eBPF shouldn't be used in the production kernel.
>>
>>
>>
>> Mar 20 12:26:44 lenovo-e565 kernel: [  267.467518]
>> **********************************************************
>> Mar 20 12:26:44 lenovo-e565 kernel: [  267.467518] **   NOTICE NOTICE NOTICE
>> NOTICE NOTICE NOTICE NOTICE   **
>> Mar 20 12:26:44 lenovo-e565 kernel: [  267.467518] **
>> **
>> Mar 20 12:26:44 lenovo-e565 kernel: [  267.467519] ** trace_printk() being
>> used. Allocating extra memory.  **
>> Mar 20 12:26:44 lenovo-e565 kernel: [  267.467519] **
>> **
>> Mar 20 12:26:44 lenovo-e565 kernel: [  267.467520] ** This means that this
>> is a DEBUG kernel and it is     **
>> Mar 20 12:26:44 lenovo-e565 kernel: [  267.467520] ** unsafe for production
>> use.                           **
>> Mar 20 12:26:44 lenovo-e565 kernel: [  267.467520] **
>> **
>> Mar 20 12:26:44 lenovo-e565 kernel: [  267.467521] ** If you see this
>> message and you are not debugging    **
>> Mar 20 12:26:44 lenovo-e565 kernel: [  267.467522] ** the kernel, report
>> this immediately to your vendor!  **
>> Mar 20 12:26:44 lenovo-e565 kernel: [  267.467522] **
>> **
>> Mar 20 12:26:44 lenovo-e565 kernel: [  267.467522] **   NOTICE NOTICE NOTICE
>> NOTICE NOTICE NOTICE NOTICE   **
>> Mar 20 12:26:44 lenovo-e565 kernel: [  267.467523]
>> **********************************************************
>>
>>
>>
>> Regards
>> Saran

_______________________________________________
iovisor-dev mailing list
[email protected]
https://lists.iovisor.org/mailman/listinfo/iovisor-dev

Reply via email to