From: Jesper Dangaard Brouer <brouer@redhat.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Hans Schillstrom <hans.schillstrom@ericsson.com>,
David Miller <davem@davemloft.net>,
"subramanian.vijay@gmail.com" <subramanian.vijay@gmail.com>,
"dave.taht@gmail.com" <dave.taht@gmail.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"ncardwell@google.com" <ncardwell@google.com>,
"therbert@google.com" <therbert@google.com>,
Martin Topholm <mph@hoth.dk>
Subject: Re: [PATCH v2 net-next] tcp: avoid tx starvation by SYNACK packets
Date: Wed, 27 Jun 2012 08:32:13 +0200 [thread overview]
Message-ID: <1340778733.2028.110.camel@localhost> (raw)
In-Reply-To: <1340730156.10893.359.camel@edumazet-glaptop>
On Tue, 2012-06-26 at 19:02 +0200, Eric Dumazet wrote:
> On Tue, 2012-06-26 at 07:34 +0200, Hans Schillstrom wrote:
>
> > 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
> > 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
next prev parent reply other threads:[~2012-06-27 6:32 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-31 21:56 [PATCH net-next] tcp: avoid tx starvation by SYNACK packets Eric Dumazet
2012-05-31 23:03 ` David Miller
2012-06-01 4:48 ` Eric Dumazet
2012-06-01 17:46 ` David Miller
2012-06-01 7:00 ` [PATCH] tcp: do not create inetpeer on SYNACK message Eric Dumazet
2012-06-01 18:24 ` David Miller
2012-06-01 21:34 ` Hans Schillström
2012-06-02 6:56 ` Eric Dumazet
2012-06-01 7:36 ` [PATCH net-next] tcp: avoid tx starvation by SYNACK packets Hans Schillstrom
2012-06-01 9:34 ` Eric Dumazet
2012-06-02 1:28 ` Dave Taht
2012-06-02 5:46 ` Eric Dumazet
2012-06-23 7:34 ` Vijay Subramanian
2012-06-23 8:42 ` [PATCH v2 " Eric Dumazet
2012-06-25 6:24 ` Hans Schillstrom
2012-06-25 22:43 ` David Miller
2012-06-26 4:51 ` Eric Dumazet
2012-06-26 4:55 ` David Miller
2012-06-26 5:34 ` Hans Schillstrom
2012-06-26 7:11 ` David Miller
2012-06-26 7:27 ` Hans Schillstrom
2012-06-26 17:02 ` Eric Dumazet
2012-06-27 5:23 ` Hans Schillstrom
2012-06-27 8:22 ` David Miller
2012-06-27 8:25 ` Jesper Dangaard Brouer
2012-06-27 8:30 ` Hans Schillstrom
2012-06-27 8:40 ` Eric Dumazet
2012-06-27 8:48 ` David Miller
2012-06-27 6:32 ` Jesper Dangaard Brouer [this message]
2012-06-27 6:54 ` David Miller
2012-06-27 7:24 ` Jesper Dangaard Brouer
2012-06-27 7:30 ` Eric Dumazet
2012-06-27 7:54 ` Jesper Dangaard Brouer
2012-06-27 8:02 ` Eric Dumazet
2012-06-27 8:21 ` Jesper Dangaard Brouer
2012-06-27 8:45 ` Eric Dumazet
2012-06-27 9:23 ` Jesper Dangaard Brouer
2012-06-27 8:13 ` David Miller
2012-06-27 19:50 ` Florian Westphal
2012-06-27 21:39 ` Eric Dumazet
2012-06-27 22:23 ` David Miller
2012-06-27 22:23 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1340778733.2028.110.camel@localhost \
--to=brouer@redhat.com \
--cc=dave.taht@gmail.com \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=hans.schillstrom@ericsson.com \
--cc=mph@hoth.dk \
--cc=ncardwell@google.com \
--cc=netdev@vger.kernel.org \
--cc=subramanian.vijay@gmail.com \
--cc=therbert@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.