[PATCH 3/6] [NET] loopback: Panic if registration fails

2007-07-26 Thread Herbert Xu
[NET] loopback: Panic if registration fails Because IPv4 and IPv6 both depend on the presence of the loopback device to function, failure in registration the loopback device should be fatal. Signed-off-by: Herbert Xu <[EMAIL PROTECTED]> --- drivers/net/loopback.c |7 ++- 1

[PATCH 2/6] [NET]: Take dev_base_lock when moving device name hash list entry

2007-07-26 Thread Herbert Xu
neglected to take it in dev_change_name. The race can affect calles of __dev_get_by_name that do so without taking the RTNL. They may end up walking down the wrong hash chain and end up missing the device that they're looking for. Signed-off-by: Herbert Xu <[EMAIL PROTECTED]> --- net/core/d

[PATCH 5/6] [IPV4/IPV6]: Fail registration if inet device construction fails

2007-07-26 Thread Herbert Xu
: Herbert Xu <[EMAIL PROTECTED]> --- net/ipv4/devinet.c |5 ++--- net/ipv6/addrconf.c |8 +--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c index abf6352..5b77bda 100644 --- a/net/ipv4/devinet.c +++ b/net/ipv4/devinet.c @@ -1

[IPSEC]: Ensure that state inner family is set

2007-07-31 Thread Herbert Xu
is set by it and not the KM. Signed-off-by: Herbert Xu <[EMAIL PROTECTED]> Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH 0/9 Rev3] Implement batching skb API and support in IPoIB

2007-08-08 Thread Herbert Xu
of the effort is in getting these skb's created and processed by the stack so that by the time that they're exiting the qdisc there's not much to be saved anymore. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]> Hom

Re: [PATCH] make atomic_t volatile on all architectures

2007-08-08 Thread Herbert Xu
Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt - To unsubscribe from this list: send the line "unsubscribe netdev" in the body

[NET]: Share correct feature code between bridging and bonding

2007-08-08 Thread Herbert Xu
c and uses it for both bonding and bridging. In the process I've made small adjustments such as only setting GSO_ROBUST if at least one constituent device supports it. Signed-off-by: Herbert Xu <[EMAIL PROTECTED]> Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{

Re: [PATCH] make atomic_t volatile on all architectures

2007-08-09 Thread Herbert Xu
rier) or you'd be busy waiting in which case you should use cpu_relax. Do you have an example where this isn't the case? Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]> Home Page: http://gondor.apana.org.au/~herbert/ PG

Re: [PATCH 1/24] make atomic_read() behave consistently on alpha

2007-08-10 Thread Herbert Xu
ermit this. Code all over the kernel assumes that 32-bit reads/writes are atomic so while such a compiler might be legal it certainly can't compile Linux. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]> Home Page: http://gondor.a

Re: [PATCH 1/24] make atomic_read() behave consistently on alpha

2007-08-10 Thread Herbert Xu
mploys. Please give an example code snippet + gcc version + arch to back this up. Thanks, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.t

Re: [PATCH 1/24] make atomic_read() behave consistently on alpha

2007-08-10 Thread Herbert Xu
re about the LSB. Do you have an example where gcc reads it non-atmoically and we care about all parts? Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au

Re: [PATCH 6/24] make atomic_read() behave consistently on frv

2007-08-10 Thread Herbert Xu
handlers? Access to int/long must be atomic or we're in big trouble anyway. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt - To

Re: [PATCH 6/24] make atomic_read() behave consistently on frv

2007-08-12 Thread Herbert Xu
Paul E. McKenney <[EMAIL PROTECTED]> wrote: > On Sat, Aug 11, 2007 at 08:54:46AM +0800, Herbert Xu wrote: >> Chris Snook <[EMAIL PROTECTED]> wrote: >> > >> > cpu_relax() contains a barrier, so it should do the right thing. For >> > non-smp arc

Re: [PATCH 6/24] make atomic_read() behave consistently on frv

2007-08-14 Thread Herbert Xu
of atomic_read. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt - To unsubscribe from this list: send the line "unsubscri

Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures

2007-08-14 Thread Herbert Xu
this patch series is the correct solution. So far the only example has been a buggy piece of code which has since been fixed with a cpu_relax. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]> Home Page: http://gondor.apana.org.au/~her

Re: linux kernel 2.6.18-20 bug: rcu_read_unlock in __sock_create

2007-08-15 Thread Herbert Xu
king issues. [NET]: Fix unbalanced rcu_read_unlock in __sock_create The recent RCU work created an unbalanced rcu_read_unlock in __sock_create. This patch fixes that. Reported by oleg 123. Signed-off-by: Herbert Xu <[EMAIL PROTECTED]> Thanks, -- Visit Openswan at http://www.openswan.org/

Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures

2007-08-15 Thread Herbert Xu
uot;atomic WRT all processors" require volatility? Not at all. We also require this to be atomic without any hint of volatility. extern int foo; foo = 4; Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]> Home Page

Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures

2007-08-15 Thread Herbert Xu
cpu_relax() sounds pointless / wrong solution for this case, so I'm now > somewhat beginning to appreciate the motivation behind this series :-) Nope, we're calling schedule which is a rather heavy-weight barrier. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert

Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures

2007-08-15 Thread Herbert Xu
around. Can you give a single example where the volatile semantics is needed in a legitimate way? Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.a

Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures

2007-08-15 Thread Herbert Xu
On Wed, Aug 15, 2007 at 11:45:20AM -0700, Paul E. McKenney wrote: > On Wed, Aug 15, 2007 at 07:19:57PM +0100, David Howells wrote: > > Herbert Xu <[EMAIL PROTECTED]> wrote: > > > > > Let's turn this around. Can you give a single example where > >

Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures

2007-08-15 Thread Herbert Xu
t http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] Mor

Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures

2007-08-15 Thread Herbert Xu
e actual file/function name you have in mind. > > Yep, we are indeed talking about atomic_read()/atomic_set(). > > We have been through this issue already in this thread. Sorry, but I must've missed it. Could you cite the file or function for my benefit? Thanks, -- Visit Op

Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures

2007-08-15 Thread Herbert Xu
On Wed, Aug 15, 2007 at 05:23:10PM -0700, Paul E. McKenney wrote: > On Thu, Aug 16, 2007 at 08:12:48AM +0800, Herbert Xu wrote: > > On Wed, Aug 15, 2007 at 04:53:35PM -0700, Paul E. McKenney wrote: > > > > > > > > Communicating between process context and interrupt

Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures

2007-08-15 Thread Herbert Xu
uses rep_nop or asm/volatile. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt - To unsubscribe from this list: send the line

Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures

2007-08-15 Thread Herbert Xu
On Wed, Aug 15, 2007 at 05:49:50PM -0700, Paul E. McKenney wrote: > On Thu, Aug 16, 2007 at 08:30:23AM +0800, Herbert Xu wrote: > > > Thanks. But I don't need a summary of the thread, I'm asking > > for an extant code snippet in our kernel that benefits from > &

Re: your mail

2007-08-15 Thread Herbert Xu
st_udelay() which happens to be in another > translation unit (arch/i386/lib/delay.c) and hence saves this callsite > from being a bug :-) The udelay itself certainly should have some form of cpu_relax in it. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[E

Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures

2007-08-15 Thread Herbert Xu
prot->enter_memory_pressure(); goto suppress_allocation; } We don't need to reload sk->sk_prot->memory_allocated here. Now where is your example again? Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[EMAIL PR

Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures

2007-08-15 Thread Herbert Xu
sus here? (hoping against hope, probably :-) I can certainly agree with this. But I have to say that I still don't know of a single place where one would actually use the volatile variant. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTE

Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures

2007-08-15 Thread Herbert Xu
On Thu, Aug 16, 2007 at 12:05:56PM +1000, Paul Mackerras wrote: > Herbert Xu writes: > > > See sk_stream_mem_schedule in net/core/stream.c: > > > > /* Under limit. */ > > if (atomic_read(sk->sk_prot->memory_allocated) < > > sk->

Re: skb_pull_rcsum - Fatal exception in interrupt

2007-08-15 Thread Herbert Xu
anks, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt - To unsubscribe from this list: send the line "unsubscribe netdev"

Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures

2007-08-15 Thread Herbert Xu
s that atomic_add/atomic_sub do. In particular, this may cause an atomic_read on another CPU to give a bogus reading. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http:/

Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures

2007-08-15 Thread Herbert Xu
essue, that's OK because we only ever assign values to it and never do other operations such as += or -=. Remember that int/long assignments must be atomic or Linux won't run on your architecture. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[

Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures

2007-08-15 Thread Herbert Xu
On Thu, Aug 16, 2007 at 01:48:32PM +1000, Paul Mackerras wrote: > Herbert Xu writes: > > > If you're referring to the code in sk_stream_mem_schedule > > then it's working as intended. The atomicity guarantees > > You mean it's intended that *sk->sk_pr

Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures

2007-08-15 Thread Herbert Xu
olatile" behaviour. In any case, this actually illustrates why the addition of volatile is completely pointless. Even if this code was broken, which it definitely is not, having the volatile there wouldn't have helped at all. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: He

Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures

2007-08-15 Thread Herbert Xu
e the code clearer. > And in case 3 there is no reason to use atomic_t at all; we might as > well just use an int. Since adding volatile doesn't help any of the 3 cases, and takes away optimisations from both 2 and 3, I wonder what is the point of the addition after all? Cheers, -- Visi

Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures

2007-08-16 Thread Herbert Xu
nce you left out what those expectations or properties are. > - It avoids bugs in the cases where "volatile" behaviour is required Do you (or anyone else for that matter) have an example of this? Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~

Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures

2007-08-16 Thread Herbert Xu
c_read code snippet there that is broken without the volatile modifier? Thanks, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt - To

Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures

2007-08-16 Thread Herbert Xu
read. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt - To unsubscribe from this list: send the line "unsubscribe netdev" in the b

Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures

2007-08-16 Thread Herbert Xu
hen doing an atomic_read, then surely you won't mind getting a stale value from the compiler "cache". > So, the architecture guys can implement atomic_read however they want > --- as long as it cannot be optimized away.* They can implement it however they want as long as it s

Re: [RFC] net/core/dst.c : Should'nt dst_run_gc() be more scalable and friendly ?

2007-08-16 Thread Herbert Xu
with NULL. You then drop the lock to process it. Once it's done you take the lock again and join it with whatever that's been added in the mean time. This is easy because you should already have the tail after the GC process. Cheers, -- Visit Openswan at http://www.openswan.org/ Email:

Re: [RFC] net/core/dst.c : Should'nt dst_run_gc() be more scalable and friendly ?

2007-08-16 Thread Herbert Xu
Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a me

Re: [RFC] net/core/dst.c : Should'nt dst_run_gc() be more scalable and friendly ?

2007-08-16 Thread Herbert Xu
cessing things in chunks. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt - To unsubscribe from this list: send the line "uns

Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures

2007-08-16 Thread Herbert Xu
I still don't know which atomic_read/atomic_set in your patch would be broken if there were no volatile. Could you please point them out? Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]> Home Page: http://gondor.apana.org.au/~he

Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures

2007-08-16 Thread Herbert Xu
t removing barriers that aren't needed if volatile > behavior is guaranteed. Could you please cite the file/function names so we can see whether removing the barrier makes sense? Thanks, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]&

Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures

2007-08-16 Thread Herbert Xu
On Thu, Aug 16, 2007 at 06:02:32PM -0700, Paul E. McKenney wrote: > > Yep. Or you can use atomic_dec_return() instead of using a barrier. Or you could use smp_mb__{before,after}_atomic_dec. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[EMA

Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures

2007-08-16 Thread Herbert Xu
r more legitimate atomic_read() busy-waits that shouldn't be > using CPU-relax. Some of them do work in the loop. Care to name one so we can discuss it? Thanks, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]> Home Page: http

Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures

2007-08-16 Thread Herbert Xu
the sort of missing barriers that triggered this thread aren't that subtle. It'll result in a simple lock-up if the loop condition holds upon entry. At which point it's fairly straightforward to find the culprit. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert

Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures

2007-08-16 Thread Herbert Xu
On Fri, Aug 17, 2007 at 03:09:57PM +1000, Paul Mackerras wrote: > Herbert Xu writes: > > > Can you find an actual atomic_read code snippet there that is > > broken without the volatile modifier? > > There are some in arch-specific code, for example line 1073 of > a

Re: [RFC] net/core/dst.c : Should'nt dst_run_gc() be more scalable and friendly ?

2007-08-17 Thread Herbert Xu
ck a good chunk size :) Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt - To unsubscribe from this list: send the line &quo

Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures

2007-08-17 Thread Herbert Xu
in getting it fixed! Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt - To unsubscribe from this list: send the line "unsubscri

Re: [ofa-general] Re: [PATCH RFC] RDMA/CMA: Allocate PS_TCPportsfrom the host TCP port space.

2007-08-19 Thread Herbert Xu
20Gbps! Actually this is false. TSO only requires a copy if the user chooses to use the sendmsg interface instead of sendpage. The same is true for RDMA really. Except that instead of having to switch your application to sendfile/splice, you're switching it to RDMA. Cheers, -- Visit Openswan at

Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures

2007-08-20 Thread Herbert Xu
do_something() probably needs a memory barrier (not just compiler) so that do_something() doesn't see stale cache content that occured before cond flipped. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]> Home Page: http://gondor.

Re: skb_pull_rcsum - Fatal exception in interrupt

2007-08-20 Thread Herbert Xu
call may_pull? That would be too easy :) As was the case here, the data pulled has already been accessed so calling pskb_may_pull in the pulling function is too late. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]> Home Page: http://gon

Re: [NET]: Share correct feature code between bridging and bonding

2007-08-20 Thread Herbert Xu
moves that logic into net/core/dev.c and uses it for both bonding and bridging. In the process I've made small adjustments such as only setting GSO_ROBUST if at least one constituent device supports it. Signed-off-by: Herbert Xu <[EMAIL PROTECTED]> Cheers, -- Visit Openswan at http://ww

Re: net-2.6.24 failure with netconsole

2007-08-22 Thread Herbert Xu
esystems and mm). Well, for networking if we continue after a serious coding error it could result in a remote kernel compromise. So BUG_ON/BUG is not entirely useless. I'm not claiming that it's necessarily the case here though :) Cheers, -- Visit Openswan at http://www.openswan.org

Re: Oops in 2.6.22.1: skb_copy_and_csum_datagram_iovec()

2007-08-22 Thread Herbert Xu
v == NULL. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt - To unsubscribe from this list: send the line "unsubscribe net

Re: [PATCH 0/9 Rev3] Implement batching skb API and support in IPoIB

2007-08-24 Thread Herbert Xu
ling TSO and enabling GSO. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt - To unsubscribe from this list: send the line "unsub

Re: [Bugme-new] [Bug 9128] New: PF_KEY SADB_GET messages return SADB_DUMP from the kernel

2007-10-05 Thread Herbert Xu
On Fri, Oct 05, 2007 at 10:37:55AM -0700, Andrew Morton wrote: > > But whatever - I can convert this patch into a suitable one and send it in > to David if people think it is good? Looks good to me. Thanks, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>

Re: [NET] IPv6 oops bisected

2007-10-07 Thread Herbert Xu
ev->nd_net->loopabck_dev to dev. The issue here is which namespace are we in if dev is NULL. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au

[0/7] IPsec: Preparatory patcheds for async crypto on output

2007-10-08 Thread Herbert Xu
Hi Dave: Here is a bunch of patches paving the way for removal of the state spin lock on the output path so that we can let the crypto complete asynchronously. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]> Home P

[PATCH 1/7] [IPSEC] esp: Remove keys from esp_data structure

2007-10-08 Thread Herbert Xu
the unused auth.icv member. Signed-off-by: Herbert Xu <[EMAIL PROTECTED]> --- include/net/esp.h |7 --- net/ipv4/esp4.c | 16 +--- net/ipv6/esp6.c | 15 --- 3 files changed, 9 insertions(+), 29 deletions(-) diff --git a/include/net/esp.h b/include/net/esp

[PATCH 2/7] [IPSEC] ah: Remove keys from ah_data structure

2007-10-08 Thread Herbert Xu
[IPSEC] ah: Remove keys from ah_data structure The keys are only used during initialisation so we don't need to carry them in esp_data. Since we don't have to allocate them again, there is no need to place a limit on the authentication key length anymore. Signed-off-by: Herbert

[PATCH 4/7] [IPSEC]: Move xfrm_state_check into xfrm_output.c

2007-10-08 Thread Herbert Xu
[IPSEC]: Move xfrm_state_check into xfrm_output.c The functions xfrm_state_check and xfrm_state_check_space are only used by the output code in xfrm_output.c so we can move them over. Signed-off-by: Herbert Xu <[EMAIL PROTECTED]> --- include/net/xfrm.h |1 - net/xfrm/xfrm_ou

[PATCH 3/7] [IPSEC]: Move common output code to xfrm_output

2007-10-08 Thread Herbert Xu
a transform which may upset netfilter later on. Signed-off-by: Herbert Xu <[EMAIL PROTECTED]> --- include/net/xfrm.h |1 net/ipv4/xfrm4_output.c | 40 ++ net/ipv6/xfrm6_output.c | 45 +++-- net/xfrm/Makefile |2 - ne

[PATCH 5/7] [IPSEC]: Move output replay code into xfrm_output

2007-10-08 Thread Herbert Xu
themselves. Signed-off-by: Herbert Xu <[EMAIL PROTECTED]> --- include/net/xfrm.h | 20 +++- net/ipv4/ah4.c |4 ++-- net/ipv4/esp4.c|4 ++-- net/ipv6/ah6.c |4 ++-- net/ipv6/esp6.c|4 ++-- net/xfrm/xfrm_output.c |5 + 6

[PATCH 6/7] [IPSEC]: Unexport xfrm_replay_notify

2007-10-08 Thread Herbert Xu
[IPSEC]: Unexport xfrm_replay_notify Now that the only callers of xfrm_replay_notify are in xfrm, we can remove the export. This patch also removes xfrm_aevent_doreplay since it's now called in just one spot. Signed-off-by: Herbert Xu <[EMAIL PROTECTED]> --- include/net/xfrm.h

[PATCH 7/7] [IPSEC]: Move RO-specific output code into xfrm6_mode_ro.c

2007-10-08 Thread Herbert Xu
[IPSEC]: Move RO-specific output code into xfrm6_mode_ro.c The lastused update check in xfrm_output can be done just as well in the mode output function which is specific to RO. Signed-off-by: Herbert Xu <[EMAIL PROTECTED]> --- net/ipv6/xfrm6_mode_ro.c |4 net/xfrm/xfrm_ou

Re: [PATCH 3/7] [IPSEC]: Move common output code to xfrm_output

2007-10-08 Thread Herbert Xu
//www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [E

Re: [PATCH 2/3][NET_BATCH] net core use batching

2007-10-08 Thread Herbert Xu
hen you will end up in the function qdisc_restart, where we release the queue lock only after acquiring the TX lock. So right now this path does not create any reordering. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]> Home Page: http:

Re: [PATCH 2/3][NET_BATCH] net core use batching

2007-10-08 Thread Herbert Xu
On Tue, Oct 09, 2007 at 10:01:15AM +0800, Herbert Xu wrote: > On Mon, Oct 08, 2007 at 06:41:26PM -0700, David Miller wrote: > > > > I also want to point out another issue. Any argument wrt. reordering > > is specious at best because right now reordering from qdisc to devic

Re: [PATCH 2/3][NET_BATCH] net core use batching

2007-10-08 Thread Herbert Xu
On Tue, Oct 09, 2007 at 10:03:18AM +0800, Herbert Xu wrote: > On Tue, Oct 09, 2007 at 10:01:15AM +0800, Herbert Xu wrote: > > On Mon, Oct 08, 2007 at 06:41:26PM -0700, David Miller wrote: > > > > > > I also want to point out another issue. Any argument wrt. reorderin

Re: [PATCH 2/3][NET_BATCH] net core use batching

2007-10-08 Thread Herbert Xu
swan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message

Re: [PATCH 2/3][NET_BATCH] net core use batching

2007-10-08 Thread Herbert Xu
On Mon, Oct 08, 2007 at 10:15:49PM -0400, jamal wrote: > On Tue, 2007-09-10 at 10:04 +0800, Herbert Xu wrote: > > > Please revert > > > > commit 41843197b17bdfb1f97af0a87c06d24c1620ba90 > > Author: Jamal Hadi Salim <[EMAIL PROTECTED]> > &

Re: [PATCH 2/3][NET_BATCH] net core use batching

2007-10-08 Thread Herbert Xu
On Mon, Oct 08, 2007 at 10:19:02PM -0400, jamal wrote: > On Tue, 2007-09-10 at 10:16 +0800, Herbert Xu wrote: > > > > > No it doesn't. I'd forgotten about the QDISC_RUNNING bit :) > > You should not better, you wrote it and ive been going insane trying

Re: [PATCH 2/3][NET_BATCH] net core use batching

2007-10-08 Thread Herbert Xu
actually holding the queue lock. So there is no reordering with or without Jamal's patch. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbe

Re: raw PF_PACKET protocol selection

2007-10-08 Thread Herbert Xu
p://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to

Re: [RFC][NET_SCHED] explict hold dev tx lock

2007-10-08 Thread Herbert Xu
is would we see worse behaviour with drivers that do all their TX clean-up with the TX lock held (which would cause qdisc_restart to spin while this is happening)? Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]> Home Page: http:/

Re: raw PF_PACKET protocol selection

2007-10-09 Thread Herbert Xu
e output before exiting. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt - To unsubscribe from this list: send the line "u

Re: [PATCH 2/3][NET_BATCH] net core use batching

2007-10-09 Thread Herbert Xu
On Tue, Oct 09, 2007 at 08:44:25AM -0400, Jeff Garzik wrote: > David Miller wrote: > > > >I can just threaten to do them all and that should get the driver > >maintainers going :-) > > What, like this? :) Awsome :) -- Visit Openswan at http://www.openswan.org/

[0/7] IPsec: More work on async crypto on output

2007-10-09 Thread Herbert Xu
Hi Dave: Here's another round of patches which ends with the moving down of the state lock into x->type->output. I need to stop getting distracted by fixing bugs and concentrate on creating them :) Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV&g

[PATCH 1/7] [IPSEC]: Remove bogus ref count in xfrm_secpath_reject

2007-10-09 Thread Herbert Xu
wrong spot. In the case of xfrm_secpath_reject, the function is synchronous and therefore we should just kill the reference count. Signed-off-by: Herbert Xu <[EMAIL PROTECTED]> --- net/xfrm/xfrm_policy.c |6 +- 1 files changed, 1 insertion(+), 5 deletions(-) diff --git a/ne

[PATCH 2/7] [IPSEC]: Store IPv6 nh pointer in mac_header on output

2007-10-09 Thread Herbert Xu
to help any subsequent effort to merge the two. Lastly it kills two redundant skb_set_* statements in BEET that were simply copied over from transport mode. Signed-off-by: Herbert Xu <[EMAIL PROTECTED]> --- net/ipv4/esp4.c |2 +- net/ipv6/ah6.c |6 +++--

[PATCH 3/7] [IPSEC]: Remove gratuitous km wake-up events on ACQUIRE

2007-10-09 Thread Herbert Xu
re or die. Signed-off-by: Herbert Xu <[EMAIL PROTECTED]> --- net/xfrm/xfrm_state.c |2 -- 1 files changed, 2 deletions(-) diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c index a00745a..0d07f6b 100644 --- a/net/xfrm/xfrm_state.c +++ b/net/xfrm/xfrm_state.c @@ -848,7 +848,

[PATCH 4/7] [IPSEC]: Move common code into xfrm_alloc_spi

2007-10-09 Thread Herbert Xu
byte order conversion has also been moved. Signed-off-by: Herbert Xu <[EMAIL PROTECTED]> --- include/net/xfrm.h|2 +- net/key/af_key.c | 29 - net/xfrm/xfrm_state.c | 26 -- net/xfrm/xfrm_user.c | 13 - 4

[PATCH 6/7] [IPSEC]: Lock state when copying non-atomic fields to user-space

2007-10-09 Thread Herbert Xu
from expiration notification to include the keys and life-times. This is in-line with XFRM behaviour. The actual cases affected are: * pfkey_getspi: No change as we don't have any keys to copy. * key_notify_sa: + ADD/UPD: This wouldn't work otherwise. + DEL: It can't hu

[PATCH 5/7] [XFRM] user: Move attribute copying code into copy_to_user_state_extra

2007-10-09 Thread Herbert Xu
t makes no practical difference since it has the same size as xfrm_sec_ctx. Signed-off-by: Herbert Xu <[EMAIL PROTECTED]> --- net/xfrm/xfrm_user.c | 76 +++ 1 files changed, 47 insertions(+), 29 deletions(-) diff --git a/net/xfrm/xfrm_use

[PATCH 7/7] [IPSEC]: Move state lock into x->type->output

2007-10-09 Thread Herbert Xu
[IPSEC]: Move state lock into x->type->output This patch releases the lock on the state before calling x->type->output. It also adds the lock to the spots where they're currently needed. Most of those places (all except mip6) are expected to disappear with async crypto. Signe

Re: [PATCH 6/7] [IPSEC]: Lock state when copying non-atomic fields to user-space

2007-10-09 Thread Herbert Xu
it Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt - To unsubscribe from this list: send the line "unsubscribe netdev" in the bod

Re: [PATCH] [IPV6] Defer IPv6 device initialization until a valid qdisc is specified

2007-10-09 Thread Herbert Xu
device initialization until a valid qdisc > is specified. Is this really necessary? What if this is plugged into a switch that has nothing else connected? Should you also wait for something to be connected to the switch? Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbe

Re: [PATCH][NET-2.6.24] Remove double dev->flags checking when calling dev_close()

2007-10-09 Thread Herbert Xu
Jeff Garzik <[EMAIL PROTECTED]> wrote: > > One side effect of this patch: might_sleep() is now called unconditionally. That would be seem to be a good thing :) -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]> Home Page: http:

Re: [PATCH] [IPV6] Defer IPv6 device initialization until a valid qdisc is specified

2007-10-09 Thread Herbert Xu
domly anyway if you do it in virtual guest because the carrier is always on since the switch in that case is the host OS. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: h

Re: [ofa-general] Re: [PATCH 2/3][NET_BATCH] net core use batching

2007-10-10 Thread Herbert Xu
Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt - To unsubscribe from this list: send the line "unsubscribe netdev"

[0/7] IPsec: More input/output clean-ups

2007-10-10 Thread Herbert Xu
Hi Dave: Here's a few more clean-up's on the IPsec input/output path. Thanks, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.t

[PATCH 1/7] [IPSEC] esp: Remove NAT-T checksum invalidation for BEET

2007-10-10 Thread Herbert Xu
inner addresses will be intact so the checksum remains valid. Signed-off-by: Herbert Xu <[EMAIL PROTECTED]> --- net/ipv4/esp4.c |3 +-- 1 files changed, 1 insertion(+), 2 deletions(-) diff --git a/net/ipv4/esp4.c b/net/ipv4/esp4.c index 452910d..1af332d 100644 --- a/net/ipv4/esp4.c

[PATCH 2/7] [IPSEC] beet: Fix extension header support on output

2007-10-10 Thread Herbert Xu
igned-off-by: Herbert Xu <[EMAIL PROTECTED]> --- net/ipv6/xfrm6_mode_beet.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/net/ipv6/xfrm6_mode_beet.c b/net/ipv6/xfrm6_mode_beet.c index 65e6b2a..d9366df 100644 --- a/net/ipv6/xfrm6_mode_beet.c +++ b/net/ipv6/xfrm6_

[PATCH 3/7] [IPSEC]: Set skb->data to payload in x->mode->output

2007-10-10 Thread Herbert Xu
skb_push/skb_pull calls with the aim of minimising them on the common path of tunnel + ESP. It'll also let us use the same calling convention between IPv4 and IPv6 with the next patch. Signed-off-by: Herbert Xu <[EMAIL PROTECTED]> --- net/ipv4/ah4.c |1 + net

[PATCH 5/7] [IPSEC]: Get rid of ipv6_{auth,esp,comp}_hdr

2007-10-10 Thread Herbert Xu
27;ve also added transport header type conversion headers for these types which are now used by the transforms. Signed-off-by: Herbert Xu <[EMAIL PROTECTED]> --- include/linux/ipv6.h | 21 - include/net/ah.h |7 +++ include/net/esp.h|7 +++ incl

[PATCH 6/7] [IPSEC]: Move IP length/checksum setting out of transforms

2007-10-10 Thread Herbert Xu
to the fact that the transport offset is guaranteed to be zero. Signed-off-by: Herbert Xu <[EMAIL PROTECTED]> --- net/ipv4/ah4.c |2 -- net/ipv4/esp4.c |7 +-- net/ipv4/ipcomp.c| 22 +- net/ipv4/xfrm4_mode_beet.c

[PATCH 7/7] [IPSEC]: Move IP protocol setting from transforms into xfrm4_input.c

2007-10-10 Thread Herbert Xu
off-by: Herbert Xu <[EMAIL PROTECTED]> --- net/ipv4/ah4.c |5 +++-- net/ipv4/esp4.c |3 +-- net/ipv4/ipcomp.c |7 --- net/ipv4/xfrm4_input.c |7 ++- net/ipv4/xfrm4_tunnel.c |2 +- 5 files changed, 15 insertions(+), 9 deletions(-) diff --git a/

[PATCH 4/7] [IPSEC]: Use IPv6 calling convention as the convention for x->mode->output

2007-10-10 Thread Herbert Xu
e output functions accordingly. It also rewrites the IPv6 mac/transport header calculation to be based off the network header where practical. Signed-off-by: Herbert Xu <[EMAIL PROTECTED]> --- include/net/xfrm.h | 12 net/ipv4/ah4.c |6

<    5   6   7   8   9   10   11   12   13   14   >