Eric Dumazet a8defca048 netfilter: ipt_LOG: add bufferisation to call printk() once
ipt_LOG & ip6t_LOG use lot of calls to printk() and use a lock in a hope
several cpus wont mix their output in syslog.

printk() being very expensive [1], its better to call it once, on a
prebuilt and complete line. Also, with mixed IPv4 and IPv6 trafic,
separate IPv4/IPv6 locks dont avoid garbage.

I used an allocation of a 1024 bytes structure, sort of seq_printf() but
with a fixed size limit.
Use a static buffer if dynamic allocation failed.

Emit a once time alert if buffer size happens to be too short.

[1]: printk() has various features like printk_delay()...

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-10-04 20:56:05 +02:00
..
2010-09-02 10:12:06 -07:00
2010-09-08 21:45:01 -07:00
2010-02-22 16:20:22 -08:00
2010-09-10 12:32:02 -07:00
2010-08-19 00:08:30 -07:00
2010-07-12 12:57:54 -07:00
2010-06-28 23:24:29 -07:00
2010-08-24 14:45:09 -07:00
2010-02-22 16:20:22 -08:00
2010-06-30 13:31:19 -07:00
2010-08-19 00:08:30 -07:00
2010-06-26 22:00:03 -07:00
2009-03-02 03:00:15 -08:00
2009-03-02 03:00:15 -08:00
2009-05-25 22:44:59 -07:00
2010-07-12 12:57:54 -07:00
2010-07-12 12:57:54 -07:00