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-06-02 05:16:23 -07:00
2010-09-08 21:45:01 -07:00
2010-02-22 16:20:22 -08:00
2010-06-09 18:39:27 -07:00
2010-06-07 02:57:14 -07:00
2010-02-22 16:20:22 -08:00
2010-06-25 21:33:17 -07:00
2010-05-11 14:40:55 +02:00
2010-06-10 23:31:35 -07:00
2010-06-30 13:31:19 -07:00
2010-06-10 23:31:35 -07:00
2010-06-26 22:00:03 -07:00
2010-09-08 21:45:01 -07:00
2010-01-17 19:16:02 -08:00
2010-07-04 11:46:07 -07:00