Netdev List
 help / color / mirror / Atom feed
* Re: Using netconsole for debugging suspend/resume
From: Andi Kleen @ 2006-06-12 11:21 UTC (permalink / raw)
  To: Mark Lord
  Cc: Jeremy Fitzhardinge, Matt Mackall, Linux Kernel Mailing List,
	netdev
In-Reply-To: <448992B7.1050906@rtr.ca>

On Friday 09 June 2006 17:24, Mark Lord wrote:
> Andi Kleen wrote:
> > 
> > If your laptop has firewire you can also use firescope.
> > (ftp://ftp.suse.com/pub/people/ak/firescope/) 
> ..
> > FW keeps running as long as nobody resets the ieee1394 chip.
> 
> This looks interesting.  But how does one set it up for use
> on the *other* end of that firewire cable?  The Quickstart and
> manpage don't seem to describe this fully.

It's in the manpage:

>.SH NOTES
>The target must have the ohci1394 driver loaded. This implies
>that firescope cannot be used in early boot.

That's it.

-Andi

^ permalink raw reply

* Re: [RFT] Realtek 8168 ethernet support
From: Mourad De Clerck @ 2006-06-12 10:30 UTC (permalink / raw)
  To: Francois Romieu; +Cc: netdev
In-Reply-To: <20060611233022.GA11776@electric-eye.fr.zoreil.com>

On 12/06/06 01:30, Francois Romieu wrote:
> The patch below agaisnt 2.6.17-rc6 includes the following changes:

Just FYI:

I just tried this patch set, but it doesn't do anything for the "freeze
at high speed" I mentioned on 2006-06-09. It still locks up. (As an
additional data point: I installed win2k on this machine, and it seems
to have no problems transferring at high speeds. Just wanted to try to
rule out faulty hardware.)

Thanks,

-- Mourad DC

^ permalink raw reply

* Re[1]:Aloha
From: Galya B. @ 2006-06-12 10:05 UTC (permalink / raw)
  To: linux-x25

Greeting!	

I think we had correspondence a long time ago if it was not you I am sorry.
If it was I could not answer you because my Mozilla mail manager was down for a 
long time and I could not fix it only with my friend's help I got the emails 
address out for me ..:)
I hope it was whom we were corresponded with you are still interested, as I am, 
though I realize much time has passed since then...
I really don't know where to start ....
Maybe you could tell me a little about yourself since I lost our early letters, 
your appearance,age , hobbies, and are you still in the search?
If it was you I wrote to and you are interested to get to know me better, I have 
a profile at :
http://www.5HUMbcTu8XpXQKDf.im-waiting-4you.net/

Don't really know what else to say for now I hope this is the right address

Let me know if you are interested, And I hope
you won't run when you see my picture :-)

Best regards,

Galya B.



^ permalink raw reply

* Re: [patch] undo AF_UNIX _bh locking changes and split lock-type instead
From: Ingo Molnar @ 2006-06-12  8:49 UTC (permalink / raw)
  To: Herbert Xu
  Cc: Andrew Morton, linux1394-devel, Valdis.Kletnieks, Jiri Slaby,
	netdev, linux-kernel, mingo, Stefan Richter, David S. Miller,
	arjan
In-Reply-To: <20060612065701.GA24213@elte.hu>


* Ingo Molnar <mingo@elte.hu> wrote:

> (the #ifdef LOCKDEP should probably be converted to some sort of 
> lockdep_split_lock_key(&sk->sk_receive_queue.lock) op - i'll do that 
> later)

i've added such an op, lockdep_reinit_lock_key() - this makes the patch 
cleaner:

----------------------
Subject: undo AF_UNIX _bh locking changes and split lock-type
From: Ingo Molnar <mingo@elte.hu>

this cleans up lock-validator-special-locking-af_unix.patch: instead
of adding _bh locking to AF_UNIX, this patch splits their
sk_receive_queue.lock type from the other networking skb-queue locks.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 net/unix/af_unix.c |   18 ++++++++++++++----
 net/unix/garbage.c |    8 ++++----
 2 files changed, 18 insertions(+), 8 deletions(-)

Index: linux/net/unix/af_unix.c
===================================================================
--- linux.orig/net/unix/af_unix.c
+++ linux/net/unix/af_unix.c
@@ -542,6 +542,14 @@ static struct proto unix_proto = {
 	.obj_size = sizeof(struct unix_sock),
 };
 
+/*
+ * AF_UNIX sockets do not interact with hardware, hence they
+ * dont trigger interrupts - so it's safe for them to have
+ * bh-unsafe locking for their sk_receive_queue.lock. Split off
+ * this special lock-type by reinitializing the spinlock key:
+ */
+static struct lockdep_type_key af_unix_sk_receive_queue_lock_key;
+
 static struct sock * unix_create1(struct socket *sock)
 {
 	struct sock *sk = NULL;
@@ -557,6 +565,8 @@ static struct sock * unix_create1(struct
 	atomic_inc(&unix_nr_socks);
 
 	sock_init_data(sock,sk);
+	lockdep_reinit_lock_key(&sk->sk_receive_queue.lock,
+				&af_unix_sk_receive_queue_lock_key);
 
 	sk->sk_write_space	= unix_write_space;
 	sk->sk_max_ack_backlog	= sysctl_unix_max_dgram_qlen;
@@ -1073,12 +1083,12 @@ restart:
 	unix_state_wunlock(sk);
 
 	/* take ten and and send info to listening sock */
-	spin_lock_bh(&other->sk_receive_queue.lock);
+	spin_lock(&other->sk_receive_queue.lock);
 	__skb_queue_tail(&other->sk_receive_queue, skb);
 	/* Undo artificially decreased inflight after embrion
 	 * is installed to listening socket. */
 	atomic_inc(&newu->inflight);
-	spin_unlock_bh(&other->sk_receive_queue.lock);
+	spin_unlock(&other->sk_receive_queue.lock);
 	unix_state_runlock(other);
 	other->sk_data_ready(other, 0);
 	sock_put(other);
@@ -1843,7 +1853,7 @@ static int unix_ioctl(struct socket *soc
 				break;
 			}
 
-			spin_lock_bh(&sk->sk_receive_queue.lock);
+			spin_lock(&sk->sk_receive_queue.lock);
 			if (sk->sk_type == SOCK_STREAM ||
 			    sk->sk_type == SOCK_SEQPACKET) {
 				skb_queue_walk(&sk->sk_receive_queue, skb)
@@ -1853,7 +1863,7 @@ static int unix_ioctl(struct socket *soc
 				if (skb)
 					amount=skb->len;
 			}
-			spin_unlock_bh(&sk->sk_receive_queue.lock);
+			spin_unlock(&sk->sk_receive_queue.lock);
 			err = put_user(amount, (int __user *)arg);
 			break;
 		}
Index: linux/net/unix/garbage.c
===================================================================
--- linux.orig/net/unix/garbage.c
+++ linux/net/unix/garbage.c
@@ -235,7 +235,7 @@ void unix_gc(void)
 		struct sock *x = pop_stack();
 		struct sock *sk;
 
-		spin_lock_bh(&x->sk_receive_queue.lock);
+		spin_lock(&x->sk_receive_queue.lock);
 		skb = skb_peek(&x->sk_receive_queue);
 		
 		/*
@@ -270,7 +270,7 @@ void unix_gc(void)
 				maybe_unmark_and_push(skb->sk);
 			skb=skb->next;
 		}
-		spin_unlock_bh(&x->sk_receive_queue.lock);
+		spin_unlock(&x->sk_receive_queue.lock);
 		sock_put(x);
 	}
 
@@ -283,7 +283,7 @@ void unix_gc(void)
 		if (u->gc_tree == GC_ORPHAN) {
 			struct sk_buff *nextsk;
 
-			spin_lock_bh(&s->sk_receive_queue.lock);
+			spin_lock(&s->sk_receive_queue.lock);
 			skb = skb_peek(&s->sk_receive_queue);
 			while (skb &&
 			       skb != (struct sk_buff *)&s->sk_receive_queue) {
@@ -298,7 +298,7 @@ void unix_gc(void)
 				}
 				skb = nextsk;
 			}
-			spin_unlock_bh(&s->sk_receive_queue.lock);
+			spin_unlock(&s->sk_receive_queue.lock);
 		}
 		u->gc_tree = GC_ORPHAN;
 	}

^ permalink raw reply

* Re: MIB "ipInHdrErrors" error
From: Wei Dong @ 2006-06-12  8:49 UTC (permalink / raw)
  To: netdev; +Cc: davem

On Mon, 2006-06-12 at 15:24 +0800, Wei Dong wrote:
> > Also, when kernel receives an IP packet and need to forward, but
> > TTL=1 or TTL=0, kernel just sends an ICMP packet to inform the
> > sender TTL count exceeded, and doesn't increase this counter.
> 
> This part of your change seems correct, please just resubmit
> this part.
The following is the latest patch for MIB ipIHdrErrors. 

diff -ruN old/net/ipv4/ip_forward.c new/net/ipv4/ip_forward.c
--- old/net/ipv4/ip_forward.c	2006-06-06 13:56:48.000000000 +0800
+++ new/net/ipv4/ip_forward.c	2006-06-12 15:11:04.000000000 +0800
@@ -120,6 +120,7 @@
 
 too_many_hops:
         /* Tell the sender its packet died... */
+        IP_INC_STATS_BH(IPSTATS_MIB_INHDRERRORS);
         icmp_send(skb, ICMP_TIME_EXCEEDED, ICMP_EXC_TTL, 0);
 drop:
 	kfree_skb(skb);

Signed-off-by: Weidong <weid@nanjing-fnst.com>




^ permalink raw reply

* Re: [ PATCH 2.6.17-rc6 1/1] udp.c: counting InDatagrams which are never delivered
From: Herbert Xu @ 2006-06-12  7:43 UTC (permalink / raw)
  To: David Miller; +Cc: gerrit, netdev, kaber, jmorris
In-Reply-To: <20060611.234905.35014718.davem@davemloft.net>

On Sun, Jun 11, 2006 at 11:49:05PM -0700, David Miller wrote:
> 
> Yeah.  Good point.  But how much protocol internals do we want to
> slide into the ->data_ready() callbacks of such layers?  That's ugly
> and something we should try to avoid.

I agree with the objective of minimising the exposure of internals.
However, in this particular instance we're already exposing much more
than a couple of UDP SNMP counters in the sunrpc code.  This makes
adjusting the counters there the most expedient course of action.

Longer term we probably want to restructure the code a bit so that
more if it moves to udp.c.

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply

* Re: [PATCH 3/5] ehea: queue management
From: Jan-Bernd Themann @ 2006-06-12  7:14 UTC (permalink / raw)
  To: John Rose; +Cc: netdev, Marcus Eder, Christoph Raisch, themann, tklein
In-Reply-To: <1149878470.28483.6.camel@sinatra.austin.ibm.com>

John Rose wrote:
>> +#define EHEA_MEM_START 0xc000000000000000
> 
> You probably don't want to hardcode this.  Maybe KERNELBASE from page.h?

Yes, we want to use KERNELBASE

> 
>> +
>> +int ehea_reg_mr_adapter(struct ehea_adapter *adapter)
>> +{
>> +	}
> 
> This creates DMA mappings for the entirety of kernel memory, right?  Has
> this been run by the ppc64 folks for possible impacts?

Yes, that is correct. We have tested it on our ppc64 without running into any
problems. There should be no impacts on other kernel parts, but we haven't
talked to the ppc64 folks yet.

Jan-Bernd

^ permalink raw reply

* Re: [ PATCH 2.6.17-rc6 1/1] udp.c: counting InDatagrams which are never delivered
From: Gerrit Renker @ 2006-06-12  7:22 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, kaber, jmorris
In-Reply-To: <20060611.231300.95505265.davem@davemloft.net>

The code below implements the discussed solution of decrementing
InDatagrams if a datagram fails the checksum within udp_recvmsg().

I have given it a quick test / build and checked the outcome against
previous results: I now obtained correct counter values, i.e. the application
counted exactly InDatagrams datagrams, whereas with the same settings before
this was not the case (datagrams with checksum errors were counted both as
InErrors and as InDatagrams). 

Will add this patch to http://bugzilla.kernel.org/show_bug.cgi?id=6660
where this problem is also described. Patches under 2.6.16 with no complaints.

Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
---

 include/net/snmp.h |    2 ++
 include/net/udp.h  |    1 +
 net/ipv4/udp.c     |    1 +
 3 files changed, 4 insertions(+)


diff -Nurp  a/include/net/snmp.h b/include/net/snmp.h
--- a/include/net/snmp.h	2006-06-05 21:52:55.000000000 +0100
+++ b/include/net/snmp.h	2006-06-12 07:38:11.000000000 +0100
@@ -137,6 +137,8 @@ struct linux_mib {
 	(per_cpu_ptr(mib[!in_softirq()], raw_smp_processor_id())->mibs[field]++)
 #define SNMP_DEC_STATS(mib, field) 	\
 	(per_cpu_ptr(mib[!in_softirq()], raw_smp_processor_id())->mibs[field]--)
+#define SNMP_DEC_STATS_BH(mib, field) 	\
+	(per_cpu_ptr(mib[0], raw_smp_processor_id())->mibs[field]--)
 #define SNMP_ADD_STATS_BH(mib, field, addend) 	\
 	(per_cpu_ptr(mib[0], raw_smp_processor_id())->mibs[field] += addend)
 #define SNMP_ADD_STATS_USER(mib, field, addend) 	\
diff -Nurp  a/include/net/udp.h b/include/net/udp.h
--- a/include/net/udp.h	2006-06-06 18:04:36.000000000 +0100
+++ b/include/net/udp.h	2006-06-12 07:39:29.000000000 +0100
@@ -78,6 +78,7 @@ DECLARE_SNMP_STAT(struct udp_mib, udp_st
 #define UDP_INC_STATS(field)		SNMP_INC_STATS(udp_statistics, field)
 #define UDP_INC_STATS_BH(field)		SNMP_INC_STATS_BH(udp_statistics, field)
 #define UDP_INC_STATS_USER(field) 	SNMP_INC_STATS_USER(udp_statistics, field)
+#define UDP_DEC_STATS_BH(field)		SNMP_DEC_STATS_BH(udp_statistics, field)
 
 /* /proc */
 struct udp_seq_afinfo {
diff -Nurp  a/net/ipv4/udp.c b/net/ipv4/udp.c
--- a/net/ipv4/udp.c	2006-06-07 20:44:13.000000000 +0100
+++ b/net/ipv4/udp.c	2006-06-12 07:40:02.000000000 +0100
@@ -846,6 +846,7 @@ out:
 
 csum_copy_err:
 	UDP_INC_STATS_BH(UDP_MIB_INERRORS);
+	UDP_DEC_STATS_BH(UDP_MIB_INDATAGRAMS);
 
 	skb_kill_datagram(sk, skb, flags);
 


^ permalink raw reply

* Re: [patch] undo AF_UNIX _bh locking changes and split lock-type instead
From: David Miller @ 2006-06-12  7:18 UTC (permalink / raw)
  To: herbert
  Cc: akpm, Valdis.Kletnieks, jirislaby, netdev, linux-kernel, stefanr,
	mingo, linux1394-devel, mingo, arjan
In-Reply-To: <20060612070356.GA1273@gondor.apana.org.au>

From: Herbert Xu <herbert@gondor.apana.org.au>
Date: Mon, 12 Jun 2006 17:03:56 +1000

> On Mon, Jun 12, 2006 at 08:57:01AM +0200, Ingo Molnar wrote:
> >
> > regarding your point wrt. path of integration - it is pretty much the 
> > only practical way to do this centrally as part of the lock validator 
> > patches, but to collect ACKs from subsystem maintainers in the process. 
> > So if you like it i'd like to have your ACK but this patch depends on 
> > the other lock validator patches (and only makes sense together with 
> > them), so they should temporarily stay in the lock validator queue. 
> > Hopefully this wont be a state that lasts too long and once the 
> > validator is upstream, all patches of course go via the subsystem 
> > submission rules.
> 
> Obviously as long as Dave is happy with it then it's fine.  However,
> it's probably a good idea to cc netdev for relevant patches so that
> they get a wider review.  If you've already sent this one there then
> I apologise for missing it :)

Yes, this is fine with me.

^ permalink raw reply

* Re: [patch] undo AF_UNIX _bh locking changes and split lock-type instead
From: Herbert Xu @ 2006-06-12  7:03 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Andrew Morton, linux1394-devel, Valdis.Kletnieks, Jiri Slaby,
	netdev, linux-kernel, mingo, Stefan Richter, David S. Miller,
	arjan
In-Reply-To: <20060612065701.GA24213@elte.hu>

On Mon, Jun 12, 2006 at 08:57:01AM +0200, Ingo Molnar wrote:
>
> regarding your point wrt. path of integration - it is pretty much the 
> only practical way to do this centrally as part of the lock validator 
> patches, but to collect ACKs from subsystem maintainers in the process. 
> So if you like it i'd like to have your ACK but this patch depends on 
> the other lock validator patches (and only makes sense together with 
> them), so they should temporarily stay in the lock validator queue. 
> Hopefully this wont be a state that lasts too long and once the 
> validator is upstream, all patches of course go via the subsystem 
> submission rules.

Obviously as long as Dave is happy with it then it's fine.  However,
it's probably a good idea to cc netdev for relevant patches so that
they get a wider review.  If you've already sent this one there then
I apologise for missing it :)

> (the #ifdef LOCKDEP should probably be converted to some sort of 
> lockdep_split_lock_key(&sk->sk_receive_queue.lock) op - i'll do that 
> later)

Cool.

Thanks,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply

* [patch] undo AF_UNIX _bh locking changes and split lock-type instead
From: Ingo Molnar @ 2006-06-12  6:57 UTC (permalink / raw)
  To: Herbert Xu
  Cc: Andrew Morton, linux1394-devel, Valdis.Kletnieks, Jiri Slaby,
	netdev, linux-kernel, mingo, Stefan Richter, David S. Miller,
	arjan
In-Reply-To: <20060612064122.GA1101@gondor.apana.org.au>


* Herbert Xu <herbert@gondor.apana.org.au> wrote:

> > Maybe it's enough to introduce a separate key for AF_UNIX alone (and 
> > still having all other protocols share the locking rules for 
> > sk_receive_queue.lock) , by reinitializing its spinlock after 
> > sock_init_data()?
> 
> This could work.  AF_UNIX is probably the only family that does not 
> interact with hardware.

ok, great. The patch below does the trick on my box.

regarding your point wrt. path of integration - it is pretty much the 
only practical way to do this centrally as part of the lock validator 
patches, but to collect ACKs from subsystem maintainers in the process. 
So if you like it i'd like to have your ACK but this patch depends on 
the other lock validator patches (and only makes sense together with 
them), so they should temporarily stay in the lock validator queue. 
Hopefully this wont be a state that lasts too long and once the 
validator is upstream, all patches of course go via the subsystem 
submission rules.

(the #ifdef LOCKDEP should probably be converted to some sort of 
lockdep_split_lock_key(&sk->sk_receive_queue.lock) op - i'll do that 
later)

	Ingo

------
Subject: undo AF_UNIX _bh locking changes and split lock-type instead
From: Ingo Molnar <mingo@elte.hu>

this cleans up lock-validator-special-locking-af_unix.patch: instead
of adding _bh locking to AF_UNIX, this patch splits their
sk_receive_queue.lock type from the other networking skb-queue locks.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 net/unix/af_unix.c |   17 +++++++++++++----
 net/unix/garbage.c |    8 ++++----
 2 files changed, 17 insertions(+), 8 deletions(-)

Index: linux/net/unix/af_unix.c
===================================================================
--- linux.orig/net/unix/af_unix.c
+++ linux/net/unix/af_unix.c
@@ -557,6 +557,15 @@ static struct sock * unix_create1(struct
 	atomic_inc(&unix_nr_socks);
 
 	sock_init_data(sock,sk);
+#ifdef CONFIG_LOCKDEP
+	/*
+	 * AF_UNIX sockets do not interact with hardware, hence they
+	 * dont trigger interrupts - so it's safe for them to have
+	 * bh-unsafe locking for their sk_receive_queue.lock. Split off
+	 * this special lock-type by reinitializing the spinlock.
+	 */
+	spin_lock_init(&sk->sk_receive_queue.lock);
+#endif
 
 	sk->sk_write_space	= unix_write_space;
 	sk->sk_max_ack_backlog	= sysctl_unix_max_dgram_qlen;
@@ -1073,12 +1082,12 @@ restart:
 	unix_state_wunlock(sk);
 
 	/* take ten and and send info to listening sock */
-	spin_lock_bh(&other->sk_receive_queue.lock);
+	spin_lock(&other->sk_receive_queue.lock);
 	__skb_queue_tail(&other->sk_receive_queue, skb);
 	/* Undo artificially decreased inflight after embrion
 	 * is installed to listening socket. */
 	atomic_inc(&newu->inflight);
-	spin_unlock_bh(&other->sk_receive_queue.lock);
+	spin_unlock(&other->sk_receive_queue.lock);
 	unix_state_runlock(other);
 	other->sk_data_ready(other, 0);
 	sock_put(other);
@@ -1843,7 +1852,7 @@ static int unix_ioctl(struct socket *soc
 				break;
 			}
 
-			spin_lock_bh(&sk->sk_receive_queue.lock);
+			spin_lock(&sk->sk_receive_queue.lock);
 			if (sk->sk_type == SOCK_STREAM ||
 			    sk->sk_type == SOCK_SEQPACKET) {
 				skb_queue_walk(&sk->sk_receive_queue, skb)
@@ -1853,7 +1862,7 @@ static int unix_ioctl(struct socket *soc
 				if (skb)
 					amount=skb->len;
 			}
-			spin_unlock_bh(&sk->sk_receive_queue.lock);
+			spin_unlock(&sk->sk_receive_queue.lock);
 			err = put_user(amount, (int __user *)arg);
 			break;
 		}
Index: linux/net/unix/garbage.c
===================================================================
--- linux.orig/net/unix/garbage.c
+++ linux/net/unix/garbage.c
@@ -235,7 +235,7 @@ void unix_gc(void)
 		struct sock *x = pop_stack();
 		struct sock *sk;
 
-		spin_lock_bh(&x->sk_receive_queue.lock);
+		spin_lock(&x->sk_receive_queue.lock);
 		skb = skb_peek(&x->sk_receive_queue);
 		
 		/*
@@ -270,7 +270,7 @@ void unix_gc(void)
 				maybe_unmark_and_push(skb->sk);
 			skb=skb->next;
 		}
-		spin_unlock_bh(&x->sk_receive_queue.lock);
+		spin_unlock(&x->sk_receive_queue.lock);
 		sock_put(x);
 	}
 
@@ -283,7 +283,7 @@ void unix_gc(void)
 		if (u->gc_tree == GC_ORPHAN) {
 			struct sk_buff *nextsk;
 
-			spin_lock_bh(&s->sk_receive_queue.lock);
+			spin_lock(&s->sk_receive_queue.lock);
 			skb = skb_peek(&s->sk_receive_queue);
 			while (skb &&
 			       skb != (struct sk_buff *)&s->sk_receive_queue) {
@@ -298,7 +298,7 @@ void unix_gc(void)
 				}
 				skb = nextsk;
 			}
-			spin_unlock_bh(&s->sk_receive_queue.lock);
+			spin_unlock(&s->sk_receive_queue.lock);
 		}
 		u->gc_tree = GC_ORPHAN;
 	}

^ permalink raw reply

* Re: 2.6.17-rc5-mm3-lockdep -
From: David Miller @ 2006-06-12  6:50 UTC (permalink / raw)
  To: mingo
  Cc: herbert, stefanr, Valdis.Kletnieks, jirislaby, akpm, arjan, mingo,
	linux-kernel, linux1394-devel, netdev
In-Reply-To: <20060612063807.GA23939@elte.hu>

From: Ingo Molnar <mingo@elte.hu>
Date: Mon, 12 Jun 2006 08:38:07 +0200

> yeah. I'll investigate - it's quite likely that sk_receive_queue.lock 
> will have to get per-address family locking rules - right?

That's right.

> Maybe it's enough to introduce a separate key for AF_UNIX alone (and 
> still having all other protocols share the locking rules for 
> sk_receive_queue.lock) , by reinitializing its spinlock after 
> sock_init_data()?

AF_NETLINK and/or AF_PACKET might be in a similar situation
as AF_UNIX.

^ permalink raw reply

* Re: [ PATCH 2.6.17-rc6 1/1] udp.c: counting InDatagrams which are never delivered
From: David Miller @ 2006-06-12  6:49 UTC (permalink / raw)
  To: herbert; +Cc: gerrit, netdev, kaber, jmorris
In-Reply-To: <E1FpfkX-0000EL-00@gondolin.me.apana.org.au>

From: Herbert Xu <herbert@gondor.apana.org.au>
Date: Mon, 12 Jun 2006 16:18:09 +1000

> David Miller <davem@davemloft.net> wrote:
> > 
> > Probably a better way to handle this is to correct the
> > INDATAGRAMS value by decrementing it when we notice that
> > the checksum is incorrect in a deferred manner.
> 
> I think sunrpc should instead increment the appropriate counters directly
> as otherwise checksum errors won't be recorded correctly for sunrpc packets.

Yeah.  Good point.  But how much protocol internals do we want to
slide into the ->data_ready() callbacks of such layers?  That's ugly
and something we should try to avoid.

^ permalink raw reply

* Re: 2.6.17-rc5-mm3-lockdep -
From: Herbert Xu @ 2006-06-12  6:41 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Andrew Morton, linux1394-devel, Valdis.Kletnieks, Jiri Slaby,
	netdev, linux-kernel, mingo, Stefan Richter, David S. Miller,
	arjan
In-Reply-To: <20060612063807.GA23939@elte.hu>

On Mon, Jun 12, 2006 at 08:38:07AM +0200, Ingo Molnar wrote:
> 
> yeah. I'll investigate - it's quite likely that sk_receive_queue.lock 
> will have to get per-address family locking rules - right?

Yes that's the issue.

> Maybe it's enough to introduce a separate key for AF_UNIX alone (and 
> still having all other protocols share the locking rules for 
> sk_receive_queue.lock) , by reinitializing its spinlock after 
> sock_init_data()?

This could work.  AF_UNIX is probably the only family that does not
interact with hardware.

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply

* Re: 2.6.17-rc5-mm3-lockdep -
From: Ingo Molnar @ 2006-06-12  6:38 UTC (permalink / raw)
  To: Herbert Xu
  Cc: Andrew Morton, linux1394-devel, Valdis.Kletnieks, Jiri Slaby,
	netdev, linux-kernel, mingo, Stefan Richter, David S. Miller,
	arjan
In-Reply-To: <20060607071208.GA1951@gondor.apana.org.au>


* Herbert Xu <herbert@gondor.apana.org.au> wrote:

> On Tue, Jun 06, 2006 at 04:39:21PM +0000, Stefan Richter wrote:
> > 
> > BTW, the locking in -mm's net/unix/af_unix.c::unix_stream_connect() 
> > differs a bit from stock unix_stream_connect(). I see spin_lock_bh() in 
> > 2.6.17-rc5-mm3 where 2.6.17-rc5 has spin_lock().
> 
> Hi Ingo:
> 
> Looks like this change was introduced by the validator patch.  Any 
> idea why this was done? AF_UNIX is a user-space-driven socket so there 
> shouldn't be any need for BH to be disabled there.

yeah. I'll investigate - it's quite likely that sk_receive_queue.lock 
will have to get per-address family locking rules - right?

Maybe it's enough to introduce a separate key for AF_UNIX alone (and 
still having all other protocols share the locking rules for 
sk_receive_queue.lock) , by reinitializing its spinlock after 
sock_init_data()?

	Ingo

^ permalink raw reply

* Re: [PATCH 2.6.17-rc6] Remove Prism II support from Orinoco
From: Faidon Liambotis @ 2006-06-11 22:49 UTC (permalink / raw)
  To: Dave Jones; +Cc: netdev
In-Reply-To: <20060611224054.GB13139@redhat.com>

On Sun, Jun 11, 2006 at 06:40:54PM -0400, Dave Jones wrote:
> Ah-ha, I had tested the wrong card.
> I also have a Sitecom card, which matches this ident you remove in your patch..
> 
> PCMCIA_DEVICE_MANF_CARD(0xd601, 0x0002), /* Safeway 802.11b, ZCOMAX AirRunner/XI-300 */
> 
<snip>
> 
> So with your patch, this card will become totally useless to me.
I think you should forward this bug to the HostAP maintainer. This
should be either be fixed in the driver or the driver should stop
claiming that it supports this card.

I merely found the duplicate IDs and removed them from Orinoco. I don't
have neither the hardware or the time to test 30+ cards...

Having two drivers supporting the same set of hardware seems pretty
pointless to me. Plus, it confuses hotplugging/automatic detection.

Regards,
Faidon

^ permalink raw reply

* Re: [ PATCH 2.6.17-rc6 1/1] udp.c: counting InDatagrams which are never delivered
From: Herbert Xu @ 2006-06-12  6:18 UTC (permalink / raw)
  To: David Miller; +Cc: gerrit, netdev, kaber, jmorris
In-Reply-To: <20060611.212913.70218067.davem@davemloft.net>

David Miller <davem@davemloft.net> wrote:
> 
> Probably a better way to handle this is to correct the
> INDATAGRAMS value by decrementing it when we notice that
> the checksum is incorrect in a deferred manner.

I think sunrpc should instead increment the appropriate counters directly
as otherwise checksum errors won't be recorded correctly for sunrpc packets.

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply

* Re: [ PATCH 2.6.17-rc6 1/1] udp.c: counting InDatagrams which are never delivered
From: David Miller @ 2006-06-12  6:13 UTC (permalink / raw)
  To: gerrit; +Cc: netdev, kaber, jmorris
In-Reply-To: <200606120702.46014@strip-the-willow>

From: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Date: Mon, 12 Jun 2006 07:02:45 +0100

> This is clearly preferable - would it look like this:
> 
> csum_copy_err:
>      UDP_INC_STATS_BH(UDP_MIB_INERRORS);
>      UDP_DEC_STATS_BH(UDP_MIB_INDATAGRAMS); /* requires new macro */
> 
>      skb_kill_datagram(sk, skb, flags);
>      /* ... */
> 
> in udp_recvmsg? Here I must pass - there is no xxx_DEC_BH macro in 
> include/net/snmp.h and I don't know whether the following guess is correct:
> 
> #define SNMP_DEC_STATS_BH(mib, field) 	\
> 	(per_cpu_ptr(mib[0], raw_smp_processor_id())->mibs[field]--)
> 
> If this is correct, then it seems done; one could use this macro or add
> a corresponding UDP_DEC_STATS_BH to include/net/udp.h .

The index of mib[] in those macros is always "!in_softirq()", the
*_BH() variants use zero for the index because they are called in
contexts where we know that "!in_sortirq()" evaluates to false.

So your SNMP_DEC_STATS_BH() macro is correct.

Can you cook up the patch, which adds your SNMP_DEC_STATS_BH() macro,
the UDP_DEC_STATS_BH counterpart, and the change that uses it in
net/ipv4/udp.c?

I'd appreciate this, thanks a lot.

^ permalink raw reply

* Re: [ PATCH 2.6.17-rc6 1/1] udp.c: counting InDatagrams which are never delivered
From: Gerrit Renker @ 2006-06-12  6:02 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, kaber, jmorris
In-Reply-To: <20060611.212913.70218067.davem@davemloft.net>

Quoting David Miller:
|  
|  > Fix:   Move the `UDP_INC_STATS_BH(UDP_MIB_INDATAGRAMS)' statement from 
|  >        udp_queue_rcv_skb to udp_recvmsg. Now InDatagrams only counts those
|  >        datagrams which were really delivered (as per RFC 2013). 
|  > 
|  
|  Unfortunately this breaks NFS and other in-kernel UDP socket usages,
|  which never call recvmsg() and instead take the packet via the
|  ->data_ready() callback done by sock_queue_receive_skb().
|  
|  Your patch will make the counter never get incremented when such
|  a user is using the UDP socket.
|  
|  Probably a better way to handle this is to correct the
|  INDATAGRAMS value by decrementing it when we notice that
|  the checksum is incorrect in a deferred manner.
This is clearly preferable - would it look like this:

csum_copy_err:
     UDP_INC_STATS_BH(UDP_MIB_INERRORS);
     UDP_DEC_STATS_BH(UDP_MIB_INDATAGRAMS); /* requires new macro */

     skb_kill_datagram(sk, skb, flags);
     /* ... */

in udp_recvmsg? Here I must pass - there is no xxx_DEC_BH macro in 
include/net/snmp.h and I don't know whether the following guess is correct:

#define SNMP_DEC_STATS_BH(mib, field) 	\
	(per_cpu_ptr(mib[0], raw_smp_processor_id())->mibs[field]--)

If this is correct, then it seems done; one could use this macro or add
a corresponding UDP_DEC_STATS_BH to include/net/udp.h .




^ permalink raw reply

* Re: TCP Westwood+ patches
From: David Miller @ 2006-06-12  6:02 UTC (permalink / raw)
  To: shemminger; +Cc: ldecicco, netdev, saverio.mascolo
In-Reply-To: <20060606115306.15b52b38@dxpl.pdx.osdl.net>

From: Stephen Hemminger <shemminger@osdl.org>
Date: Tue, 6 Jun 2006 11:53:06 -0700

> I cleaned these up and put them in a git tree.

All 4 patches are in my tree now.

Thanks Stephen.

^ permalink raw reply

* [PATCH netdev-2.6#upstream] net: au1000_eth: netdev_priv() conversion
From: Herbert Valerio Riedel @ 2006-06-12  5:52 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: netdev, linux-mips, ppopov, sshtylyov, ralf

convert driver to use netdev_priv(net_device*) instead of accessing ->priv
directly; where applicable, declare the resulting local pointer to be 'const'

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
---

 drivers/net/au1000_eth.c |   51 +++++++++++++++++++++++-----------------------
 1 files changed, 25 insertions(+), 26 deletions(-)

505c73271046495d4948bf7b5adc7c4e3b88835d
diff --git a/drivers/net/au1000_eth.c b/drivers/net/au1000_eth.c
index 038d5fc..558aae3 100644
--- a/drivers/net/au1000_eth.c
+++ b/drivers/net/au1000_eth.c
@@ -199,7 +199,7 @@ #endif
  */
 static int mdio_read(struct net_device *dev, int phy_addr, int reg)
 {
-	struct au1000_private *aup = (struct au1000_private *) dev->priv;
+	struct au1000_private *const aup = netdev_priv(dev);
 	volatile u32 *const mii_control_reg = &aup->mac->mii_control;
 	volatile u32 *const mii_data_reg = &aup->mac->mii_data;
 	u32 timedout = 20;
@@ -233,7 +233,7 @@ static int mdio_read(struct net_device *
 
 static void mdio_write(struct net_device *dev, int phy_addr, int reg, u16 value)
 {
-	struct au1000_private *aup = (struct au1000_private *) dev->priv;
+	struct au1000_private *const aup = netdev_priv(dev);
 	volatile u32 *const mii_control_reg = &aup->mac->mii_control;
 	volatile u32 *const mii_data_reg = &aup->mac->mii_data;
 	u32 timedout = 20;
@@ -288,7 +288,7 @@ static int mdiobus_reset(struct mii_bus 
 
 static int mii_probe (struct net_device *dev)
 {
-	struct au1000_private *const aup = (struct au1000_private *) dev->priv;
+	struct au1000_private *const aup = netdev_priv(dev);
 	struct phy_device *phydev = NULL;
 
 #if defined(AU1XXX_PHY_STATIC_CONFIG)
@@ -419,7 +419,7 @@ void ReleaseDB(struct au1000_private *au
 
 static void enable_rx_tx(struct net_device *dev)
 {
-	struct au1000_private *aup = (struct au1000_private *) dev->priv;
+	struct au1000_private *const aup = netdev_priv(dev);
 
 	if (au1000_debug > 4)
 		printk(KERN_INFO "%s: enable_rx_tx\n", dev->name);
@@ -430,7 +430,7 @@ static void enable_rx_tx(struct net_devi
 
 static void hard_stop(struct net_device *dev)
 {
-	struct au1000_private *aup = (struct au1000_private *) dev->priv;
+	struct au1000_private *const aup = netdev_priv(dev);
 
 	if (au1000_debug > 4)
 		printk(KERN_INFO "%s: hard stop\n", dev->name);
@@ -442,7 +442,7 @@ static void hard_stop(struct net_device 
 static void enable_mac(struct net_device *dev, int force_reset)
 {
 	unsigned long flags;
-	struct au1000_private *aup = (struct au1000_private *) dev->priv;
+	struct au1000_private *const aup = netdev_priv(dev);
 
 	spin_lock_irqsave(&aup->lock, flags);
 
@@ -461,7 +461,7 @@ static void enable_mac(struct net_device
 
 static void reset_mac_unlocked(struct net_device *dev)
 {
-	struct au1000_private *const aup = (struct au1000_private *) dev->priv;
+	struct au1000_private *const aup = netdev_priv(dev);
 	int i;
 
 	hard_stop(dev);
@@ -487,7 +487,7 @@ static void reset_mac_unlocked(struct ne
 
 static void reset_mac(struct net_device *dev)
 {
-	struct au1000_private *const aup = (struct au1000_private *) dev->priv;
+	struct au1000_private *const aup = netdev_priv(dev);
 	unsigned long flags;
 
 	if (au1000_debug > 4)
@@ -576,7 +576,7 @@ static int __init au1000_init_module(voi
 
 static int au1000_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
 {
-	struct au1000_private *aup = (struct au1000_private *)dev->priv;
+	struct au1000_private *const aup = netdev_priv(dev);
 
 	if (aup->phy_dev)
 		return phy_ethtool_gset(aup->phy_dev, cmd);
@@ -586,7 +586,7 @@ static int au1000_get_settings(struct ne
 
 static int au1000_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
 {
-	struct au1000_private *aup = (struct au1000_private *)dev->priv;
+	struct au1000_private *const aup = netdev_priv(dev);
 
 	if (!capable(CAP_NET_ADMIN))
 		return -EPERM;
@@ -600,7 +600,7 @@ static int au1000_set_settings(struct ne
 static void
 au1000_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info)
 {
-	struct au1000_private *aup = (struct au1000_private *)dev->priv;
+	struct au1000_private *const aup = netdev_priv(dev);
 
 	strcpy(info->driver, DRV_NAME);
 	strcpy(info->version, DRV_VERSION);
@@ -657,7 +657,7 @@ static struct net_device * au1000_probe(
 	printk("%s: Au1xx0 Ethernet found at 0x%x, irq %d\n",
 		dev->name, base, irq);
 
-	aup = dev->priv;
+	aup = netdev_priv(dev);
 
 	/* Allocate the data buffers */
 	/* Snooping works fine with eth on all au1xxx */
@@ -822,7 +822,7 @@ err_out:
  */
 static int au1000_init(struct net_device *dev)
 {
-	struct au1000_private *aup = (struct au1000_private *) dev->priv;
+	struct au1000_private *const aup = netdev_priv(dev);
 	u32 flags;
 	int i;
 	u32 control;
@@ -873,7 +873,7 @@ #endif
 static void
 au1000_adjust_link(struct net_device *dev)
 {
-	struct au1000_private *aup = (struct au1000_private *) dev->priv;
+	struct au1000_private *const aup = netdev_priv(dev);
 	struct phy_device *phydev = aup->phy_dev;
 	unsigned long flags;
 
@@ -953,7 +953,7 @@ au1000_adjust_link(struct net_device *de
 static int au1000_open(struct net_device *dev)
 {
 	int retval;
-	struct au1000_private *aup = (struct au1000_private *) dev->priv;
+	struct au1000_private *const aup = netdev_priv(dev);
 
 	if (au1000_debug > 4)
 		printk("%s: open: dev=%p\n", dev->name, dev);
@@ -988,7 +988,7 @@ static int au1000_open(struct net_device
 static int au1000_close(struct net_device *dev)
 {
 	unsigned long flags;
-	struct au1000_private *const aup = (struct au1000_private *) dev->priv;
+	struct au1000_private *const aup = netdev_priv(dev);
 
 	if (au1000_debug > 4)
 		printk("%s: close: dev=%p\n", dev->name, dev);
@@ -1014,12 +1014,11 @@ static void __exit au1000_cleanup_module
 {
 	int i, j;
 	struct net_device *dev;
-	struct au1000_private *aup;
 
 	for (i = 0; i < num_ifs; i++) {
 		dev = iflist[i].dev;
 		if (dev) {
-			aup = (struct au1000_private *) dev->priv;
+			struct au1000_private *const aup = netdev_priv(dev);
 			unregister_netdev(dev);
 			for (j = 0; j < NUM_RX_DMA; j++)
 				if (aup->rx_db_inuse[j])
@@ -1039,7 +1038,7 @@ static void __exit au1000_cleanup_module
 
 static void update_tx_stats(struct net_device *dev, u32 status)
 {
-	struct au1000_private *aup = (struct au1000_private *) dev->priv;
+	struct au1000_private *const aup = netdev_priv(dev);
 	struct net_device_stats *ps = &aup->stats;
 
 	if (status & TX_FRAME_ABORTED) {
@@ -1068,7 +1067,7 @@ static void update_tx_stats(struct net_d
  */
 static void au1000_tx_ack(struct net_device *dev)
 {
-	struct au1000_private *aup = (struct au1000_private *) dev->priv;
+	struct au1000_private *const aup = netdev_priv(dev);
 	volatile tx_dma_t *ptxd;
 
 	ptxd = aup->tx_dma_ring[aup->tx_tail];
@@ -1095,7 +1094,7 @@ static void au1000_tx_ack(struct net_dev
  */
 static int au1000_tx(struct sk_buff *skb, struct net_device *dev)
 {
-	struct au1000_private *aup = (struct au1000_private *) dev->priv;
+	struct au1000_private *const aup = netdev_priv(dev);
 	struct net_device_stats *ps = &aup->stats;
 	volatile tx_dma_t *ptxd;
 	u32 buff_stat;
@@ -1149,7 +1148,7 @@ static int au1000_tx(struct sk_buff *skb
 
 static inline void update_rx_stats(struct net_device *dev, u32 status)
 {
-	struct au1000_private *aup = (struct au1000_private *) dev->priv;
+	struct au1000_private *const aup = netdev_priv(dev);
 	struct net_device_stats *ps = &aup->stats;
 
 	ps->rx_packets++;
@@ -1177,7 +1176,7 @@ static inline void update_rx_stats(struc
  */
 static int au1000_rx(struct net_device *dev)
 {
-	struct au1000_private *aup = (struct au1000_private *) dev->priv;
+	struct au1000_private *const aup = netdev_priv(dev);
 	struct sk_buff *skb;
 	volatile rx_dma_t *prxd;
 	u32 buff_stat, status;
@@ -1286,7 +1285,7 @@ static void au1000_tx_timeout(struct net
 
 static void set_rx_mode(struct net_device *dev)
 {
-	struct au1000_private *aup = (struct au1000_private *) dev->priv;
+	struct au1000_private *const aup = netdev_priv(dev);
 
 	if (au1000_debug > 4) 
 		printk("%s: set_rx_mode: flags=%x\n", dev->name, dev->flags);
@@ -1319,7 +1318,7 @@ static void set_rx_mode(struct net_devic
 
 static int au1000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
 {
-	struct au1000_private *aup = (struct au1000_private *)dev->priv;
+	struct au1000_private *const aup = netdev_priv(dev);
 
 	if (!netif_running(dev)) return -EINVAL;
 
@@ -1330,7 +1329,7 @@ static int au1000_ioctl(struct net_devic
 
 static struct net_device_stats *au1000_get_stats(struct net_device *dev)
 {
-	struct au1000_private *aup = (struct au1000_private *) dev->priv;
+	struct au1000_private *const aup = netdev_priv(dev);
 
 	if (au1000_debug > 4)
 		printk("%s: au1000_get_stats: dev=%p\n", dev->name, dev);
-- 
1.3.2


^ permalink raw reply related

* New and hot Most quality products for anyone who wants to become a champion in bed
From: Rosemarie @ 2006-06-12  5:26 UTC (permalink / raw)
  To: newbie-owner

Don't accept limitations on the size of your favorite member Benefit from simple, approved methods that will help you gain more Fuller, harder tools to please her all the night long - and explosive climaxes Notice that happy glow in her eyes after you did all the things that night We got loads of quality and safe products to make your life better http://sexygd.com 
Let bygones be bygones No man is an island No one grows old by living; only by losing interest in living There is more than one way to skin a cat Angry Men Make Themselves a Bed of Nettles


^ permalink raw reply

* Re: [ PATCH 2.6.17-rc6 1/1] udp.c: counting InDatagrams which are never delivered
From: David Miller @ 2006-06-12  4:29 UTC (permalink / raw)
  To: gerrit; +Cc: netdev, kaber, jmorris
In-Reply-To: <200606061925.40327@this-message-has-been-logged>

From: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Date: Tue, 6 Jun 2006 19:25:40 +0100

> Fix:   Move the `UDP_INC_STATS_BH(UDP_MIB_INDATAGRAMS)' statement from 
>        udp_queue_rcv_skb to udp_recvmsg. Now InDatagrams only counts those
>        datagrams which were really delivered (as per RFC 2013). 
> 
> Please CC: any correspondence to gerrit@erg.abdn.ac.uk  
> 
> Signed-off-by: <gerrit@erg.abdn.ac.uk>

Unfortunately this breaks NFS and other in-kernel UDP socket usages,
which never call recvmsg() and instead take the packet via the
->data_ready() callback done by sock_queue_receive_skb().

Your patch will make the counter never get incremented when such
a user is using the UDP socket.

Probably a better way to handle this is to correct the
INDATAGRAMS value by decrementing it when we notice that
the checksum is incorrect in a deferred manner.


^ permalink raw reply

* Re: [PATCH] net.ipv4.ip_autoconfig sysctl removal
From: David Miller @ 2006-06-12  4:21 UTC (permalink / raw)
  To: shemminger; +Cc: netdev
In-Reply-To: <20060605105831.6a314086@dxpl.pdx.osdl.net>

From: Stephen Hemminger <shemminger@osdl.org>
Date: Mon, 5 Jun 2006 10:58:31 -0700

> The sysctl net.ipv4.ip_autoconfig is a legacy value that is not used.
> Can it finally go in 2.6.18 or do we need to go through the whole 
> feature-removal process?
> 
> Signed-off-by: Stephen Hemminger <shemminger@osdl.org>

I think killing this on in 2.6.18 is ok, applied.

Thanks.

^ permalink raw reply

* Re: [PATCH] bnx2: endian fixes
From: David Miller @ 2006-06-12  3:57 UTC (permalink / raw)
  To: adobriyan; +Cc: netdev, mchan
In-Reply-To: <20060610115250.GA7268@martell.zuzino.mipt.ru>

From: Alexey Dobriyan <adobriyan@gmail.com>
Date: Sat, 10 Jun 2006 15:52:51 +0400

> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>

Applied, thanks Alexey.


^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox