Thread (42 messages) 42 messages, 7 authors, 2012-06-27

Re: [PATCH v2 net-next] tcp: avoid tx starvation by SYNACK packets

From: Jesper Dangaard Brouer <hidden>
Date: 2012-06-27 06:32:26

On Tue, 2012-06-26 at 19:02 +0200, Eric Dumazet wrote:
On Tue, 2012-06-26 at 07:34 +0200, Hans Schillstrom wrote:
quoted
This patch didn't give much in gain actually.
With a 100Mbps link it does.

With a 1Gbps link we are cpu bounded for sure.
I'm using a 10G link
quoted
The big cycle consumer during a syn attack is SHA sum right now, 
so from that perspective it's better to add aes crypto (by using AES-NI) 
to the syn cookies instead of SHA sum. Even if only newer x86_64 can use it.
How are you avoiding the lock bh_lock_sock_nested(sk) in tcp_v4_rcv()?

My dev machine is able to process ~280.000 SYN (and synack) per second
(tg3, mono queue), and sha_transform() takes ~10 % of the time according
to perf.
With my parallel SYN cookie/brownies patches, I could easily process 750
Kpps (limited by the generator, think the owners of the big machine did
a test where they reached 1400 Kpps).

I also had ~10% CPU usage from sha_transform() but across all cores...

With David patch using jhash instead of SHA, I reach ~315.000 SYN per
second.
IMHO a faster hash is not the answer... parallel processing of SYN
packets is a better answer.  But I do think, adding this faster hash as
a sysctl switch might be a good idea, for people with smaller embedded
hardware.  Using it as default, might be "dangerous" and open an attack
vector on SYN cookies in Linux.


-- 
Best regards,
  Jesper Dangaard Brouer
  MSc.CS, Sr. Network Kernel Developer at Red Hat
  Author of http://www.iptv-analyzer.org
  LinkedIn: http://www.linkedin.com/in/brouer
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help