netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/5] IPsec parallelization
@ 2008-12-01  7:16 Steffen Klassert
  2008-12-01  7:17 ` [RFC PATCH 1/5] padata: generic interface for parallel processing Steffen Klassert
                   ` (5 more replies)
  0 siblings, 6 replies; 37+ messages in thread
From: Steffen Klassert @ 2008-12-01  7:16 UTC (permalink / raw)
  To: netdev; +Cc: davem, herbert, klassert

This is a first throw to try to parallelize the expensive part of xfrm by
using a generic parallelization/serialization method. This method uses the
remote softirq invocation infrastructure for parallelization and serialization.
With this method data objects can be processed in parallel, starting 
at some given point. After doing some expensive operations in parallel, 
it is possible to serialize again. The parallelized data objects return after
serialization in the order as they were before the parallelization. 
In the case of xfrm, this makes it possible to run the expensive part in
parallel without getting packet reordering.
 
To use this parallelization method for xfrm, some changes in the crypto system
were necessary. First of all, we need to force disabling async crypto transforms
in the parallelization case, because we can't guarantee the packet order if
the packets are put to a queue during the parallel processing.
A second thing was a very high contended lock in crypto_authenc_hash() if
the crypto system runs in parallel. To get rid of this, the struct aead is
moved to percpu data, what in turn means that we have percpu IV chains now.
However, I'm not that familiar with the crypto system. So I'm not sure whether
this is acceptable as I did it, this needs review.

I did forwarding tests with two quad core machines (Intel Core 2 Quad Q6600) 
used as IPsec routers (xfrm tunnel between the two quad core machines) and two
notebooks T61 used as traffic generators.
With this testing environment I'm geting a throughput up to 910 Mbit/s (ipv4)
and 880 Mbit/s (ipv6) with aes192-sha1 encryption (measured with iperf,
_one_ tcp stream). Without the parallelization I'm getting with the same
environment about 340 Mbit/s (ipv4) and 320 Mbit/s (ipv6).

If somebody wants to test it, the parallelization is switched off by default.
To enable it, do 'echo 1 > /proc/sys/net/core/xfrm_padata'.

Steffen

^ permalink raw reply	[flat|nested] 37+ messages in thread

end of thread, other threads:[~2008-12-02 10:37 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-01  7:16 [RFC PATCH 0/5] IPsec parallelization Steffen Klassert
2008-12-01  7:17 ` [RFC PATCH 1/5] padata: generic interface for parallel processing Steffen Klassert
2008-12-01  7:17 ` [RFC PATCH 2/5] xfrm: add possibility " Steffen Klassert
2008-12-01  7:19 ` [RFC PATCH 3/5] crypto: add possibility to force sync transform Steffen Klassert
2008-12-01 11:22   ` Herbert Xu
2008-12-01 13:19     ` Steffen Klassert
2008-12-01  7:19 ` [RFC PATCH 4/5] crypto: allow allocation of percpu crypto transforms Steffen Klassert
2008-12-01 11:38   ` Herbert Xu
2008-12-01 12:25     ` David Miller
2008-12-01 12:38       ` Herbert Xu
2008-12-01 13:21         ` Steffen Klassert
2008-12-01  7:20 ` [RFC PATCH 5/5] crypto: make struct aead percpu data Steffen Klassert
2008-12-01 11:40   ` Herbert Xu
2008-12-01 13:36     ` Steffen Klassert
2008-12-01 13:44       ` Herbert Xu
2008-12-01 13:47         ` [PATCH 1/6] crypto: hash - Make setkey optional Herbert Xu
2008-12-01 13:47         ` [PATCH 2/6] crypto: null - Switch to shash Herbert Xu
2008-12-01 13:47         ` [PATCH 3/6] crypto: rmd128 " Herbert Xu
2008-12-01 13:47         ` [PATCH 4/6] crypto: rmd160 " Herbert Xu
2008-12-01 13:47         ` [PATCH 5/6] crypto: rmd256 " Herbert Xu
2008-12-01 13:47         ` [PATCH 6/6] crypto: rmd320 " Herbert Xu
2008-12-01 13:51         ` [RFC PATCH 5/5] crypto: make struct aead percpu data Herbert Xu
2008-12-01 13:55         ` Steffen Klassert
2008-12-01  8:49 ` [RFC PATCH 0/5] IPsec parallelization Herbert Xu
2008-12-01 10:29   ` David Miller
2008-12-01 11:15     ` Herbert Xu
2008-12-02  7:58       ` Steffen Klassert
2008-12-02  8:19         ` Herbert Xu
2008-12-02  8:44           ` Steffen Klassert
2008-12-02  8:50             ` Herbert Xu
2008-12-02  9:21               ` Steffen Klassert
2008-12-02  8:53             ` Herbert Xu
2008-12-02  9:39               ` Steffen Klassert
2008-12-02 10:37                 ` Herbert Xu
2008-12-01 11:20   ` Andi Kleen
2008-12-01 13:39     ` Herbert Xu
2008-12-02  8:00   ` Steffen Klassert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).