From romieu@fr.zoreil.com Mon Sep 1 00:18:23 2003 Received: with ECARTIS (v1.0.0; list netdev); Mon, 01 Sep 2003 00:19:03 -0700 (PDT) Received: from fr.zoreil.com (electric-eye.fr.zoreil.com [213.41.134.224]) by oss.sgi.com (8.12.9/8.12.5) with SMTP id h817ILWZ011163 for ; Mon, 1 Sep 2003 00:18:22 -0700 Received: from electric-eye.fr.zoreil.com (localhost.localdomain [127.0.0.1]) by fr.zoreil.com (8.12.8/8.12.1) with ESMTP id h817DMxA004060; Mon, 1 Sep 2003 09:13:22 +0200 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.8/8.12.1) id h817DLBr004059; Mon, 1 Sep 2003 09:13:21 +0200 Date: Mon, 1 Sep 2003 09:13:21 +0200 From: Francois Romieu To: Maillist netdev Cc: Jeff Garzik Subject: Re: So you thought sis190 was evil... Message-ID: <20030901091321.A4000@electric-eye.fr.zoreil.com> References: <3F529E71.20402@pobox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <3F529E71.20402@pobox.com>; from jgarzik@pobox.com on Sun, Aug 31, 2003 at 09:18:41PM -0400 X-archive-position: 5452 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: romieu@fr.zoreil.com Precedence: bulk X-list: netdev Jeff Garzik : > It looks like the objectionable sis190 code was copied almost wholesale > from r8169... virt_to_bus, static descriptors, lack of cpu_to_leXX, > and all. Are you asking for a copy from sis190 to r8169 ? -- Ueimor From vnuorval@tcs.hut.fi Mon Sep 1 01:18:39 2003 Received: with ECARTIS (v1.0.0; list netdev); Mon, 01 Sep 2003 01:19:14 -0700 (PDT) Received: from smtp-2.hut.fi (root@smtp-2.hut.fi [130.233.228.92]) by oss.sgi.com (8.12.9/8.12.5) with SMTP id h818IcWZ028152 for ; Mon, 1 Sep 2003 01:18:39 -0700 Received: from neon.tcs.hut.fi (neon.tcs.hut.fi [130.233.215.20]) by smtp-2.hut.fi (8.12.9/8.12.9) with ESMTP id h818IV5t020009; Mon, 1 Sep 2003 11:18:32 +0300 Received: from rhea.tcs.hut.fi (rhea.tcs.hut.fi [130.233.215.147]) by neon.tcs.hut.fi (Postfix) with ESMTP id 194358001BF; Mon, 1 Sep 2003 11:18:31 +0300 (EEST) Received: from rhea.tcs.hut.fi (localhost [127.0.0.1]) by rhea.tcs.hut.fi (8.12.3/8.12.3/Debian-6.4) with ESMTP id h818IU9s028101; Mon, 1 Sep 2003 11:18:31 +0300 Received: from localhost (vnuorval@localhost) by rhea.tcs.hut.fi (8.12.3/8.12.3/Debian-6.4) with ESMTP id h818IUxD028097; Mon, 1 Sep 2003 11:18:30 +0300 Date: Mon, 1 Sep 2003 11:18:30 +0300 (EEST) From: Ville Nuorvala To: YOSHIFUJI Hideaki / =?iso-2022-jp?B?GyRCNUhGIzFRTEAbKEI=?= Cc: davem@redhat.com, , Subject: Re: [PATCH] IPv6: (5/5) Allow IPv6 tunnels without own IPv6 address In-Reply-To: <20030901.112409.61391981.yoshfuji@linux-ipv6.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=iso-8859-15 X-RAVMilter-Version: 8.4.3(snapshot 20030212) (smtp-2.hut.fi) X-DCC-HUTCC-Metrics: smtp-2.hut.fi 1165; Body=5 Fuz1=5 Fuz2=5 X-archive-position: 5453 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: vnuorval@tcs.hut.fi Precedence: bulk X-list: netdev On Mon, 1 Sep 2003, YOSHIFUJI Hideaki / [iso-2022-jp] 吉藤英明 wrote: > In article (at Mon, 1 Sep 2003 03:11:58 +0300 (EEST)), Ville Nuorvala says: > > > unless (link-local) protocols like DHCPv6 or MLD are run over the virtual > > link formed by IPv6 tunnels, the net_devices representing the tunnels > > don't necessarily need to have an IPv6 address configured specifically to > > them. > > Wrong. All interfaces have a link-local address. (RFC2462) Unfortunately the IPv6 tunneling spec (RFC2473) is broken on this point :( I should probably raise this issue on the IETF ipv6 WG mailing list. The first problem is, that the way to generate the interface-identifier isn't currently specified in the tunnel spec. The IPv6 over PPP spec (RFC2472) section 4.1 has some ideas: 1) if available, reuse any IEEE EUI-48 or EUI-64 identifiers on the node 2) use link-layer addresses, machine serial numbers, et cetera 3) if none of these can be found, use random bits The second problem is, that this method alone doesn't yet guarantee unique identifiers to the two tunnel endpoints. In RFC2472 the IPv6 Control Protocol negotiates the identifiers between the two peers beforehand, but unfortunately we don't have a similar protocol in RFC2473. Like the other tunnels (ipip, ip_gre, sit) ip6_tunnel is fundamentally a IFF_NOARP device so you can't even use DAD to detect a duplicate address on the virtual link. (Besides, the link doesn't even exist before both devices have been brought up on the two separate nodes.) This is something for the ipv6 WG to think about, I guess. In the mean time, do we accept the in theory 1/2^64 (in practice of course bigger) chance of duplicate addresses occurring on the link? If yes, then I could (probably still later today) send a patch where the interface-identifiers for the IPv6 tunnels are generated like in the IPv6 over PPP case above. Regards, Ville -- Ville Nuorvala Research Assistant, Institute of Digital Communications, Helsinki University of Technology email: vnuorval@tcs.hut.fi, phone: +358 (0)9 451 5257 From davem@pizda.ninka.net Mon Sep 1 01:18:59 2003 Received: with ECARTIS (v1.0.0; list netdev); Mon, 01 Sep 2003 01:19:32 -0700 (PDT) Received: from pizda.ninka.net (IDENT:root@pizda.ninka.net [216.101.162.242]) by oss.sgi.com (8.12.9/8.12.5) with SMTP id h818IxWZ028182 for ; Mon, 1 Sep 2003 01:18:59 -0700 Received: (from davem@localhost) by pizda.ninka.net (8.9.3/8.9.3) id BAA07751; Mon, 1 Sep 2003 01:09:45 -0700 Date: Mon, 1 Sep 2003 01:09:45 -0700 From: "David S. Miller" To: Christoph Hellwig Cc: netdev@oss.sgi.com Subject: Re: [PATCH] convert icmpv6_socket to per-cpu data Message-Id: <20030901010945.42f4c01e.davem@redhat.com> In-Reply-To: <20030831100521.GB18663@lst.de> References: <20030831100521.GB18663@lst.de> X-Mailer: Sylpheed version 0.9.2 (GTK+ 1.2.6; sparc-unknown-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 5454 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@redhat.com Precedence: bulk X-list: netdev On Sun, 31 Aug 2003 12:05:21 +0200 Christoph Hellwig wrote: > per-cpu data works in modules for a while now. Also bring over a > comment from the IPv4 version and consolidate the error handling. Applied, thanks Christoph. From davem@pizda.ninka.net Mon Sep 1 01:39:27 2003 Received: with ECARTIS (v1.0.0; list netdev); Mon, 01 Sep 2003 01:40:04 -0700 (PDT) Received: from pizda.ninka.net (IDENT:root@pizda.ninka.net [216.101.162.242]) by oss.sgi.com (8.12.9/8.12.5) with SMTP id h818dQWZ000557 for ; Mon, 1 Sep 2003 01:39:27 -0700 Received: (from davem@localhost) by pizda.ninka.net (8.9.3/8.9.3) id BAA07847; Mon, 1 Sep 2003 01:30:20 -0700 Date: Mon, 1 Sep 2003 01:30:20 -0700 From: "David S. Miller" To: "David S. Miller" Cc: dwmw2@redhat.com, netdev@oss.sgi.com Subject: Re: Missing routes cause BUG() in icmpv6_xmit_lock(). Message-Id: <20030901013020.189fe564.davem@redhat.com> In-Reply-To: <20030831224454.349a6a53.davem@redhat.com> References: <1062341789.2785.11.camel@imladris.demon.co.uk> <20030831224454.349a6a53.davem@redhat.com> X-Mailer: Sylpheed version 0.9.2 (GTK+ 1.2.6; sparc-unknown-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 5455 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@redhat.com Precedence: bulk X-list: netdev On Sun, 31 Aug 2003 22:44:54 -0700 "David S. Miller" wrote: > I'll see what I can do about this one. Ok, here is the fix I'm going to use. I actually inadvertantly added this problem when I converted net/ipv6/icmp.c over to per-cpu sockets. There is nothing we could do with such ICMP destination unreachable packets anyways, so dropping them is the right thing to do. # This is a BitKeeper generated patch for the following project: # Project Name: Linux kernel tree # This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas: # ChangeSet 1.1614 -> 1.1615 # net/ipv6/icmp.c 1.26 -> 1.27 # # The following is the BitKeeper ChangeSet Log # -------------------------------------------- # 03/09/01 davem@nuts.ninka.net 1.1615 # [IPV6]: Do not BUG() on icmp6 socket contention, just drop. # -------------------------------------------- # diff -Nru a/net/ipv6/icmp.c b/net/ipv6/icmp.c --- a/net/ipv6/icmp.c Mon Sep 1 01:36:39 2003 +++ b/net/ipv6/icmp.c Mon Sep 1 01:36:39 2003 @@ -95,8 +95,15 @@ static void icmpv6_xmit_lock(void) { local_bh_disable(); - if (unlikely(!spin_trylock(&icmpv6_socket->sk->lock.slock))) - BUG(); + if (unlikely(!spin_trylock(&icmpv6_socket->sk->lock.slock))) { + /* This can happen if the output path (f.e. SIT or + * ip6ip6 tunnel) signals dst_link_failure() for an + * outgoing ICMP6 packet. + */ + local_bh_enable(); + return 1; + } + return 0; } static void icmpv6_xmit_unlock(void) @@ -340,7 +347,8 @@ fl.fl_icmp_type = type; fl.fl_icmp_code = code; - icmpv6_xmit_lock(); + if (icmpv6_xmit_lock()) + return; if (!icmpv6_xrlim_allow(sk, type, &fl)) goto out; @@ -423,7 +431,8 @@ fl.oif = skb->dev->ifindex; fl.fl_icmp_type = ICMPV6_ECHO_REPLY; - icmpv6_xmit_lock(); + if (icmpv6_xmit_lock()) + return; if (!fl.oif && ipv6_addr_is_multicast(&fl.fl6_dst)) fl.oif = np->mcast_oif; From davem@pizda.ninka.net Mon Sep 1 01:51:10 2003 Received: with ECARTIS (v1.0.0; list netdev); Mon, 01 Sep 2003 01:51:44 -0700 (PDT) Received: from pizda.ninka.net (IDENT:root@pizda.ninka.net [216.101.162.242]) by oss.sgi.com (8.12.9/8.12.5) with SMTP id h818p9WZ005785 for ; Mon, 1 Sep 2003 01:51:10 -0700 Received: (from davem@localhost) by pizda.ninka.net (8.9.3/8.9.3) id BAA07940; Mon, 1 Sep 2003 01:41:01 -0700 Date: Mon, 1 Sep 2003 01:41:01 -0700 From: "David S. Miller" To: Ville Nuorvala Cc: usagi-core@linux-ipv6.org, netdev@oss.sgi.com Subject: Re: [PATCH] IPv6: (1/5) Fix bugs in ip6_tunnel.c ICMP error handler Message-Id: <20030901014101.15ff54a6.davem@redhat.com> In-Reply-To: References: X-Mailer: Sylpheed version 0.9.2 (GTK+ 1.2.6; sparc-unknown-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 5456 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@redhat.com Precedence: bulk X-list: netdev On Mon, 1 Sep 2003 02:34:55 +0300 (EEST) Ville Nuorvala wrote: > this patch fixes two byte order bugs in ip6ip6_err(). Please apply! Applied, thanks Ville. From davem@pizda.ninka.net Mon Sep 1 01:55:51 2003 Received: with ECARTIS (v1.0.0; list netdev); Mon, 01 Sep 2003 01:56:25 -0700 (PDT) Received: from pizda.ninka.net (IDENT:root@pizda.ninka.net [216.101.162.242]) by oss.sgi.com (8.12.9/8.12.5) with SMTP id h818toWZ008456 for ; Mon, 1 Sep 2003 01:55:51 -0700 Received: (from davem@localhost) by pizda.ninka.net (8.9.3/8.9.3) id BAA07971; Mon, 1 Sep 2003 01:45:44 -0700 Date: Mon, 1 Sep 2003 01:45:44 -0700 From: "David S. Miller" To: Ville Nuorvala Cc: usagi-core@linux-ipv6.org, netdev@oss.sgi.com Subject: Re: [PATCH] IPv6: (2/5) Use free_netdev() as destructor in ip6_tunnel.c Message-Id: <20030901014544.3acd384d.davem@redhat.com> In-Reply-To: References: X-Mailer: Sylpheed version 0.9.2 (GTK+ 1.2.6; sparc-unknown-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 5457 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@redhat.com Precedence: bulk X-list: netdev On Mon, 1 Sep 2003 02:46:45 +0300 (EEST) Ville Nuorvala wrote: > Oops, > forgot to attach the patch in the original mail... > > Sorry about that, That's ok :-) Applied, thanks Ville. From davem@pizda.ninka.net Mon Sep 1 01:57:30 2003 Received: with ECARTIS (v1.0.0; list netdev); Mon, 01 Sep 2003 01:58:04 -0700 (PDT) Received: from pizda.ninka.net (IDENT:root@pizda.ninka.net [216.101.162.242]) by oss.sgi.com (8.12.9/8.12.5) with SMTP id h818vTWZ009352 for ; Mon, 1 Sep 2003 01:57:29 -0700 Received: (from davem@localhost) by pizda.ninka.net (8.9.3/8.9.3) id BAA07998; Mon, 1 Sep 2003 01:47:23 -0700 Date: Mon, 1 Sep 2003 01:47:22 -0700 From: "David S. Miller" To: Ville Nuorvala Cc: usagi-core@linux-ipv6.org, netdev@oss.sgi.com Subject: Re: [PATCH] IPv6: (3/5) Set dev->dev_addr and dev->broadcast in ip6_tnls Message-Id: <20030901014722.4f2d27bd.davem@redhat.com> In-Reply-To: References: X-Mailer: Sylpheed version 0.9.2 (GTK+ 1.2.6; sparc-unknown-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 5458 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@redhat.com Precedence: bulk X-list: netdev On Mon, 1 Sep 2003 02:48:55 +0300 (EEST) Ville Nuorvala wrote: > I just only recently noticed MAX_ADDR_LEN had beed increased to 32. This > means the IPv6 addresses can now be copied into the dev->dev_addr and > dev->broadcast fields, just like the IPv4 addresses are for the other > tunnel drivers. Please apply! Applied, thanks Ville. From davem@pizda.ninka.net Mon Sep 1 01:58:53 2003 Received: with ECARTIS (v1.0.0; list netdev); Mon, 01 Sep 2003 01:59:03 -0700 (PDT) Received: from pizda.ninka.net (IDENT:root@pizda.ninka.net [216.101.162.242]) by oss.sgi.com (8.12.9/8.12.5) with SMTP id h818wqWZ010069 for ; Mon, 1 Sep 2003 01:58:52 -0700 Received: (from davem@localhost) by pizda.ninka.net (8.9.3/8.9.3) id BAA08025; Mon, 1 Sep 2003 01:48:46 -0700 Date: Mon, 1 Sep 2003 01:48:45 -0700 From: "David S. Miller" To: Ville Nuorvala Cc: usagi-core@linux-ipv6.org, netdev@oss.sgi.com Subject: Re: [PATCH] IPv6: (4/5) Remove sockets from ip6_tunnel.c Message-Id: <20030901014845.660a9471.davem@redhat.com> In-Reply-To: References: X-Mailer: Sylpheed version 0.9.2 (GTK+ 1.2.6; sparc-unknown-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 5459 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@redhat.com Precedence: bulk X-list: netdev On Mon, 1 Sep 2003 02:57:03 +0300 (EEST) Ville Nuorvala wrote: > this patch removes all sockets from ip6_tunnel.c. It also allows nested > IPv6 encapsulations through different devices in the IPv6 tunnel > entry-point node, since the old restrictions caused by the sockets don't > apply any more. Please apply the patch! Thank you very much for finishing this work. Applied, thanks. From davem@pizda.ninka.net Mon Sep 1 02:01:11 2003 Received: with ECARTIS (v1.0.0; list netdev); Mon, 01 Sep 2003 02:01:48 -0700 (PDT) Received: from pizda.ninka.net (IDENT:root@pizda.ninka.net [216.101.162.242]) by oss.sgi.com (8.12.9/8.12.5) with SMTP id h8191AWZ011379 for ; Mon, 1 Sep 2003 02:01:10 -0700 Received: (from davem@localhost) by pizda.ninka.net (8.9.3/8.9.3) id BAA08042; Mon, 1 Sep 2003 01:52:01 -0700 Date: Mon, 1 Sep 2003 01:52:01 -0700 From: "David S. Miller" To: "YOSHIFUJI Hideaki / _$B5HF#1QL@" Cc: vnuorval@tcs.hut.fi, usagi-core@linux-ipv6.org, netdev@oss.sgi.com Subject: Re: [PATCH] IPv6: (5/5) Allow IPv6 tunnels without own IPv6 address Message-Id: <20030901015201.4d673fd7.davem@redhat.com> In-Reply-To: <20030901.112409.61391981.yoshfuji@linux-ipv6.org> References: <20030901.112409.61391981.yoshfuji@linux-ipv6.org> X-Mailer: Sylpheed version 0.9.2 (GTK+ 1.2.6; sparc-unknown-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 5460 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@redhat.com Precedence: bulk X-list: netdev On Mon, 01 Sep 2003 11:24:09 +0900 (JST) YOSHIFUJI Hideaki / _$B5HF#1QL@ wrote: > In article (at Mon, 1 Sep 2003 03:11:58 +0300 (EEST)), Ville Nuorvala says: > > > unless (link-local) protocols like DHCPv6 or MLD are run over the virtual > > link formed by IPv6 tunnels, the net_devices representing the tunnels > > don't necessarily need to have an IPv6 address configured specifically to > > them. > > Wrong. All interfaces have a link-local address. (RFC2462) Are you sure there isn't an exception in the ip6ip6 tunnel RFC? From davem@pizda.ninka.net Mon Sep 1 02:13:51 2003 Received: with ECARTIS (v1.0.0; list netdev); Mon, 01 Sep 2003 02:14:25 -0700 (PDT) Received: from pizda.ninka.net (IDENT:root@pizda.ninka.net [216.101.162.242]) by oss.sgi.com (8.12.9/8.12.5) with SMTP id h819DoWZ018517 for ; Mon, 1 Sep 2003 02:13:51 -0700 Received: (from davem@localhost) by pizda.ninka.net (8.9.3/8.9.3) id CAA08086; Mon, 1 Sep 2003 02:03:40 -0700 Date: Mon, 1 Sep 2003 02:03:40 -0700 From: "David S. Miller" To: Ville Nuorvala Cc: yoshfuji@linux-ipv6.org, usagi-core@linux-ipv6.org, netdev@oss.sgi.com Subject: Re: [PATCH] IPv6: (5/5) Allow IPv6 tunnels without own IPv6 address Message-Id: <20030901020340.5a128836.davem@redhat.com> In-Reply-To: References: <20030901.112409.61391981.yoshfuji@linux-ipv6.org> X-Mailer: Sylpheed version 0.9.2 (GTK+ 1.2.6; sparc-unknown-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 5461 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@redhat.com Precedence: bulk X-list: netdev On Mon, 1 Sep 2003 11:18:30 +0300 (EEST) Ville Nuorvala wrote: > Unfortunately the IPv6 tunneling spec (RFC2473) is broken on this point :( > I should probably raise this issue on the IETF ipv6 WG mailing list. ... > The first problem is, that the way to generate the interface-identifier > isn't currently specified in the tunnel spec. ... > The second problem is, that this method alone doesn't yet guarantee > unique identifiers to the two tunnel endpoints. This is exactly what I was thinking. I really don't think link- local addresses make any sense on a software device such as the ipip6 tunnels. From hch@lst.de Mon Sep 1 02:21:24 2003 Received: with ECARTIS (v1.0.0; list netdev); Mon, 01 Sep 2003 02:22:00 -0700 (PDT) Received: from mail.lst.de ([212.34.189.10]) by oss.sgi.com (8.12.9/8.12.5) with SMTP id h819LMWZ024275 for ; Mon, 1 Sep 2003 02:21:23 -0700 Received: from verein.lst.de (localhost [127.0.0.1]) by mail.lst.de (8.12.3/8.12.3/Debian-6.4) with ESMTP id h819L0Z4031148 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Mon, 1 Sep 2003 11:21:00 +0200 Received: (from hch@localhost) by verein.lst.de (8.12.3/8.12.3/Debian-6.3) id h819L0xH031146 for netdev@oss.sgi.com; Mon, 1 Sep 2003 11:21:00 +0200 Date: Mon, 1 Sep 2003 11:21:00 +0200 From: Christoph Hellwig To: netdev@oss.sgi.com Subject: [PATCH] CONFIG_IA64_SGI_SN1 is gone Message-ID: <20030901092100.GA31136@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.28i X-Spam-Score: -1.8 () PATCH_UNIFIED_DIFF,UPPERCASE_25_50,USER_AGENT_MUTT X-Scanned-By: MIMEDefang 2.33 (www . roaringpenguin . com / mimedefang) X-archive-position: 5462 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hch@lst.de Precedence: bulk X-list: netdev and the IOC3 driver would only work with SN0/Mips anyway. --- 1.40/drivers/net/Kconfig Mon Aug 18 23:59:59 2003 +++ edited/drivers/net/Kconfig Mon Sep 1 10:05:48 2003 @@ -502,7 +502,7 @@ config SGI_IOC3_ETH bool "SGI IOC3 Ethernet" - depends on NET_ETHERNET && (IA64_SGI_SN1 || SGI_IP27) + depends on NET_ETHERNET && SGI_IP27 help If you have a network (Ethernet) card of this type, say Y and read the Ethernet-HOWTO, available from From davem@pizda.ninka.net Mon Sep 1 02:44:50 2003 Received: with ECARTIS (v1.0.0; list netdev); Mon, 01 Sep 2003 02:45:22 -0700 (PDT) Received: from pizda.ninka.net (IDENT:root@pizda.ninka.net [216.101.162.242]) by oss.sgi.com (8.12.9/8.12.5) with SMTP id h819ilWZ004435 for ; Mon, 1 Sep 2003 02:44:49 -0700 Received: (from davem@localhost) by pizda.ninka.net (8.9.3/8.9.3) id CAA08225; Mon, 1 Sep 2003 02:35:38 -0700 Date: Mon, 1 Sep 2003 02:35:38 -0700 From: "David S. Miller" To: Christoph Hellwig Cc: netdev@oss.sgi.com Subject: Re: [PATCH] CONFIG_IA64_SGI_SN1 is gone Message-Id: <20030901023538.1512536a.davem@redhat.com> In-Reply-To: <20030901092100.GA31136@lst.de> References: <20030901092100.GA31136@lst.de> X-Mailer: Sylpheed version 0.9.2 (GTK+ 1.2.6; sparc-unknown-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 5463 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@redhat.com Precedence: bulk X-list: netdev On Mon, 1 Sep 2003 11:21:00 +0200 Christoph Hellwig wrote: > and the IOC3 driver would only work with SN0/Mips anyway. Applied, thanks Christoph. From dwmw2@redhat.com Mon Sep 1 02:58:33 2003 Received: with ECARTIS (v1.0.0; list netdev); Mon, 01 Sep 2003 02:59:06 -0700 (PDT) Received: from executor.cambridge.redhat.com (pub237.cambridge.redhat.com [213.86.99.237] (may be forged)) by oss.sgi.com (8.12.9/8.12.5) with SMTP id h819wVWZ010891 for ; Mon, 1 Sep 2003 02:58:32 -0700 Received: from hades.cambridge.redhat.com (hades.cambridge.redhat.com [172.16.18.64]) by executor.cambridge.redhat.com (Postfix) with ESMTP id 860FF63D63; Mon, 1 Sep 2003 10:58:25 +0100 (BST) Received: from hades.cambridge.redhat.com (localhost.localdomain [127.0.0.1]) by hades.cambridge.redhat.com (8.12.9/8.11.0) with ESMTP id h819wN54009915; Mon, 1 Sep 2003 10:58:23 +0100 Received: (from dwmw2@localhost) by hades.cambridge.redhat.com (8.12.9/8.12.9/Submit) id h819wMn5009913; Mon, 1 Sep 2003 10:58:22 +0100 X-Authentication-Warning: hades.cambridge.redhat.com: dwmw2 set sender to dwmw2@redhat.com using -f Subject: Re: Missing routes cause BUG() in icmpv6_xmit_lock(). From: David Woodhouse To: "David S. Miller" Cc: netdev@oss.sgi.com In-Reply-To: <20030901013020.189fe564.davem@redhat.com> References: <1062341789.2785.11.camel@imladris.demon.co.uk> <20030831224454.349a6a53.davem@redhat.com> <20030901013020.189fe564.davem@redhat.com> Content-Type: text/plain Content-Transfer-Encoding: 7bit Organization: Red Hat UK Ltd. Message-Id: <1062410301.9518.19.camel@hades.cambridge.redhat.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.4 (1.4.4-4.dwmw2.1) Date: Mon, 01 Sep 2003 10:58:22 +0100 X-archive-position: 5464 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: dwmw2@redhat.com Precedence: bulk X-list: netdev On Mon, 2003-09-01 at 01:30 -0700, David S. Miller wrote: > On Sun, 31 Aug 2003 22:44:54 -0700 > "David S. Miller" wrote: > > > I'll see what I can do about this one. > > Ok, here is the fix I'm going to use. I actually inadvertantly > added this problem when I converted net/ipv6/icmp.c over to > per-cpu sockets. In the meantime, since there's nothing to prevent anyone from faking ICMP6 echo packets from an 'internal' machine and sending them to a victim over the IPv4 encap, it might be prudent for everyone doing 6to4 to add an unreachable route to their 2002:XXXX:YYYY::/48 subnet, which seems to avoid the problem. -- dwmw2 From pekkas@netcore.fi Mon Sep 1 03:51:11 2003 Received: with ECARTIS (v1.0.0; list netdev); Mon, 01 Sep 2003 03:51:45 -0700 (PDT) Received: from netcore.fi (netcore.fi [193.94.160.1]) by oss.sgi.com (8.12.9/8.12.5) with SMTP id h81Ap9WZ031832 for ; Mon, 1 Sep 2003 03:51:10 -0700 Received: from localhost (pekkas@localhost) by netcore.fi (8.11.6/8.11.6) with ESMTP id h81Amjl19249; Mon, 1 Sep 2003 13:48:45 +0300 Date: Mon, 1 Sep 2003 13:48:44 +0300 (EEST) From: Pekka Savola To: "David S. Miller" cc: Ville Nuorvala , , , Subject: Re: [PATCH] IPv6: (5/5) Allow IPv6 tunnels without own IPv6 address In-Reply-To: <20030901020340.5a128836.davem@redhat.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 5465 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: pekkas@netcore.fi Precedence: bulk X-list: netdev On Mon, 1 Sep 2003, David S. Miller wrote: > On Mon, 1 Sep 2003 11:18:30 +0300 (EEST) > Ville Nuorvala wrote: > > > Unfortunately the IPv6 tunneling spec (RFC2473) is broken on this point :( > > I should probably raise this issue on the IETF ipv6 WG mailing list. > ... > > The first problem is, that the way to generate the interface-identifier > > isn't currently specified in the tunnel spec. > ... > > The second problem is, that this method alone doesn't yet guarantee > > unique identifiers to the two tunnel endpoints. > > This is exactly what I was thinking. I really don't think link- > local addresses make any sense on a software device such as the > ipip6 tunnels. Well, link-local addresses are used e.g. by routing protocols and such, so having one is probably rather important.. FWIW, on FreeBSD platform they take the link-local address of the first physical interface, and give the exact same link-local address on all of the tunnels, disambiuating them with the scope identifier. Seems like an OK appaorach too, and guarantees (to the degree of unique MAC addresses) that the addresses of the endpoints do not clash. -- Pekka Savola "You each name yourselves king, yet the Netcore Oy kingdom bleeds." Systems. Networks. Security. -- George R.R. Martin: A Clash of Kings From davem@pizda.ninka.net Mon Sep 1 04:00:44 2003 Received: with ECARTIS (v1.0.0; list netdev); Mon, 01 Sep 2003 04:01:17 -0700 (PDT) Received: from pizda.ninka.net (IDENT:root@pizda.ninka.net [216.101.162.242]) by oss.sgi.com (8.12.9/8.12.5) with SMTP id h81B0hWZ004428 for ; Mon, 1 Sep 2003 04:00:44 -0700 Received: (from davem@localhost) by pizda.ninka.net (8.9.3/8.9.3) id DAA08489; Mon, 1 Sep 2003 03:51:34 -0700 Date: Mon, 1 Sep 2003 03:51:34 -0700 From: "David S. Miller" To: Pekka Savola Cc: vnuorval@tcs.hut.fi, yoshfuji@linux-ipv6.org, usagi-core@linux-ipv6.org, netdev@oss.sgi.com Subject: Re: [PATCH] IPv6: (5/5) Allow IPv6 tunnels without own IPv6 address Message-Id: <20030901035134.2585aa79.davem@redhat.com> In-Reply-To: References: <20030901020340.5a128836.davem@redhat.com> X-Mailer: Sylpheed version 0.9.2 (GTK+ 1.2.6; sparc-unknown-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 5466 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@redhat.com Precedence: bulk X-list: netdev On Mon, 1 Sep 2003 13:48:44 +0300 (EEST) Pekka Savola wrote: > Well, link-local addresses are used e.g. by routing protocols and such, so > having one is probably rather important.. Ok. > FWIW, on FreeBSD platform they take the link-local address of the first > physical interface, and give the exact same link-local address on all of > the tunnels, disambiuating them with the scope identifier. Seems like an > OK appaorach too, and guarantees (to the degree of unique MAC addresses) > that the addresses of the endpoints do not clash. Interesting approach... I'm not particularly picky about how this uniqueness issue is solved. From jgarzik@pobox.com Mon Sep 1 06:10:10 2003 Received: with ECARTIS (v1.0.0; list netdev); Mon, 01 Sep 2003 06:10:44 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.12.9/8.12.5) with SMTP id h81DA6WZ009171 for ; Mon, 1 Sep 2003 06:10:09 -0700 Received: from rdu74-153-143.nc.rr.com ([24.74.153.143]:33493 helo=pobox.com) by www.linux.org.uk with esmtp (Exim 4.22) id 19tSCn-0000Gm-Cl; Sun, 31 Aug 2003 14:25:21 +0100 Message-ID: <3F51F738.5040607@pobox.com> Date: Sun, 31 Aug 2003 09:25:12 -0400 From: Jeff Garzik Organization: none User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021213 Debian/1.2.1-2.bunk X-Accept-Language: en MIME-Version: 1.0 To: Yusuf Wilajati Purna CC: netdev@oss.sgi.com Subject: Re: [PATCH] fix skb binding time in some network drivers due to skb_padto conversion References: <3F515DD0.9000409@jcom.home.ne.jp> In-Reply-To: <3F515DD0.9000409@jcom.home.ne.jp> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 5467 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: jgarzik@pobox.com Precedence: bulk X-list: netdev Yusuf Wilajati Purna wrote: > Hi Jeff, > > It seems that skb_padto security fixes in 2.4 and 2.5 trying > to fix "CAN-2003-0001:Multiple ethernet NID device drivers > do not pad frames with null bytes", do not put the skb_padto > blocks in proper places in the 3c527, eth16i, fmv18x, seeq8005, > yellowfin device drivers. > > In case a driver calls skb_padto(), it is possible > that the space available in the original skb buffer tailroom is less > than the space to pad. In this case, in short, the skb_padto() > will create a new skb buffer, copy data from the original > skb buffer to a new skb buffer, free the original buffer, > and finally return the new buffer. > > If this happens to the aforementioned device drivers, they come to > point to wrong data. And, for 3c527 and yellowfin, the drivers can > unexpectedly double free the original skb buffers since they still > point to the original skb buffers. The attached patch against > 2.4.23pre1 fixes these issues. > > If the patch looks okay, please consider including it in > 2.4 and 2.5/6. Yes, this looks needed. Thanks! Jeff From vinay-rc@naturesoft.net Mon Sep 1 06:59:48 2003 Received: with ECARTIS (v1.0.0; list netdev); Mon, 01 Sep 2003 07:00:22 -0700 (PDT) Received: from naturesoft.net ([203.145.184.221]) by oss.sgi.com (8.12.9/8.12.5) with SMTP id h81DxkWZ021399 for ; Mon, 1 Sep 2003 06:59:47 -0700 Received: from trial.naturesoft.com ([192.168.0.15] helo=lima.royalchallenge.com) by naturesoft.net with esmtp (Exim 3.35 #1) id 19tp6i-00031b-00; Mon, 01 Sep 2003 19:22:36 +0530 Subject: Re: [PATCH 2.4.22-pre1][NET] timer cleanups From: Vinay K Nallamothu To: "David S. Miller" Cc: netdev@oss.sgi.com, LKML In-Reply-To: <20030830203311.0b8c0807.davem@redhat.com> References: <1062258097.8532.26.camel@lima.royalchallenge.com> <20030830203311.0b8c0807.davem@redhat.com> Content-Type: text/plain Organization: NatureSoft Private Limited Message-Id: <1062424850.4414.40.camel@lima.royalchallenge.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.4 Date: Mon, 01 Sep 2003 19:30:51 +0530 Content-Transfer-Encoding: 7bit X-archive-position: 5469 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: vinay-rc@naturesoft.net Precedence: bulk X-list: netdev Content-Length: 4015 Lines: 135 Hi Dave, On Sun, 2003-08-31 at 09:03, David S. Miller wrote: > On Sat, 30 Aug 2003 21:11:37 +0530 > Vinay K Nallamothu wrote: > > > This patch does the following timer code cleanup: > > > > 1. Change del_timer/add_timer to mod_timer > > 2. Use static timer initialisation wherever applicable > > I'm not accepting this. In particular, the ip6_flowlabel.c > change is a bad idea because the code remains racey. > Someone > submitted a similar move to mod_timer() for ip6_flowlabel That too was submitted by me. Unfortunately I never got to see your mail. No excuses though. > > Just blindly doing these kinds of conversions to mod_timer() > is foolhardy. You need to apply some brains to it to make > sure you really are getting rid of whatever potential races > exist in the code. You are correct. While I tried to make sure that new bugs are not introduced, I haven't paid attention to the existing ones. > And in the ip6_flowlabel.c case things are > as buggy as they were before. Please find the updated patch below and let me know if it's ok. Thanks Vinay ip6_flowlabel.c: 1. Use static timer initializer 2. Use timer macros to handle jiffie wrap in comparisions 3. Convert del_timer/add_timer to mod_timer ip6_flowlabel.c | 30 ++++++++++++++++-------------- 1 files changed, 16 insertions(+), 14 deletions(-) diff -urN linux-2.4.22/net/ipv6/ip6_flowlabel.c linux-2.4.22-nvk/net/ipv6/ip6_flowlabel.c --- linux-2.4.22/net/ipv6/ip6_flowlabel.c 2003-06-14 10:03:12.000000000 +0530 +++ linux-2.4.22-nvk/net/ipv6/ip6_flowlabel.c 2003-09-01 16:47:03.000000000 +0530 @@ -48,7 +48,8 @@ static atomic_t fl_size = ATOMIC_INIT(0); static struct ip6_flowlabel *fl_ht[FL_HASH_MASK+1]; -static struct timer_list ip6_fl_gc_timer; +static void ip6_fl_gc(unsigned long dummy); +static struct timer_list ip6_fl_gc_timer = TIMER_INITIALIZER(ip6_fl_gc, 0, 0); /* FL hash table lock: it protects only of GC */ @@ -92,10 +93,12 @@ static void fl_release(struct ip6_flowlabel *fl) { + write_lock_bh(&ip6_fl_lock); + fl->lastuse = jiffies; if (atomic_dec_and_test(&fl->users)) { unsigned long ttd = fl->lastuse + fl->linger; - if ((long)(ttd - fl->expires) > 0) + if (time_after(ttd, fl->expires)) fl->expires = ttd; ttd = fl->expires; if (fl->opt && fl->share == IPV6_FL_S_EXCL) { @@ -103,11 +106,12 @@ fl->opt = NULL; kfree(opt); } - if (!del_timer(&ip6_fl_gc_timer) || - (long)(ip6_fl_gc_timer.expires - ttd) > 0) - ip6_fl_gc_timer.expires = ttd; - add_timer(&ip6_fl_gc_timer); + if (!timer_pending(&ip6_fl_gc_timer) || + time_after(ip6_fl_gc_timer.expires, ttd)) + mod_timer(&ip6_fl_gc_timer, ttd); } + + write_unlock_bh(&ip6_fl_lock); } static void ip6_fl_gc(unsigned long dummy) @@ -124,16 +128,16 @@ while ((fl=*flp) != NULL) { if (atomic_read(&fl->users) == 0) { unsigned long ttd = fl->lastuse + fl->linger; - if ((long)(ttd - fl->expires) > 0) + if (time_after(ttd, fl->expires)) fl->expires = ttd; ttd = fl->expires; - if ((long)(now - ttd) >= 0) { + if (time_after_eq(now, ttd)) { *flp = fl->next; fl_free(fl); atomic_dec(&fl_size); continue; } - if (!sched || (long)(ttd - sched) < 0) + if (!sched || time_before(ttd, sched)) sched = ttd; } flp = &fl->next; @@ -262,11 +266,11 @@ if (!expires) return -EPERM; fl->lastuse = jiffies; - if (fl->linger < linger) + if (time_before(fl->linger, linger)) fl->linger = linger; - if (expires < fl->linger) + if (time_before(expires, fl->linger)) expires = fl->linger; - if ((long)(fl->expires - (fl->lastuse+expires)) < 0) + if (time_before(fl->expires, fl->lastuse + expires)) fl->expires = fl->lastuse + expires; return 0; } @@ -609,8 +613,6 @@ void ip6_flowlabel_init() { - init_timer(&ip6_fl_gc_timer); - ip6_fl_gc_timer.function = ip6_fl_gc; #ifdef CONFIG_PROC_FS create_proc_read_entry("net/ip6_flowlabel", 0, 0, ip6_fl_read_proc, NULL); #endif From davem@pizda.ninka.net Mon Sep 1 07:20:39 2003 Received: with ECARTIS (v1.0.0; list netdev); Mon, 01 Sep 2003 07:21:13 -0700 (PDT) Received: from pizda.ninka.net (IDENT:root@pizda.ninka.net [216.101.162.242]) by oss.sgi.com (8.12.9/8.12.5) with SMTP id h81EKdWZ027901 for ; Mon, 1 Sep 2003 07:20:39 -0700 Received: (from davem@localhost) by pizda.ninka.net (8.9.3/8.9.3) id HAA09130; Mon, 1 Sep 2003 07:11:26 -0700 Date: Mon, 1 Sep 2003 07:11:26 -0700 From: "David S. Miller" To: Vinay K Nallamothu Cc: netdev@oss.sgi.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2.4.22-pre1][NET] timer cleanups Message-Id: <20030901071126.60b0dc78.davem@redhat.com> In-Reply-To: <1062424850.4414.40.camel@lima.royalchallenge.com> References: <1062258097.8532.26.camel@lima.royalchallenge.com> <20030830203311.0b8c0807.davem@redhat.com> <1062424850.4414.40.camel@lima.royalchallenge.com> X-Mailer: Sylpheed version 0.9.2 (GTK+ 1.2.6; sparc-unknown-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 5470 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@redhat.com Precedence: bulk X-list: netdev Content-Length: 268 Lines: 9 On Mon, 01 Sep 2003 19:30:51 +0530 Vinay K Nallamothu wrote: > > And in the ip6_flowlabel.c case things are > > as buggy as they were before. > > Please find the updated patch below and let me know if it's ok. Looks great, patch applied. From vnuorval@tcs.hut.fi Mon Sep 1 07:24:54 2003 Received: with ECARTIS (v1.0.0; list netdev); Mon, 01 Sep 2003 07:25:26 -0700 (PDT) Received: from smtp-4.hut.fi (root@smtp-4.hut.fi [130.233.228.94]) by oss.sgi.com (8.12.9/8.12.5) with SMTP id h81EOqWZ028430 for ; Mon, 1 Sep 2003 07:24:53 -0700 Received: from neon.tcs.hut.fi (neon.tcs.hut.fi [130.233.215.20]) by smtp-4.hut.fi (8.12.9/8.12.9) with ESMTP id h81EOhgL031249; Mon, 1 Sep 2003 17:24:44 +0300 Received: from rhea.tcs.hut.fi (rhea.tcs.hut.fi [130.233.215.147]) by neon.tcs.hut.fi (Postfix) with ESMTP id C7B80800188; Mon, 1 Sep 2003 17:24:43 +0300 (EEST) Received: from rhea.tcs.hut.fi (localhost [127.0.0.1]) by rhea.tcs.hut.fi (8.12.3/8.12.3/Debian-6.4) with ESMTP id h81EOh9s029286; Mon, 1 Sep 2003 17:24:43 +0300 Received: from localhost (vnuorval@localhost) by rhea.tcs.hut.fi (8.12.3/8.12.3/Debian-6.4) with ESMTP id h81EOgSn029282; Mon, 1 Sep 2003 17:24:42 +0300 Date: Mon, 1 Sep 2003 17:24:42 +0300 (EEST) From: Ville Nuorvala To: "David S. Miller" Cc: Pekka Savola , , , Subject: [PATCH] IPv6: (5/5+1) Autoconfig link-local addr to IPv6 tunnels In-Reply-To: <20030901035134.2585aa79.davem@redhat.com> Message-ID: MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="-377318441-1773213307-1062426282=:29198" X-RAVMilter-Version: 8.4.3(snapshot 20030212) (smtp-4.hut.fi) X-DCC-HUTCC-Metrics: smtp-4.hut.fi 1165; Body=6 Fuz1=6 Fuz2=6 X-archive-position: 5471 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: vnuorval@tcs.hut.fi Precedence: bulk X-list: netdev Content-Length: 4825 Lines: 96 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. Send mail to mime@docserver.cac.washington.edu for more info. ---377318441-1773213307-1062426282=:29198 Content-Type: TEXT/PLAIN; charset=US-ASCII On Mon, 1 Sep 2003, David S. Miller wrote: > On Mon, 1 Sep 2003 13:48:44 +0300 (EEST) > Pekka Savola wrote: > > > Well, link-local addresses are used e.g. by routing protocols and such, so > > having one is probably rather important.. > > Ok. > > > FWIW, on FreeBSD platform they take the link-local address of the first > > physical interface, and give the exact same link-local address on all of > > the tunnels, disambiuating them with the scope identifier. Seems like an > > OK appaorach too, and guarantees (to the degree of unique MAC addresses) > > that the addresses of the endpoints do not clash. > > Interesting approach... I'm not particularly picky about how this > uniqueness issue is solved. Ok, this incremental patch to my previous addrconf.c patch generates a link-local address to the IPv6 tunnel device. It first tries to inherit the EUI64 identifier of some other device and if this fails, uses a random interface id. Ville -- Ville Nuorvala Research Assistant, Institute of Digital Communications, Helsinki University of Technology email: vnuorval@tcs.hut.fi, phone: +358 (0)9 451 5257 ---377318441-1773213307-1062426282=:29198 Content-Type: TEXT/PLAIN; charset=US-ASCII; name="ip6_tnl_autoconf.patch" Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: attachment; filename="ip6_tnl_autoconf.patch" IyBUaGlzIGlzIGEgQml0S2VlcGVyIGdlbmVyYXRlZCBwYXRjaCBmb3IgdGhl IGZvbGxvd2luZyBwcm9qZWN0Og0KIyBQcm9qZWN0IE5hbWU6IExpbnV4IGtl cm5lbCB0cmVlDQojIFRoaXMgcGF0Y2ggZm9ybWF0IGlzIGludGVuZGVkIGZv ciBHTlUgcGF0Y2ggY29tbWFuZCB2ZXJzaW9uIDIuNSBvciBoaWdoZXIuDQoj IFRoaXMgcGF0Y2ggaW5jbHVkZXMgdGhlIGZvbGxvd2luZyBkZWx0YXM6DQoj CSAgICAgICAgICAgQ2hhbmdlU2V0CTEuMTI5MSAgLT4gMS4xMjkyIA0KIwkg bmV0L2lwdjYvYWRkcmNvbmYuYwkxLjY0ICAgIC0+IDEuNjUgICANCiMNCiMg VGhlIGZvbGxvd2luZyBpcyB0aGUgQml0S2VlcGVyIENoYW5nZVNldCBMb2cN CiMgLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0NCiMgMDMvMDkvMDEJdm51b3J2YWxAYW1iZXIuaHV0Lm1lZGlhcG9saS5j b20JMS4xMjkyDQojIEF1dG9jb25maWd1cmUgYSBsaW5rLWxvY2FsIGFkZHJl c3MgdG8gYWxsIElQdjYgdHVubmVsIGRldmljZXMNCiMgLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0NCiMNCmRpZmYgLU5y dSBhL25ldC9pcHY2L2FkZHJjb25mLmMgYi9uZXQvaXB2Ni9hZGRyY29uZi5j DQotLS0gYS9uZXQvaXB2Ni9hZGRyY29uZi5jCU1vbiBTZXAgIDEgMTY6NTY6 MzkgMjAwMw0KKysrIGIvbmV0L2lwdjYvYWRkcmNvbmYuYwlNb24gU2VwICAx IDE2OjU2OjM5IDIwMDMNCkBAIC0xODIwLDYgKzE4MjAsMzkgQEANCiANCiAN CiAjaWYgZGVmaW5lZChDT05GSUdfSVBWNl9UVU5ORUwpIHx8IGRlZmluZWQo Q09ORklHX0lQVjZfVFVOTkVMX01PRFVMRSkNCisNCisvKiANCisgKiBBdXRv Y29uZmlndXJlIHR1bm5lbCB3aXRoIGEgbGluay1sb2NhbCBhZGRyZXNzIHNv IHJvdXRpbmcgcHJvdG9jb2xzLA0KKyAqIERIQ1B2NiwgTUxEIGV0Yy4gY2Fu IGJlIHJ1biBvdmVyIHRoZSB2aXJ0dWFsIGxpbmsgDQorICovDQorDQorc3Rh dGljIHZvaWQgaXA2X3RubF9hZGRfbGlua2xvY2FsKHN0cnVjdCBpbmV0Nl9k ZXYgKmlkZXYpDQorew0KKwlzdHJ1Y3QgaW42X2FkZHIgYWRkcjsNCisJc3Ry dWN0IG5ldF9kZXZpY2UgKmRldjsgDQorCUFTU0VSVF9SVE5MKCk7DQorDQor CW1lbXNldCgmYWRkciwgMCwgc2l6ZW9mKHN0cnVjdCBpbjZfYWRkcikpOw0K KwlhZGRyLnM2X2FkZHIzMlswXSA9IGh0b25sKDB4RkU4MDAwMDApOw0KKw0K KwkvKiB0cnkgdG8gaW5oZXJpdCBFVUk2NCBmcm9tIGFub3RoZXIgZGV2aWNl ICovDQorCWZvciAoZGV2ID0gZGV2X2Jhc2U7IGRldjsgZGV2ID0gZGV2LT5u ZXh0KSB7DQorCQlpZiAoIWlwdjZfZ2VuZXJhdGVfZXVpNjQoYWRkci5zNl9h ZGRyICsgOCwgZGV2KSkgew0KKwkJCWFkZHJjb25mX2FkZF9saW5rbG9jYWwo aWRldiwgJmFkZHIpOw0KKwkJCXJldHVybjsNCisJCX0NCisJfQ0KKyNpZmRl ZiBDT05GSUdfSVBWNl9QUklWQUNZDQorCS8qIGVsc2UgdHJ5IHRvIGdlbmVy YXRlIGEgcmFuZG9tIGlkZW50aWZpZXIgKi8NCisJaWYgKCFfX2lwdjZfcmVn ZW5fcm5kaWQoaWRldikpIHsNCisJCW1lbWNweShhZGRyLnM2X2FkZHIgKyA4 LCBpZGV2LT5ybmRpZCwgOCk7DQorCQlhZGRyY29uZl9hZGRfbGlua2xvY2Fs KGlkZXYsICZhZGRyKTsNCisJCXJldHVybjsNCisJfQ0KKyNlbmRpZg0KKwlw cmludGsoS0VSTl9ERUJVRyAiaW5pdCBpcDYtaXA2OiBhZGRfbGlua2xvY2Fs IGZhaWxlZFxuIik7DQorfQ0KKw0KIHN0YXRpYyB2b2lkIGFkZHJjb25mX2lw Nl90bmxfY29uZmlnKHN0cnVjdCBuZXRfZGV2aWNlICpkZXYpDQogew0KIAlz dHJ1Y3QgaW5ldDZfZGV2ICppZGV2Ow0KQEAgLTE4MzAsNiArMTg2Myw4IEBA DQogCQlwcmludGsoS0VSTl9ERUJVRyAiaW5pdCBpcDYtaXA2OiBmaW5kX2Rl diBmYWlsZWRcbiIpOw0KIAkJcmV0dXJuOw0KIAl9DQorCWlwNl90bmxfYWRk X2xpbmtsb2NhbChpZGV2KTsNCisJYWRkcmNvbmZfYWRkX21yb3V0ZShkZXYp Ow0KIH0NCiAjZW5kaWYNCiANCkBAIC0yMTM1LDYgKzIxNzAsNyBAQA0KIA0K IAlpZiAoaWZwLT5pZGV2LT5jbmYuZm9yd2FyZGluZyA9PSAwICYmDQogCSAg ICAoZGV2LT5mbGFncyZJRkZfTE9PUEJBQ0spID09IDAgJiYNCisJICAgIGRl di0+dHlwZSAhPSBBUlBIUkRfVFVOTkVMNiAmJg0KIAkgICAgKGlwdjZfYWRk cl90eXBlKCZpZnAtPmFkZHIpICYgSVBWNl9BRERSX0xJTktMT0NBTCkpIHsN CiAJCXN0cnVjdCBpbjZfYWRkciBhbGxfcm91dGVyczsNCiANCg== ---377318441-1773213307-1062426282=:29198-- From jgarzik@pobox.com Mon Sep 1 07:29:31 2003 Received: with ECARTIS (v1.0.0; list netdev); Mon, 01 Sep 2003 07:30:06 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.12.9/8.12.5) with SMTP id h81ETUWZ029013 for ; Mon, 1 Sep 2003 07:29:31 -0700 Received: from rdu74-153-143.nc.rr.com ([24.74.153.143]:34035 helo=pobox.com) by www.linux.org.uk with esmtp (Exim 4.22) id 19tpgO-00007b-Va; Mon, 01 Sep 2003 15:29:29 +0100 Message-ID: <3F5357BE.4060902@pobox.com> Date: Mon, 01 Sep 2003 10:29:18 -0400 From: Jeff Garzik Organization: none User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021213 Debian/1.2.1-2.bunk X-Accept-Language: en MIME-Version: 1.0 To: Francois Romieu CC: Maillist netdev Subject: Re: So you thought sis190 was evil... References: <3F529E71.20402@pobox.com> <20030901091321.A4000@electric-eye.fr.zoreil.com> In-Reply-To: <20030901091321.A4000@electric-eye.fr.zoreil.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 5472 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: jgarzik@pobox.com Precedence: bulk X-list: netdev Content-Length: 478 Lines: 22 Francois Romieu wrote: > Jeff Garzik : > >>It looks like the objectionable sis190 code was copied almost wholesale >>from r8169... virt_to_bus, static descriptors, lack of cpu_to_leXX, >>and all. > > > Are you asking for a copy from sis190 to r8169 ? hehe :) Actually, no. I have docs and test hardware for RTL-8169, and it's basically the same as RTL-8139C+ (8139cp). So, for r8169 I'm coming to copy over my RX and TX handling code. Jeff From jgarzik@pobox.com Mon Sep 1 07:59:22 2003 Received: with ECARTIS (v1.0.0; list netdev); Mon, 01 Sep 2003 07:59:55 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.12.9/8.12.5) with SMTP id h81ExLWZ008236 for ; Mon, 1 Sep 2003 07:59:22 -0700 Received: from rdu74-153-143.nc.rr.com ([24.74.153.143]:34044 helo=pobox.com) by www.linux.org.uk with esmtp (Exim 4.22) id 19tq9I-0000NL-JV for netdev@oss.sgi.com; Mon, 01 Sep 2003 15:59:20 +0100 Message-ID: <3F535EBD.6090401@pobox.com> Date: Mon, 01 Sep 2003 10:59:09 -0400 From: Jeff Garzik Organization: none User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021213 Debian/1.2.1-2.bunk X-Accept-Language: en MIME-Version: 1.0 To: Maillist netdev Subject: The recent free_netdev() conversion... Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 5473 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: jgarzik@pobox.com Precedence: bulk X-list: netdev Content-Length: 318 Lines: 27 Note that a lot of error paths were not caught. In the typical driver you have: ->probe() dev = alloc_etherdev() blah_probe() if blah_probe() fails goto err_out register_netdev() return 0; err_out: kfree(dev); ->remove() free_netdev(dev); The "kfree" needs to be a free_netdev() too. Jeff From davem@pizda.ninka.net Mon Sep 1 08:02:55 2003 Received: with ECARTIS (v1.0.0; list netdev); Mon, 01 Sep 2003 08:03:28 -0700 (PDT) Received: from pizda.ninka.net (IDENT:root@pizda.ninka.net [216.101.162.242]) by oss.sgi.com (8.12.9/8.12.5) with SMTP id h81F2sWZ009952 for ; Mon, 1 Sep 2003 08:02:55 -0700 Received: (from davem@localhost) by pizda.ninka.net (8.9.3/8.9.3) id HAA09231; Mon, 1 Sep 2003 07:53:45 -0700 Date: Mon, 1 Sep 2003 07:53:45 -0700 From: "David S. Miller" To: Jeff Garzik Cc: netdev@oss.sgi.com Subject: Re: The recent free_netdev() conversion... Message-Id: <20030901075345.4c35e3e6.davem@redhat.com> In-Reply-To: <3F535EBD.6090401@pobox.com> References: <3F535EBD.6090401@pobox.com> X-Mailer: Sylpheed version 0.9.2 (GTK+ 1.2.6; sparc-unknown-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 5474 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@redhat.com Precedence: bulk X-list: netdev Content-Length: 318 Lines: 11 On Mon, 01 Sep 2003 10:59:09 -0400 Jeff Garzik wrote: > err_out: > kfree(dev); ... > The "kfree" needs to be a free_netdev() too. If the 'dev' hasn't been given to register_netdev() it really doesn't need to be free_netdev(). It's just memory until it has been given to the device layer. From davem@pizda.ninka.net Mon Sep 1 09:07:24 2003 Received: with ECARTIS (v1.0.0; list netdev); Mon, 01 Sep 2003 09:07:58 -0700 (PDT) Received: from pizda.ninka.net (IDENT:root@pizda.ninka.net [216.101.162.242]) by oss.sgi.com (8.12.9/8.12.5) with SMTP id h81G7OWZ019911 for ; Mon, 1 Sep 2003 09:07:24 -0700 Received: (from davem@localhost) by pizda.ninka.net (8.9.3/8.9.3) id IAA09396; Mon, 1 Sep 2003 08:58:14 -0700 Date: Mon, 1 Sep 2003 08:58:14 -0700 From: "David S. Miller" To: Jeff Garzik Cc: netdev@oss.sgi.com Subject: Re: The recent free_netdev() conversion... Message-Id: <20030901085814.5a333518.davem@redhat.com> In-Reply-To: <3F536CB7.6060404@pobox.com> References: <3F535EBD.6090401@pobox.com> <20030901075345.4c35e3e6.davem@redhat.com> <3F536CB7.6060404@pobox.com> X-Mailer: Sylpheed version 0.9.2 (GTK+ 1.2.6; sparc-unknown-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 5475 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@redhat.com Precedence: bulk X-list: netdev Content-Length: 404 Lines: 10 On Mon, 01 Sep 2003 11:58:47 -0400 Jeff Garzik wrote: > True, but for long term, it's best to use free_netdev(). Besides > naturally pairing with alloc_foodev(), if we ever decide to have > alloc_netdev() perform more than one allocation, free_netdev() will > already be in place to handle the multiple de-allocations. Okie dokie, I'll take patches that fix any of these cases. From garzik@gtf.org Mon Sep 1 09:22:52 2003 Received: with ECARTIS (v1.0.0; list netdev); Mon, 01 Sep 2003 09:23:26 -0700 (PDT) Received: from havoc.gtf.org (havoc.gtf.org [63.247.75.124]) by oss.sgi.com (8.12.9/8.12.5) with SMTP id h81GMfWZ021043 for ; Mon, 1 Sep 2003 09:22:42 -0700 Received: by havoc.gtf.org (Postfix, from userid 500) id 588986659; Mon, 1 Sep 2003 11:49:45 -0400 (EDT) Date: Mon, 1 Sep 2003 11:49:45 -0400 From: Jeff Garzik To: marcelo@parcelfarce.linux.theplanet.co.uk Cc: marcelo@conectiva.com.br, linux-kernel@vger.kernel.org, netdev@oss.sgi.com Subject: [bk patches] 2.4.x net driver updates Message-ID: <20030901154945.GA22275@gtf.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.28i X-archive-position: 5476 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: jgarzik@pobox.com Precedence: bulk X-list: netdev Content-Length: 1348 Lines: 41 Marcelo, please do a bk pull bk://kernel.bkbits.net/jgarzik/net-drivers-2.4 This will update the following files: drivers/net/8139cp.c | 35 ++++++++----------------- drivers/net/8139too.c | 68 ++++++++++++++++++++++++-------------------------- 2 files changed, 44 insertions(+), 59 deletions(-) through these ChangeSets: (03/08/31 1.1119) [netdrvr 8139cp] PCI MWI cleanup; remove unneeded workaround * The PCI layer now handles incorrect cacheline size settings, as it should. Remove our own workarounds. * Move pci_set_mwi up much earlier in the probe process, and check its return value. * Call pci_clear_mwi() in ->probe error handling * Call pci_clear_mwi() in ->remove (03/08/31 1.1117) [netdrvr 8139too] don't start thread when it's not needed The thread for was unneeded on chips other than CH_8139_K/8129. So, this patch doesn't create the thread on chips other than CH_8139_K/8129. (03/08/31 1.1116) [netdrvr 8139too] remove driver-based poisoning of net_device Harmless in 2.4, but causes oopses on rmmod in 2.6. slab poisoning can take care of this for us, anyway. (03/08/31 1.1115) [netdrvr 8139cp] must call NAPI-specific vlan hook From da-x@gmx.net Mon Sep 1 09:46:37 2003 Received: with ECARTIS (v1.0.0; list netdev); Mon, 01 Sep 2003 09:47:10 -0700 (PDT) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by oss.sgi.com (8.12.9/8.12.5) with SMTP id h81GkaWZ024256 for ; Mon, 1 Sep 2003 09:46:37 -0700 Received: (qmail 10929 invoked by uid 65534); 1 Sep 2003 16:46:28 -0000 Received: from bzq-234-149.red.bezeqint.net (HELO callisto.yi.org) (212.179.234.149) by mail.gmx.net (mp025) with SMTP; 01 Sep 2003 18:46:28 +0200 Date: Mon, 1 Sep 2003 19:46:24 +0300 From: Dan Aloni To: netdev@oss.sgi.com Cc: "David S. Miller" Subject: [BK PATCH 2.6] repost, fix sysctl breakage during network device renaming, for ipv4 Message-ID: <20030901164624.GA26886@callisto.yi.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.4i X-archive-position: 5477 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: da-x@gmx.net Precedence: bulk X-list: netdev Content-Length: 5419 Lines: 171 Can you please take a look and comment? You can import this changeset into BK by piping this whole message to: '| bk receive [path to repository]' or apply the patch as usual. =================================================================== ChangeSet@1.1292, 2003-08-26 18:30:17+03:00, da-x@gmx.net Sysctl assumes its ctl_table.procname field is const, but the networking points ctl_table.procname to dev->name. When renaming a network device using SIOCSIFNAME, dev->name is modified and sysctl's assumption breaks, causing this behaviour, at least: 1. sysctl wouldn't be able to remove the proc entry when the device requests to be unregistered, because it would be using the new name instead of the old one. 2. proc entries for devices remain with the old name after rename. This change includes allocating the current device name to a new copy upon registering with sysctl, plus re-registering with sysctl when the device is renamed. This only fixes IPv4. Fixes for ax25, core/neighbour.c, decnet, and ipv6 are also planned. devinet.c | 45 ++++++++++++++++++++++++++++++++++++++++----- 1 files changed, 40 insertions(+), 5 deletions(-) diff -Nru a/net/ipv4/devinet.c b/net/ipv4/devinet.c --- a/net/ipv4/devinet.c Tue Aug 26 18:31:08 2003 +++ b/net/ipv4/devinet.c Tue Aug 26 18:31:08 2003 @@ -904,6 +904,11 @@ * not interesting to applications using netlink. */ inetdev_changename(dev, in_dev); + +#ifdef CONFIG_SYSCTL + devinet_sysctl_unregister(&in_dev->cnf); + devinet_sysctl_register(in_dev, &in_dev->cnf); +#endif break; } out: @@ -1295,12 +1300,21 @@ }, }; +static char *strdup(char *s) +{ + char *rv = kmalloc(strlen(s)+1, GFP_KERNEL); + if (rv) + strcpy(rv, s); + return rv; +} + static void devinet_sysctl_register(struct in_device *in_dev, struct ipv4_devconf *p) { int i; struct net_device *dev = in_dev ? in_dev->dev : NULL; struct devinet_sysctl_table *t = kmalloc(sizeof(*t), GFP_KERNEL); + char *dev_name = NULL; if (!t) return; @@ -1309,13 +1323,25 @@ t->devinet_vars[i].data += (char *)p - (char *)&ipv4_devconf; t->devinet_vars[i].de = NULL; } + if (dev) { - t->devinet_dev[0].procname = dev->name; + dev_name = dev->name; t->devinet_dev[0].ctl_name = dev->ifindex; } else { - t->devinet_dev[0].procname = "default"; + dev_name = "default"; t->devinet_dev[0].ctl_name = NET_PROTO_CONF_DEFAULT; } + + /* + * Make a copy of dev_name, because '.procname' is regarded as const + * by sysctl and we wouldn't want anyone to change it under our feet + * (see SIOCSIFNAME). + */ + dev_name = strdup(dev_name); + if (!dev_name) + goto free; + + t->devinet_dev[0].procname = dev_name; t->devinet_dev[0].child = t->devinet_vars; t->devinet_dev[0].de = NULL; t->devinet_conf_dir[0].child = t->devinet_dev; @@ -1327,9 +1353,17 @@ t->sysctl_header = register_sysctl_table(t->devinet_root_dir, 0); if (!t->sysctl_header) - kfree(t); - else - p->sysctl = t; + goto free_procname; + + p->sysctl = t; + return; + + /* error path */ + free_procname: + kfree(dev_name); + free: + kfree(t); + return; } static void devinet_sysctl_unregister(struct ipv4_devconf *p) @@ -1338,6 +1372,7 @@ struct devinet_sysctl_table *t = p->sysctl; p->sysctl = NULL; unregister_sysctl_table(t->sysctl_header); + kfree(t->devinet_dev[0].procname); kfree(t); } } =================================================================== This BitKeeper patch contains the following changesets: + ## Wrapped with gzip_uu ## M'XL( #Q]2S\ [56^V_;-A#^V?PK;@VP/&K+>EB*;,-!NC3IC*9)D+08AK8P M:(FV5ECQ8I--FR1O#M^W]WIHP[@G6*RUXAIZY$N;;OX\9U3S_:#K1/8G=-MY,2.0SL.BVVW$P8=LDHXW;1D M=,ZISB138J(-C_?5+A^?1O3LT/4S;3!I.B_3 \\=:-GD%_AO25R0"!XV*M(I4*6R!5.0: 4X'FDZ M3IFUE"+B=,%@DK TA@37!%>Z">-,@YXQP (SU0FX5-8BH1_W5\+B-FJ=68& M%OPV8QPDPX'QPABTBF*LDHA!ILS*P_#VXF%X=?/BS65SYV]@+$2<(*88*(]- M )6S.%0%CZ5.!(>Q9'2NFA#1(IJ>H>.8S>@J$9EL M60,HI-B/[X!2Q(&0?6 M(DMC?JC1' P1@U^RA5BQG+6A!8QKN8&UH5)F(K]* I+]D3&%R4!/#))QR::) MTDRR&+/'#"8DHHN=C$7E7V%EF)(U%'PQY8S&(";YO$ 'P9F5>[C6#DV"]9L( M64)0!C%-.*P3/:L=\X!T@D#J'?-"E.'PYZU)4Y1W$NXLC6..HTAP$Y9I9@"VOC"HB[E+;;E+HDJH ML554+$+K!]GQ$D,.[5<4CDPGZZ/K8 $*R-F?)=#;&PEN1Z:4(&ZZ9 M=T^R7 5 )68E50)Q4<[+'5Z#[W>['7*W$Q+2^I<7(3:UR=EW'EP$TT8.'5.G,PG=;CQ^(A+?B&*D)W!\S[:[6S?PPDXN MC5_:?E\C?Q0E^42Y)21=L>@\P$"6FG\;JX._G< _W7;PQL]ETG4^%TF[^U61 M[-C0\O\7E;S?=>I^'_]3CYH.O4,Y0G'+GX?RZ#B]N9J^&KT\/O#Q=MKTFB4L4<%I]%. MJXY^3O@HU]V(3X[[7YK6AH5=$SYS.& <=9H,\: [A9 HC1(2&7&1<**TC+/E M43DX)G^21G$O5S" ^2*7G".T2AD_4L?/G2:\NKH;O;Z\O[F\-F"2"1S)U3&B M0J-HN<%!$Y19D0S/9$SPJD_^0MI#Q[,]<*KXB&^45V$ -^^NK_MFW7%P_0-Y MB7?&>&SS#)-$OULR)T"(Z)W6B? &G ";RA<[;7 M%)7C[E@XK,_-PZ*AIE3&YJPKC]\BS'A3-:%1L37;'5IKBM),^08/":/*E99K M/(5B[%_40)@PU#(3Y4@QMG_.'EMFNMT@^X3*4E4S5?)_JB?0!Z^IP-TFDK&^ MH:M;9U6WX/][^^/N;0"O0"99'FN2=;3:*/*+P^[;)V5M >@ZUKW MRP0S*5'VE_C<(PGRU+U'&G,SL<\CMZ@7]/%>0$2#>F)*6RY^DP]ZU2^AT8Q% 5; Mon, 1 Sep 2003 09:50:38 -0700 Received: (from davem@localhost) by pizda.ninka.net (8.9.3/8.9.3) id JAA09505; Mon, 1 Sep 2003 09:41:27 -0700 Date: Mon, 1 Sep 2003 09:41:27 -0700 From: "David S. Miller" To: Dan Aloni Cc: netdev@oss.sgi.com Subject: Re: [BK PATCH 2.6] repost, fix sysctl breakage during network device renaming, for ipv4 Message-Id: <20030901094127.6a0f6878.davem@redhat.com> In-Reply-To: <20030901164624.GA26886@callisto.yi.org> References: <20030901164624.GA26886@callisto.yi.org> X-Mailer: Sylpheed version 0.9.2 (GTK+ 1.2.6; sparc-unknown-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 5478 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@redhat.com Precedence: bulk X-list: netdev Content-Length: 257 Lines: 8 On Mon, 1 Sep 2003 19:46:24 +0300 Dan Aloni wrote: > Can you please take a look and comment? I commented already and I said "putting a private copy of a generic function like strdup() in the middle of the networking code is inappropriate." From da-x@gmx.net Mon Sep 1 09:56:13 2003 Received: with ECARTIS (v1.0.0; list netdev); Mon, 01 Sep 2003 09:56:46 -0700 (PDT) Received: from mail.gmx.net (mail.gmx.de [213.165.64.20]) by oss.sgi.com (8.12.9/8.12.5) with SMTP id h81GuCWZ028189 for ; Mon, 1 Sep 2003 09:56:13 -0700 Received: (qmail 12374 invoked by uid 65534); 1 Sep 2003 16:56:04 -0000 Received: from bzq-234-149.red.bezeqint.net (HELO callisto.yi.org) (212.179.234.149) by mail.gmx.net (mp016) with SMTP; 01 Sep 2003 18:56:04 +0200 Date: Mon, 1 Sep 2003 19:55:59 +0300 From: Dan Aloni To: "David S. Miller" Cc: netdev@oss.sgi.com Subject: Re: [BK PATCH 2.6] repost, fix sysctl breakage during network device renaming, for ipv4 Message-ID: <20030901165559.GA27099@callisto.yi.org> References: <20030901164624.GA26886@callisto.yi.org> <20030901094127.6a0f6878.davem@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030901094127.6a0f6878.davem@redhat.com> User-Agent: Mutt/1.5.4i X-archive-position: 5479 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: da-x@gmx.net Precedence: bulk X-list: netdev Content-Length: 592 Lines: 19 On Mon, Sep 01, 2003 at 09:41:27AM -0700, David S. Miller wrote: > On Mon, 1 Sep 2003 19:46:24 +0300 > Dan Aloni wrote: > > > Can you please take a look and comment? > > I commented already and I said "putting a private copy > of a generic function like strdup() in the middle of > the networking code is inappropriate." For some unknown reason I didn't get that response. The private copy of strdup() is something that I'd also wouldn't want, but I don't have much choice. Please read a recent thread in lkml regarding strdup() consolidation. -- Dan Aloni da-x@gmx.net From garzik@gtf.org Mon Sep 1 10:57:03 2003 Received: with ECARTIS (v1.0.0; list netdev); Mon, 01 Sep 2003 10:57:38 -0700 (PDT) Received: from havoc.gtf.org (havoc.gtf.org [63.247.75.124]) by oss.sgi.com (8.12.9/8.12.5) with SMTP id h81Hv2WZ031657 for ; Mon, 1 Sep 2003 10:57:03 -0700 Received: by havoc.gtf.org (Postfix, from userid 500) id 8B8E9665E; Mon, 1 Sep 2003 13:56:57 -0400 (EDT) Date: Mon, 1 Sep 2003 13:56:57 -0400 From: Jeff Garzik To: netdev@oss.sgi.com, linux-net@vger.kernel.org Subject: [patch 2/2][fyi] alloc_ei_netdev() example: ne2k-pci Message-ID: <20030901175657.GA31874@gtf.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.28i X-archive-position: 5481 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: jgarzik@pobox.com Precedence: bulk X-list: netdev Content-Length: 2091 Lines: 72 # This is a BitKeeper generated patch for the following project: # Project Name: Linux kernel tree # This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas: # ChangeSet 1.1120 -> 1.1121 # drivers/net/ne2k-pci.c 1.9 -> 1.10 # # The following is the BitKeeper ChangeSet Log # -------------------------------------------- # 03/09/01 jgarzik@redhat.com 1.1121 # [netdrvr ne2k-pci] allocate netdev+8390 struct using new alloc_ei_netdev() # # Also, call pci_disable_device() in PCI ->remove handler, # to match pci_enable_device() in PCI ->probe handler. # -------------------------------------------- # diff -Nru a/drivers/net/ne2k-pci.c b/drivers/net/ne2k-pci.c --- a/drivers/net/ne2k-pci.c Mon Sep 1 13:48:30 2003 +++ b/drivers/net/ne2k-pci.c Mon Sep 1 13:48:30 2003 @@ -259,7 +259,8 @@ } } - dev = alloc_etherdev(0); + /* Allocate net_device, dev->priv; fill in 8390 specific dev fields. */ + dev = alloc_ei_netdev(); if (!dev) { printk (KERN_ERR PFX "cannot allocate ethernet device\n"); goto err_out_free_res; @@ -330,13 +331,6 @@ dev->base_addr = ioaddr; pci_set_drvdata(pdev, dev); - /* Allocate dev->priv and fill in 8390 specific dev fields. */ - if (ethdev_init(dev)) { - printk (KERN_ERR "ne2kpci(%s): unable to get memory for dev->priv.\n", - pdev->slot_name); - goto err_out_free_netdev; - } - ei_status.name = pci_clone_list[chip_idx].name; ei_status.tx_start_page = start_page; ei_status.stop_page = stop_page; @@ -365,7 +359,7 @@ i = register_netdev(dev); if (i) - goto err_out_free_8390; + goto err_out_free_netdev; printk("%s: %s found at %#lx, IRQ %d, ", dev->name, pci_clone_list[chip_idx].name, ioaddr, dev->irq); @@ -376,8 +370,6 @@ return 0; -err_out_free_8390: - kfree(dev->priv); err_out_free_netdev: kfree (dev); err_out_free_res: @@ -634,7 +626,7 @@ unregister_netdev(dev); release_region(dev->base_addr, NE_IO_EXTENT); - kfree(dev->priv); + pci_disable_device(pdev); kfree(dev); pci_set_drvdata(pdev, NULL); } From garzik@gtf.org Mon Sep 1 10:56:27 2003 Received: with ECARTIS (v1.0.0; list netdev); Mon, 01 Sep 2003 10:57:02 -0700 (PDT) Received: from havoc.gtf.org (havoc.gtf.org [63.247.75.124]) by oss.sgi.com (8.12.9/8.12.5) with SMTP id h81HuQWZ031592 for ; Mon, 1 Sep 2003 10:56:27 -0700 Received: by havoc.gtf.org (Postfix, from userid 500) id 21E8B665E; Mon, 1 Sep 2003 13:56:21 -0400 (EDT) Date: Mon, 1 Sep 2003 13:56:21 -0400 From: Jeff Garzik To: netdev@oss.sgi.com, linux-net@vger.kernel.org Subject: [patch 1/2][fyi] alloc_ei_netdev() function for 8390 devices Message-ID: <20030901175621.GA31452@gtf.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.28i X-archive-position: 5480 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: jgarzik@pobox.com Precedence: bulk X-list: netdev Content-Length: 3381 Lines: 131 I've just checked this into my 2.4 and 2.5 net-driver queues. Most 8390-based (ne2000) drivers use a helper lib, drivers/net/8390.c. This lib has been taking care of the chore of allocating and managing dev->priv, which is a common struct ei_device shared across all 8390 drivers. For such drivers, I've created alloc_ei_netdev(), which is intended to replace dev = alloc_etherdev(...); if (!dev) ... ... if (ethdev_init(dev)) /* 8390-specific */ ... ... with dev = alloc_ei_netdev(); if (!dev) ... ... The patch below is the API change I checked in. The patch that follows in the next email is an example conversion -- drivers/net/ne2k-pci.c. Jeff # This is a BitKeeper generated patch for the following project: # Project Name: Linux kernel tree # This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas: # ChangeSet 1.1119 -> 1.1120 # drivers/net/8390.c 1.8 -> 1.9 # drivers/net/8390.h 1.6 -> 1.7 # # The following is the BitKeeper ChangeSet Log # -------------------------------------------- # 03/09/01 jgarzik@redhat.com 1.1120 # [netdrvr 8390] new function alloc_ei_netdev() # # (preferred over alloc_etherdev + 8390-specific ethdev_init) # -------------------------------------------- # diff -Nru a/drivers/net/8390.c b/drivers/net/8390.c --- a/drivers/net/8390.c Mon Sep 1 13:48:26 2003 +++ b/drivers/net/8390.c Mon Sep 1 13:48:26 2003 @@ -1000,6 +1000,11 @@ spin_unlock_irqrestore(&ei_local->page_lock, flags); } +static inline void ei_device_init(struct ei_device *ei_local) +{ + spin_lock_init(&ei_local->page_lock); +} + /** * ethdev_init - init rest of 8390 device struct * @dev: network device structure to init @@ -1015,14 +1020,11 @@ if (dev->priv == NULL) { - struct ei_device *ei_local; - dev->priv = kmalloc(sizeof(struct ei_device), GFP_KERNEL); if (dev->priv == NULL) return -ENOMEM; memset(dev->priv, 0, sizeof(struct ei_device)); - ei_local = (struct ei_device *)dev->priv; - spin_lock_init(&ei_local->page_lock); + ei_device_init(dev->priv); } dev->hard_start_xmit = &ei_start_xmit; @@ -1033,6 +1035,29 @@ return 0; } + +/* wrapper to make alloc_netdev happy; probably should just cast... */ +static void __ethdev_init(struct net_device *dev) +{ + ethdev_init(dev); +} + +/** + * alloc_ei_netdev - alloc_etherdev counterpart for 8390 + * + * Allocate 8390-specific net_device. + */ +struct net_device *alloc_ei_netdev(void) +{ + struct net_device *dev; + + dev = alloc_netdev(sizeof(struct ei_device), "eth%d", __ethdev_init); + if (dev) + ei_device_init(dev->priv); + + return dev; +} + @@ -1136,6 +1161,7 @@ EXPORT_SYMBOL(ei_tx_timeout); EXPORT_SYMBOL(ethdev_init); EXPORT_SYMBOL(NS8390_init); +EXPORT_SYMBOL(alloc_ei_netdev); #if defined(MODULE) diff -Nru a/drivers/net/8390.h b/drivers/net/8390.h --- a/drivers/net/8390.h Mon Sep 1 13:48:26 2003 +++ b/drivers/net/8390.h Mon Sep 1 13:48:26 2003 @@ -50,6 +50,7 @@ extern int ei_open(struct net_device *dev); extern int ei_close(struct net_device *dev); extern void ei_interrupt(int irq, void *dev_id, struct pt_regs *regs); +extern struct net_device *alloc_ei_netdev(void); /* Most of these entries should be in 'struct net_device' (or most of the things in there should be here!) */ From jgarzik@pobox.com Mon Sep 1 11:27:35 2003 Received: with ECARTIS (v1.0.0; list netdev); Mon, 01 Sep 2003 11:28:09 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.12.9/8.12.5) with SMTP id h81IRYWZ002005 for ; Mon, 1 Sep 2003 11:27:35 -0700 Received: from rdu74-153-143.nc.rr.com ([24.74.153.143]:34058 helo=pobox.com) by www.linux.org.uk with esmtp (Exim 4.22) id 19tr50-0000s0-CA; Mon, 01 Sep 2003 16:58:58 +0100 Message-ID: <3F536CB7.6060404@pobox.com> Date: Mon, 01 Sep 2003 11:58:47 -0400 From: Jeff Garzik Organization: none User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021213 Debian/1.2.1-2.bunk X-Accept-Language: en MIME-Version: 1.0 To: "David S. Miller" CC: netdev@oss.sgi.com Subject: Re: The recent free_netdev() conversion... References: <3F535EBD.6090401@pobox.com> <20030901075345.4c35e3e6.davem@redhat.com> In-Reply-To: <20030901075345.4c35e3e6.davem@redhat.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 5483 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: jgarzik@pobox.com Precedence: bulk X-list: netdev Content-Length: 641 Lines: 26 David S. Miller wrote: > On Mon, 01 Sep 2003 10:59:09 -0400 > Jeff Garzik wrote: > > >> err_out: >> kfree(dev); > > ... > >>The "kfree" needs to be a free_netdev() too. > > > If the 'dev' hasn't been given to register_netdev() it > really doesn't need to be free_netdev(). It's just memory > until it has been given to the device layer. True, but for long term, it's best to use free_netdev(). Besides naturally pairing with alloc_foodev(), if we ever decide to have alloc_netdev() perform more than one allocation, free_netdev() will already be in place to handle the multiple de-allocations. Jeff From garzik@gtf.org Mon Sep 1 11:27:15 2003 Received: with ECARTIS (v1.0.0; list netdev); Mon, 01 Sep 2003 11:27:48 -0700 (PDT) Received: from havoc.gtf.org (havoc.gtf.org [63.247.75.124]) by oss.sgi.com (8.12.9/8.12.5) with SMTP id h81IRDWZ001980 for ; Mon, 1 Sep 2003 11:27:14 -0700 Received: by havoc.gtf.org (Postfix, from userid 500) id 37D44666F; Mon, 1 Sep 2003 14:27:08 -0400 (EDT) Date: Mon, 1 Sep 2003 14:27:08 -0400 From: Jeff Garzik To: davem@redhat.com Cc: netdev@oss.sgi.com Subject: [PATCH] move tg3 netif_* to netdevice.h Message-ID: <20030901182708.GA2084@gtf.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.28i X-archive-position: 5482 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: jgarzik@pobox.com Precedence: bulk X-list: netdev Content-Length: 3247 Lines: 115 Ok for me to commit, and send to 2.4+2.6 upstream? I have it queued locally, but it touches stuff you've been touching lately... ===== drivers/net/tg3.c 1.82 vs edited ===== --- 1.82/drivers/net/tg3.c Tue Aug 19 23:53:17 2003 +++ edited/drivers/net/tg3.c Mon Sep 1 14:19:58 2003 @@ -237,38 +237,6 @@ tg3_cond_int(tp); } -/* these netif_xxx funcs should be moved into generic net layer */ -static void netif_poll_disable(struct net_device *dev) -{ - while (test_and_set_bit(__LINK_STATE_RX_SCHED, &dev->state)) { - current->state = TASK_INTERRUPTIBLE; - schedule_timeout(1); - } -} - -static inline void netif_poll_enable(struct net_device *dev) -{ - clear_bit(__LINK_STATE_RX_SCHED, &dev->state); -} - -/* same as netif_rx_complete, except that local_irq_save(flags) - * has already been issued - */ -static inline void __netif_rx_complete(struct net_device *dev) -{ - if (!test_bit(__LINK_STATE_RX_SCHED, &dev->state)) BUG(); - list_del(&dev->poll_list); - smp_mb__before_clear_bit(); - clear_bit(__LINK_STATE_RX_SCHED, &dev->state); -} - -static inline void netif_tx_disable(struct net_device *dev) -{ - spin_lock_bh(&dev->xmit_lock); - netif_stop_queue(dev); - spin_unlock_bh(&dev->xmit_lock); -} - static inline void tg3_netif_stop(struct tg3 *tp) { netif_poll_disable(tp->dev); ===== include/linux/netdevice.h 1.52 vs edited ===== --- 1.52/include/linux/netdevice.h Wed Aug 20 00:01:19 2003 +++ edited/include/linux/netdevice.h Mon Sep 1 14:23:06 2003 @@ -832,6 +832,38 @@ local_irq_restore(flags); } +static inline void netif_poll_disable(struct net_device *dev) +{ + while (test_and_set_bit(__LINK_STATE_RX_SCHED, &dev->state)) { + /* No hurry. */ + current->state = TASK_INTERRUPTIBLE; + schedule_timeout(1); + } +} + +static inline void netif_poll_enable(struct net_device *dev) +{ + clear_bit(__LINK_STATE_RX_SCHED, &dev->state); +} + +/* same as netif_rx_complete, except that local_irq_save(flags) + * has already been issued + */ +static inline void __netif_rx_complete(struct net_device *dev) +{ + if (!test_bit(__LINK_STATE_RX_SCHED, &dev->state)) BUG(); + list_del(&dev->poll_list); + smp_mb__before_clear_bit(); + clear_bit(__LINK_STATE_RX_SCHED, &dev->state); +} + +static inline void netif_tx_disable(struct net_device *dev) +{ + spin_lock_bh(&dev->xmit_lock); + netif_stop_queue(dev); + spin_unlock_bh(&dev->xmit_lock); +} + /* These functions live elsewhere (drivers/net/net_init.c, but related) */ extern void ether_setup(struct net_device *dev); ===== net/core/dev.c 1.95 vs edited ===== --- 1.95/net/core/dev.c Wed Aug 20 00:04:26 2003 +++ edited/net/core/dev.c Mon Sep 1 14:23:40 2003 @@ -845,11 +845,7 @@ * engine, but this requires more changes in devices. */ smp_mb__after_clear_bit(); /* Commit netif_running(). */ - while (test_bit(__LINK_STATE_RX_SCHED, &dev->state)) { - /* No hurry. */ - current->state = TASK_INTERRUPTIBLE; - schedule_timeout(1); - } + netif_poll_disable(dev); /* * Call the device specific close. This cannot fail. @@ -1657,7 +1653,7 @@ list_del(&backlog_dev->poll_list); smp_mb__before_clear_bit(); - clear_bit(__LINK_STATE_RX_SCHED, &backlog_dev->state); + netif_poll_enable(backlog_dev); if (queue->throttle) { queue->throttle = 0; From davem@pizda.ninka.net Mon Sep 1 11:38:50 2003 Received: with ECARTIS (v1.0.0; list netdev); Mon, 01 Sep 2003 11:39:24 -0700 (PDT) Received: from pizda.ninka.net (IDENT:root@pizda.ninka.net [216.101.162.242]) by oss.sgi.com (8.12.9/8.12.5) with SMTP id h81IcnWZ003258 for ; Mon, 1 Sep 2003 11:38:50 -0700 Received: (from davem@localhost) by pizda.ninka.net (8.9.3/8.9.3) id LAA09767; Mon, 1 Sep 2003 11:29:39 -0700 Date: Mon, 1 Sep 2003 11:29:39 -0700 From: "David S. Miller" To: Jeff Garzik Cc: netdev@oss.sgi.com Subject: Re: [PATCH] move tg3 netif_* to netdevice.h Message-Id: <20030901112939.02af4ddc.davem@redhat.com> In-Reply-To: <20030901182708.GA2084@gtf.org> References: <20030901182708.GA2084@gtf.org> X-Mailer: Sylpheed version 0.9.2 (GTK+ 1.2.6; sparc-unknown-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 5484 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@redhat.com Precedence: bulk X-list: netdev Content-Length: 316 Lines: 12 On Mon, 1 Sep 2003 14:27:08 -0400 Jeff Garzik wrote: > Ok for me to commit, and send to 2.4+2.6 upstream? > > I have it queued locally, but it touches stuff you've been touching > lately... Linus and Marcelo have my current work, so you should have no conflicts. Feel free to push it around. From davem@pizda.ninka.net Mon Sep 1 11:40:57 2003 Received: with ECARTIS (v1.0.0; list netdev); Mon, 01 Sep 2003 11:41:30 -0700 (PDT) Received: from pizda.ninka.net (IDENT:root@pizda.ninka.net [216.101.162.242]) by oss.sgi.com (8.12.9/8.12.5) with SMTP id h81IeuWZ003688 for ; Mon, 1 Sep 2003 11:40:57 -0700 Received: (from davem@localhost) by pizda.ninka.net (8.9.3/8.9.3) id LAA09781; Mon, 1 Sep 2003 11:31:43 -0700 Date: Mon, 1 Sep 2003 11:31:43 -0700 From: "David S. Miller" To: Dan Aloni Cc: netdev@oss.sgi.com Subject: Re: [BK PATCH 2.6] repost, fix sysctl breakage during network device renaming, for ipv4 Message-Id: <20030901113143.1ba34464.davem@redhat.com> In-Reply-To: <20030901165559.GA27099@callisto.yi.org> References: <20030901164624.GA26886@callisto.yi.org> <20030901094127.6a0f6878.davem@redhat.com> <20030901165559.GA27099@callisto.yi.org> X-Mailer: Sylpheed version 0.9.2 (GTK+ 1.2.6; sparc-unknown-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 5485 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@redhat.com Precedence: bulk X-list: netdev Content-Length: 516 Lines: 14 On Mon, 1 Sep 2003 19:55:59 +0300 Dan Aloni wrote: > The private copy of strdup() is something that I'd also wouldn't > want, but I don't have much choice. Please read a recent > thread in lkml regarding strdup() consolidation. Ugh, I'm afraid to look... I guess the controversy is over the allocation function, what GFP_* flags it should use etc.? For now just call the thing in your patch netdev_name_dup() or something like that. I can't handle having something named "strdup()" in there :-) From da-x@gmx.net Mon Sep 1 11:55:44 2003 Received: with ECARTIS (v1.0.0; list netdev); Mon, 01 Sep 2003 11:56:17 -0700 (PDT) Received: from mail.gmx.net (imap.gmx.net [213.165.64.20]) by oss.sgi.com (8.12.9/8.12.5) with SMTP id h81IthWZ004863 for ; Mon, 1 Sep 2003 11:55:43 -0700 Received: (qmail 4923 invoked by uid 65534); 1 Sep 2003 18:55:35 -0000 Received: from bzq-234-149.red.bezeqint.net (HELO callisto.yi.org) (212.179.234.149) by mail.gmx.net (mp022) with SMTP; 01 Sep 2003 20:55:35 +0200 Date: Mon, 1 Sep 2003 21:55:32 +0300 From: Dan Aloni To: "David S. Miller" Cc: netdev@oss.sgi.com Subject: Re: [BK PATCH 2.6] repost, fix sysctl breakage during network device renaming, for ipv4 Message-ID: <20030901185532.GA28941@callisto.yi.org> References: <20030901164624.GA26886@callisto.yi.org> <20030901094127.6a0f6878.davem@redhat.com> <20030901165559.GA27099@callisto.yi.org> <20030901113143.1ba34464.davem@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030901113143.1ba34464.davem@redhat.com> User-Agent: Mutt/1.5.4i X-archive-position: 5486 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: da-x@gmx.net Precedence: bulk X-list: netdev Content-Length: 900 Lines: 26 On Mon, Sep 01, 2003 at 11:31:43AM -0700, David S. Miller wrote: > On Mon, 1 Sep 2003 19:55:59 +0300 > Dan Aloni wrote: > > > The private copy of strdup() is something that I'd also wouldn't > > want, but I don't have much choice. Please read a recent > > thread in lkml regarding strdup() consolidation. > > Ugh, I'm afraid to look... I guess the controversy is > over the allocation function, what GFP_* flags it should > use etc.? Yes, this is the one reason against consolidation, though I don't know why anyone would want to call strdup() from a context other than GPF_KERNEL. Copying strings around in the kernel is done as a result of userspace interaction. > For now just call the thing in your patch netdev_name_dup() or > something like that. I can't handle having something named > "strdup()" in there :-) Sure, I'll do it and resend. -- Dan Aloni da-x@gmx.net From garzik@gtf.org Mon Sep 1 12:34:24 2003 Received: with ECARTIS (v1.0.0; list netdev); Mon, 01 Sep 2003 12:34:58 -0700 (PDT) Received: from havoc.gtf.org (havoc.gtf.org [63.247.75.124]) by oss.sgi.com (8.12.9/8.12.5) with SMTP id h81JYNWZ007891 for ; Mon, 1 Sep 2003 12:34:23 -0700 Received: by havoc.gtf.org (Postfix, from userid 500) id D42DF6643; Mon, 1 Sep 2003 15:34:17 -0400 (EDT) Date: Mon, 1 Sep 2003 15:34:17 -0400 From: Jeff Garzik To: netdev@oss.sgi.com, davem@redhat.com Subject: [patch 2.4][fyi] s/blog_dev/backlog_dev/ in process_backlog Message-ID: <20030901193417.GA7519@gtf.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.28i X-archive-position: 5488 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: jgarzik@pobox.com Precedence: bulk X-list: netdev Content-Length: 1735 Lines: 58 Since I was patching this area anyway... Queued locally. Patch only for 2.4.x. See BK description for more. # This is a BitKeeper generated patch for the following project: # Project Name: Linux kernel tree # This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas: # ChangeSet 1.1126 -> 1.1127 # net/core/dev.c 1.39 -> 1.40 # # The following is the BitKeeper ChangeSet Log # -------------------------------------------- # 03/09/01 jgarzik@redhat.com 1.1127 # [NET] s/blog_dev/backlog_dev/ in process_backlog, net/core/dev.c # # This 100% cosmetic change reduces the diff between 2.4 and 2.5. # -------------------------------------------- # diff -Nru a/net/core/dev.c b/net/core/dev.c --- a/net/core/dev.c Mon Sep 1 15:32:25 2003 +++ b/net/core/dev.c Mon Sep 1 15:32:25 2003 @@ -1535,10 +1535,10 @@ return ret; } -static int process_backlog(struct net_device *blog_dev, int *budget) +static int process_backlog(struct net_device *backlog_dev, int *budget) { int work = 0; - int quota = min(blog_dev->quota, *budget); + int quota = min(backlog_dev->quota, *budget); int this_cpu = smp_processor_id(); struct softnet_data *queue = &softnet_data[this_cpu]; unsigned long start_time = jiffies; @@ -1575,17 +1575,17 @@ #endif } - blog_dev->quota -= work; + backlog_dev->quota -= work; *budget -= work; return -1; job_done: - blog_dev->quota -= work; + backlog_dev->quota -= work; *budget -= work; - list_del(&blog_dev->poll_list); + list_del(&backlog_dev->poll_list); smp_mb__before_clear_bit(); - netif_poll_enable(blog_dev); + netif_poll_enable(backlog_dev); if (queue->throttle) { queue->throttle = 0; From garzik@gtf.org Mon Sep 1 17:33:45 2003 Received: with ECARTIS (v1.0.0; list netdev); Mon, 01 Sep 2003 17:34:20 -0700 (PDT) Received: from havoc.gtf.org (havoc.gtf.org [63.247.75.124]) by oss.sgi.com (8.12.9/8.12.5) with SMTP id h820XiWZ001128 for ; Mon, 1 Sep 2003 17:33:45 -0700 Received: by havoc.gtf.org (Postfix, from userid 500) id 3C6086645; Mon, 1 Sep 2003 20:33:39 -0400 (EDT) Date: Mon, 1 Sep 2003 20:33:39 -0400 From: Jeff Garzik To: netdev@oss.sgi.com, davem@redhat.com Subject: [patch][fyi] move ethtool_op_tx_csum Message-ID: <20030902003339.GA29156@gtf.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.28i X-archive-position: 5489 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: jgarzik@pobox.com Precedence: bulk X-list: netdev Queued here for both 2.4 and 2.5. # This is a BitKeeper generated patch for the following project: # Project Name: Linux kernel tree # This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas: # ChangeSet 1.1129 -> 1.1130 # net/core/ethtool.c 1.3 -> 1.4 # include/linux/ethtool.h 1.16 -> 1.17 # net/netsyms.c 1.41 -> 1.42 # drivers/net/8139cp.c 1.43 -> 1.44 # # The following is the BitKeeper ChangeSet Log # -------------------------------------------- # 03/09/01 jgarzik@redhat.com 1.1130 # [NET] move ethtool_op_set_tx_csum from 8139cp drvr to net/core/ethtool.c, # where it belongs. # -------------------------------------------- # diff -Nru a/drivers/net/8139cp.c b/drivers/net/8139cp.c --- a/drivers/net/8139cp.c Mon Sep 1 20:32:14 2003 +++ b/drivers/net/8139cp.c Mon Sep 1 20:32:14 2003 @@ -1405,17 +1405,6 @@ return 0; } -/* move this to net/core/ethtool.c */ -static int ethtool_op_set_tx_csum(struct net_device *dev, u32 data) -{ - if (data) - dev->features |= NETIF_F_IP_CSUM; - else - dev->features &= ~NETIF_F_IP_CSUM; - - return 0; -} - static void cp_get_regs(struct net_device *dev, struct ethtool_regs *regs, void *p) { diff -Nru a/include/linux/ethtool.h b/include/linux/ethtool.h --- a/include/linux/ethtool.h Mon Sep 1 20:32:14 2003 +++ b/include/linux/ethtool.h Mon Sep 1 20:32:14 2003 @@ -255,6 +255,7 @@ /* Some generic methods drivers may use in their ethtool_ops */ u32 ethtool_op_get_link(struct net_device *dev); u32 ethtool_op_get_tx_csum(struct net_device *dev); +int ethtool_op_set_tx_csum(struct net_device *dev, u32 data); u32 ethtool_op_get_sg(struct net_device *dev); int ethtool_op_set_sg(struct net_device *dev, u32 data); diff -Nru a/net/core/ethtool.c b/net/core/ethtool.c --- a/net/core/ethtool.c Mon Sep 1 20:32:14 2003 +++ b/net/core/ethtool.c Mon Sep 1 20:32:14 2003 @@ -31,6 +31,16 @@ return (dev->features & NETIF_F_IP_CSUM) != 0; } +int ethtool_op_set_tx_csum(struct net_device *dev, u32 data) +{ + if (data) + dev->features |= NETIF_F_IP_CSUM; + else + dev->features &= ~NETIF_F_IP_CSUM; + + return 0; +} + u32 ethtool_op_get_sg(struct net_device *dev) { return (dev->features & NETIF_F_SG) != 0; diff -Nru a/net/netsyms.c b/net/netsyms.c --- a/net/netsyms.c Mon Sep 1 20:32:14 2003 +++ b/net/netsyms.c Mon Sep 1 20:32:14 2003 @@ -617,6 +617,7 @@ /* ethtool.c */ EXPORT_SYMBOL(ethtool_op_get_link); EXPORT_SYMBOL(ethtool_op_get_tx_csum); +EXPORT_SYMBOL(ethtool_op_set_tx_csum); EXPORT_SYMBOL(ethtool_op_get_sg); EXPORT_SYMBOL(ethtool_op_set_sg); From mitch@sfgoth.com Tue Sep 2 01:08:59 2003 Received: with ECARTIS (v1.0.0; list netdev); Tue, 02 Sep 2003 01:09:14 -0700 (PDT) Received: from gaz.sfgoth.com ([63.205.85.133]) by oss.sgi.com (8.12.9/8.12.5) with SMTP id h8288wWZ011068 for ; Tue, 2 Sep 2003 01:08:59 -0700 Received: from gaz.sfgoth.com (localhost.sfgoth.com [127.0.0.1]) by gaz.sfgoth.com (8.12.9/8.12.6) with ESMTP id h828GQkV052388; Tue, 2 Sep 2003 01:16:26 -0700 (PDT) (envelope-from mitch@gaz.sfgoth.com) Received: (from mitch@localhost) by gaz.sfgoth.com (8.12.9/8.12.6/Submit) id h828GPjv052387; Tue, 2 Sep 2003 01:16:25 -0700 (PDT) (envelope-from mitch) Date: Tue, 2 Sep 2003 01:16:25 -0700 From: Mitchell Blank Jr To: netdev@oss.sgi.com Cc: "David S. Miller" Subject: [PATCH] small skbuff.[ch] tweaks Message-ID: <20030902081625.GA52298@gaz.sfgoth.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i X-archive-position: 5490 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: mitch@sfgoth.com Precedence: bulk X-list: netdev This patch: o Makes a couple inline functions in take const arguments as appropriate o Obvious unlikely()/likely()/BUG_ON() conversions Patch is versus 2.6.0-test4. -Mitch --- linux-2.6.0-test4-VIRGIN/include/linux/skbuff.h 2003-08-10 05:28:41.000000000 -0700 +++ linux-2.6.0-test4mnb1/include/linux/skbuff.h 2003-09-01 14:08:54.000000000 -0700 @@ -306,7 +306,7 @@ * * Returns true if the queue is empty, false otherwise. */ -static inline int skb_queue_empty(struct sk_buff_head *list) +static inline int skb_queue_empty(const struct sk_buff_head *list) { return list->next == (struct sk_buff *)list; } @@ -475,7 +475,7 @@ * * Return the length of an &sk_buff queue. */ -static inline __u32 skb_queue_len(struct sk_buff_head *list_) +static inline __u32 skb_queue_len(const struct sk_buff_head *list_) { return list_->qlen; } @@ -1050,7 +1050,7 @@ int gfp_mask) { struct sk_buff *skb = alloc_skb(length + 16, gfp_mask); - if (skb) + if (likely(skb)) skb_reserve(skb, 16); return skb; } --- linux-2.6.0-test4-VIRGIN/net/core/skbuff.c 2003-08-22 13:47:28.000000000 -0700 +++ linux-2.6.0-test4mnb1/net/core/skbuff.c 2003-09-01 14:00:37.000000000 -0700 @@ -129,14 +129,17 @@ /* Get the HEAD */ skb = kmem_cache_alloc(skbuff_head_cache, gfp_mask & ~__GFP_DMA); - if (!skb) + if (unlikely(!skb)) goto out; /* Get the DATA. Size must match skb_add_mtu(). */ size = SKB_DATA_ALIGN(size); data = kmalloc(size + sizeof(struct skb_shared_info), gfp_mask); - if (!data) - goto nodata; + if (unlikely(!data)) { + kmem_cache_free(skbuff_head_cache, skb); + skb = NULL; + goto out; + } memset(skb, 0, offsetof(struct sk_buff, truesize)); skb->truesize = size + sizeof(struct sk_buff); @@ -153,10 +156,6 @@ skb_shinfo(skb)->frag_list = NULL; out: return skb; -nodata: - kmem_cache_free(skbuff_head_cache, skb); - skb = NULL; - goto out; } @@ -218,7 +217,7 @@ void __kfree_skb(struct sk_buff *skb) { - if (skb->list) { + if (unlikely(skb->list)) { printk(KERN_WARNING "Warning: kfree_skb passed an skb still " "on a list (from %p).\n", NET_CALLER(skb)); BUG(); @@ -229,7 +228,7 @@ secpath_put(skb->sp); #endif if(skb->destructor) { - if (in_irq()) + if (unlikely(in_irq())) printk(KERN_WARNING "Warning: kfree_skb on " "hard IRQ %p\n", NET_CALLER(skb)); skb->destructor(skb); @@ -261,7 +260,7 @@ { struct sk_buff *n = kmem_cache_alloc(skbuff_head_cache, gfp_mask); - if (!n) + if (unlikely(!n)) return NULL; #define C(x) n->x = skb->x @@ -395,7 +394,7 @@ */ struct sk_buff *n = alloc_skb(skb->end - skb->head + skb->data_len, gfp_mask); - if (!n) + if (unlikely(!n)) return NULL; /* Set the data pointer */ @@ -405,7 +404,7 @@ n->csum = skb->csum; n->ip_summed = skb->ip_summed; - if (skb_copy_bits(skb, -headerlen, n->head, headerlen + skb->len)) + if (unlikely(skb_copy_bits(skb, -headerlen, n->head, headerlen + skb->len))) BUG(); copy_skb_header(n, skb); @@ -433,7 +432,7 @@ */ struct sk_buff *n = alloc_skb(skb->end - skb->head, gfp_mask); - if (!n) + if (unlikely(!n)) goto out; /* Set the data pointer */ @@ -493,14 +492,13 @@ int size = nhead + (skb->end - skb->head) + ntail; long off; - if (skb_shared(skb)) - BUG(); + BUG_ON(skb_shared(skb)); size = SKB_DATA_ALIGN(size); data = kmalloc(size + sizeof(struct skb_shared_info), gfp_mask); - if (!data) - goto nodata; + if (unlikely(!data)) + return -ENOMEM; /* Copy only real data... and, alas, header. This should be * optimized for the cases when header is void. */ @@ -527,9 +525,6 @@ skb->cloned = 0; atomic_set(&skb_shinfo(skb)->dataref, 1); return 0; - -nodata: - return -ENOMEM; } /* Make private copy of skb with writable head and some headroom */ @@ -543,8 +538,8 @@ skb2 = pskb_copy(skb, GFP_ATOMIC); else { skb2 = skb_clone(skb, GFP_ATOMIC); - if (skb2 && pskb_expand_head(skb2, SKB_DATA_ALIGN(delta), 0, - GFP_ATOMIC)) { + if (unlikely(skb2 && pskb_expand_head(skb2, + SKB_DATA_ALIGN(delta), 0, GFP_ATOMIC))) { kfree_skb(skb2); skb2 = NULL; } @@ -582,7 +577,7 @@ */ struct sk_buff *n = alloc_skb(newheadroom + skb->len + newtailroom, gfp_mask); - if (!n) + if (unlikely(!n)) return NULL; skb_reserve(n, newheadroom); @@ -591,7 +586,7 @@ skb_put(n, skb->len); /* Copy the data only. */ - if (skb_copy_bits(skb, 0, n->data, skb->len)) + if (unlikely(skb_copy_bits(skb, 0, n->data, skb->len))) BUG(); copy_skb_header(n, skb); @@ -625,7 +620,7 @@ nskb = skb_copy_expand(skb, skb_headroom(skb), skb_tailroom(skb) + pad, GFP_ATOMIC); kfree_skb(skb); - if (nskb) + if (likely(nskb)) memset(nskb->data+nskb->len, 0, pad); return nskb; } @@ -645,9 +640,8 @@ int end = offset + skb_shinfo(skb)->frags[i].size; if (end > len) { if (skb_cloned(skb)) { - if (!realloc) - BUG(); - if (pskb_expand_head(skb, 0, 0, GFP_ATOMIC)) + BUG_ON(!realloc); + if (unlikely(pskb_expand_head(skb, 0, 0, GFP_ATOMIC))) return -ENOMEM; } if (len <= offset) { @@ -713,12 +707,12 @@ int i, k, eat = (skb->tail + delta) - skb->end; if (eat > 0 || skb_cloned(skb)) { - if (pskb_expand_head(skb, 0, eat > 0 ? eat + 128 : 0, - GFP_ATOMIC)) + if (unlikely(pskb_expand_head(skb, 0, eat > 0 ? eat + 128 : 0, + GFP_ATOMIC))) return NULL; } - if (skb_copy_bits(skb, skb_headlen(skb), skb->tail, delta)) + if (unlikely(skb_copy_bits(skb, skb_headlen(skb), skb->tail, delta))) BUG(); /* Optimization: no fragments, no reasons to preestimate @@ -748,8 +742,7 @@ struct sk_buff *insp = NULL; do { - if (!list) - BUG(); + BUG_ON(!list); if (list->len <= eat) { /* Eaten as whole. */ @@ -762,7 +755,7 @@ if (skb_shared(list)) { /* Sucks! We need to fork list. :-( */ clone = skb_clone(list, GFP_ATOMIC); - if (!clone) + if (unlikely(!clone)) return NULL; insp = list->next; list = clone; @@ -771,7 +764,7 @@ * problems. */ insp = list; } - if (!pskb_pull(list, eat)) { + if (unlikely(!pskb_pull(list, eat))) { if (clone) kfree_skb(clone); return NULL; @@ -825,7 +818,7 @@ int i, copy; int start = skb_headlen(skb); - if (offset > (int)skb->len - len) + if (unlikely(offset > (int)skb->len - len)) goto fault; /* Copy header. */ @@ -877,8 +870,8 @@ if ((copy = end - offset) > 0) { if (copy > len) copy = len; - if (skb_copy_bits(list, offset - start, - to, copy)) + if (unlikely(skb_copy_bits(list, offset - start, + to, copy))) goto fault; if ((len -= copy) == 0) return 0; @@ -888,7 +881,7 @@ start = end; } } - if (!len) + if (likely(!len)) return 0; fault: @@ -965,8 +958,7 @@ start = end; } } - if (len) - BUG(); + BUG_ON(len); return csum; } @@ -1048,8 +1040,7 @@ start = end; } } - if (len) - BUG(); + BUG_ON(len); return csum; } @@ -1063,8 +1054,7 @@ else csstart = skb_headlen(skb); - if (csstart > skb_headlen(skb)) - BUG(); + BUG_ON(csstart > skb_headlen(skb)); memcpy(to, skb->data, csstart); From mitch@sfgoth.com Tue Sep 2 02:03:30 2003 Received: with ECARTIS (v1.0.0; list netdev); Tue, 02 Sep 2003 02:03:35 -0700 (PDT) Received: from gaz.sfgoth.com ([63.205.85.133]) by oss.sgi.com (8.12.9/8.12.5) with SMTP id h8293UWZ028334 for ; Tue, 2 Sep 2003 02:03:30 -0700 Received: from gaz.sfgoth.com (localhost.sfgoth.com [127.0.0.1]) by gaz.sfgoth.com (8.12.9/8.12.6) with ESMTP id h829B0kV053662; Tue, 2 Sep 2003 02:11:00 -0700 (PDT) (envelope-from mitch@gaz.sfgoth.com) Received: (from mitch@localhost) by gaz.sfgoth.com (8.12.9/8.12.6/Submit) id h829AxCV053661; Tue, 2 Sep 2003 02:10:59 -0700 (PDT) (envelope-from mitch) Date: Tue, 2 Sep 2003 02:10:59 -0700 From: Mitchell Blank Jr To: Andi Kleen Cc: netdev@oss.sgi.com Subject: Re: [PATCH] small skbuff.[ch] tweaks Message-ID: <20030902091059.GA53570@gaz.sfgoth.com> References: <20030902081625.GA52298@gaz.sfgoth.com> <20030902105833.04778449.ak@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030902105833.04778449.ak@suse.de> User-Agent: Mutt/1.4.1i X-archive-position: 5491 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: mitch@sfgoth.com Precedence: bulk X-list: netdev Andi Kleen wrote: > Both unlikely(!ptr) and likely(ptr) are not needed because gcc assumes this > by default Is there any disadvantage to stating it explicitly? -Mitch From ak@suse.de Tue Sep 2 02:04:30 2003 Received: with ECARTIS (v1.0.0; list netdev); Tue, 02 Sep 2003 02:05:03 -0700 (PDT) Received: from Cantor.suse.de (ns.suse.de [195.135.220.2]) by oss.sgi.com (8.12.9/8.12.5) with SMTP id h8294TWZ028639 for ; Tue, 2 Sep 2003 02:04:29 -0700 Received: from Hermes.suse.de (Hermes.suse.de [195.135.221.8]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by Cantor.suse.de (Postfix) with ESMTP id 095F91599B95; Tue, 2 Sep 2003 11:04:24 +0200 (CEST) Date: Tue, 2 Sep 2003 11:04:23 +0200 From: Andi Kleen To: Mitchell Blank Jr Cc: Andi Kleen , netdev@oss.sgi.com Subject: Re: [PATCH] small skbuff.[ch] tweaks Message-ID: <20030902090423.GD3889@wotan.suse.de> References: <20030902081625.GA52298@gaz.sfgoth.com> <20030902105833.04778449.ak@suse.de> <20030902091059.GA53570@gaz.sfgoth.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030902091059.GA53570@gaz.sfgoth.com> X-archive-position: 5492 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ak@suse.de Precedence: bulk X-list: netdev On Tue, Sep 02, 2003 at 02:10:59AM -0700, Mitchell Blank Jr wrote: > Andi Kleen wrote: > > Both unlikely(!ptr) and likely(ptr) are not needed because gcc assumes this > > by default > > Is there any disadvantage to stating it explicitly? It makes the code much uglier. -Andi From ak@suse.de Tue Sep 2 02:20:51 2003 Received: with ECARTIS (v1.0.0; list netdev); Tue, 02 Sep 2003 02:20:57 -0700 (PDT) Received: from Cantor.suse.de (ns.suse.de [195.135.220.2]) by oss.sgi.com (8.12.9/8.12.5) with SMTP id h829KdWZ000733 for ; Tue, 2 Sep 2003 02:20:40 -0700 Received: from Hermes.suse.de (Hermes.suse.de [195.135.221.8]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by Cantor.suse.de (Postfix) with ESMTP id BC0E51599AF6; Tue, 2 Sep 2003 10:58:35 +0200 (CEST) Date: Tue, 2 Sep 2003 10:58:33 +0200 From: Andi Kleen To: Mitchell Blank Jr Cc: netdev@oss.sgi.com, davem@redhat.com Subject: Re: [PATCH] small skbuff.[ch] tweaks Message-Id: <20030902105833.04778449.ak@suse.de> In-Reply-To: <20030902081625.GA52298@gaz.sfgoth.com> References: <20030902081625.GA52298@gaz.sfgoth.com> X-Mailer: Sylpheed version 0.8.9 (GTK+ 1.2.10; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 5493 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ak@suse.de Precedence: bulk X-list: netdev On Tue, 2 Sep 2003 01:16:25 -0700 Mitchell Blank Jr wrote: > --- linux-2.6.0-test4-VIRGIN/net/core/skbuff.c 2003-08-22 13:47:28.000000000 -0700 > +++ linux-2.6.0-test4mnb1/net/core/skbuff.c 2003-09-01 14:00:37.000000000 -0700 > @@ -129,14 +129,17 @@ > /* Get the HEAD */ > skb = kmem_cache_alloc(skbuff_head_cache, > gfp_mask & ~__GFP_DMA); > - if (!skb) > + if (unlikely(!skb)) > goto out; > > /* Get the DATA. Size must match skb_add_mtu(). */ > size = SKB_DATA_ALIGN(size); > data = kmalloc(size + sizeof(struct skb_shared_info), gfp_mask); > - if (!data) > - goto nodata; > + if (unlikely(!data)) { Both unlikely(!ptr) and likely(ptr) are not needed because gcc assumes this by default -Andi From mitch@sfgoth.com Tue Sep 2 02:42:13 2003 Received: with ECARTIS (v1.0.0; list netdev); Tue, 02 Sep 2003 02:42:16 -0700 (PDT) Received: from gaz.sfgoth.com ([63.205.85.133]) by oss.sgi.com (8.12.9/8.12.5) with SMTP id h829gCWZ006225 for ; Tue, 2 Sep 2003 02:42:12 -0700 Received: from gaz.sfgoth.com (localhost.sfgoth.com [127.0.0.1]) by gaz.sfgoth.com (8.12.9/8.12.6) with ESMTP id h829ngkV054427; Tue, 2 Sep 2003 02:49:42 -0700 (PDT) (envelope-from mitch@gaz.sfgoth.com) Received: (from mitch@localhost) by gaz.sfgoth.com (8.12.9/8.12.6/Submit) id h829ngjb054426; Tue, 2 Sep 2003 02:49:42 -0700 (PDT) (envelope-from mitch) Date: Tue, 2 Sep 2003 02:49:42 -0700 From: Mitchell Blank Jr To: Andi Kleen Cc: netdev@oss.sgi.com Subject: Re: [PATCH] small skbuff.[ch] tweaks Message-ID: <20030902094942.GB53570@gaz.sfgoth.com> References: <20030902081625.GA52298@gaz.sfgoth.com> <20030902105833.04778449.ak@suse.de> <20030902091059.GA53570@gaz.sfgoth.com> <20030902090423.GD3889@wotan.suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030902090423.GD3889@wotan.suse.de> User-Agent: Mutt/1.4.1i X-archive-position: 5494 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: mitch@sfgoth.com Precedence: bulk X-list: netdev Andi Kleen wrote: > > > Both unlikely(!ptr) and likely(ptr) are not needed because gcc assumes this > > > by default > > > > Is there any disadvantage to stating it explicitly? > > It makes the code much uglier. Well I guess it's a matter of taste then. Personally I like unlikely()/ likely() a lot, even from just a readability standpoint. I think it provides a nice hint to the structure of code while reading it ("ok, we're just handling an error case here, the meat of the code is below") If anything they help comment the code. I certainly think they're preferable to "this is an unlikely error condition but we shouldn't mark it as such because of some gcc trivia lets us save a few characters of typing" However if the consensus is that those unlikely()'s should be removed I'll be happy to spin a new patch with those removed. -Mitch From Ronnie_vaisman@radwin.com Tue Sep 2 03:24:02 2003 Received: with ECARTIS (v1.0.0; list netdev); Tue, 02 Sep 2003 03:24:36 -0700 (PDT) Received: from mx100.qos.net.il (mx100.qos.net.il [80.74.96.6]) by oss.sgi.com (8.12.9/8.12.5) with SMTP id h82AO0WZ010082 for ; Tue, 2 Sep 2003 03:24:01 -0700 Received: from check_mail.radwin.ltd.com (access.radwin.com [80.74.102.194]) by mx100.qos.net.il (8.11.6/8.11.6) with ESMTP id h82AHiG24153 for ; Tue, 2 Sep 2003 13:17:44 +0300 Received: by check_mail.radwin.ltd.com with XWall v3.27 ; Tue, 2 Sep 2003 13:25:58 +0200 From: Ronnie Vaisman To: "netdev@oss.sgi.com" Subject: GUI linux kerne/driver modulel debugger. Date: Tue, 2 Sep 2003 13:21:20 +0200 X-Assembled-By: XWall v3.27 X-Mailer: Internet Mail Service (5.5.2653.19) Message-ID: <116CA223EAAED2119F050090272E3D7F063F88BC@EXCHANGE> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id h82AO0WZ010082 X-archive-position: 5495 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: Ronnie_vaisman@radwin.com Precedence: bulk X-list: netdev Hi all, I am starting to work with Linux. I would like to debug some device driver module of linux. My questions are Which free GUI debuggers may be used? Can I use DDD for debug module in linux? Is only remote debug mode should be used? I will happy to get any aditional information about this issues. Thanks in advance. Regards, Ronnie Vaisman Regards, Ronnie Vaisman RadWin LTD. 34 Habarzel st., Tel Aviv 69710 Israel +972-3-645-5403 (Direct) +972-3-765-7535(Fax) email Ronnie_Vaisman@radwin.com web ************************************************************************************************** Privacy Notice: The information contained in this transmittal, including any attachments hereto, are confidential and privileged, and intended solely for the specified addressee(s). If you are not the intended addressee, or if you receive this message by error, please notify the sender and delete this information from your computer. Moreover, the recipient(s) may not disclose, forward, or copy this e-mail or attachments, or any portion thereof, or permit the use of this information, by anyone not entitled to it, or in a way that may be damaging to the sender. ************************************************************************************************** From davem@pizda.ninka.net Tue Sep 2 04:46:01 2003 Received: with ECARTIS (v1.0.0; list netdev); Tue, 02 Sep 2003 04:46:33 -0700 (PDT) Received: from pizda.ninka.net (IDENT:root@pizda.ninka.net [216.101.162.242]) by oss.sgi.com (8.12.9/8.12.5) with SMTP id h82Bk0WZ020197 for ; Tue, 2 Sep 2003 04:46:00 -0700 Received: (from davem@localhost) by pizda.ninka.net (8.9.3/8.9.3) id EAA11860; Tue, 2 Sep 2003 04:35:34 -0700 Date: Tue, 2 Sep 2003 04:35:34 -0700 From: "David S. Miller" To: Ville Nuorvala Cc: pekkas@netcore.fi, yoshfuji@linux-ipv6.org, usagi-core@linux-ipv6.org, netdev@oss.sgi.com Subject: Re: [PATCH] IPv6: (5/5+1) Autoconfig link-local addr to IPv6 tunnels Message-Id: <20030902043534.05fc6586.davem@redhat.com> In-Reply-To: References: <20030901035134.2585aa79.davem@redhat.com> X-Mailer: Sylpheed version 0.9.2 (GTK+ 1.2.6; sparc-unknown-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 5496 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@redhat.com Precedence: bulk X-list: netdev On Mon, 1 Sep 2003 17:24:42 +0300 (EEST) Ville Nuorvala wrote: > Ok, this incremental patch to my previous addrconf.c patch generates a > link-local address to the IPv6 tunnel device. It first tries to inherit > the EUI64 identifier of some other device and if this fails, uses a > random interface id. Yoshfuji, do you mind if I apply his patch 5 and "5/5+1"? From acme@conectiva.com.br Tue Sep 2 07:31:08 2003 Received: with ECARTIS (v1.0.0; list netdev); Tue, 02 Sep 2003 07:31:41 -0700 (PDT) Received: from orion.netbank.com.br (orion.netbank.com.br [200.203.199.90]) by oss.sgi.com (8.12.9/8.12.5) with SMTP id h82EV6WZ001244 for ; Tue, 2 Sep 2003 07:31:07 -0700 Received: from [200.181.138.124] (helo=brinquendo.conectiva.com.br) by orion.netbank.com.br with asmtp (Exim 3.33 #1) id 19uCJA-00019P-00; Tue, 02 Sep 2003 11:39:01 -0300 Received: by brinquendo.conectiva.com.br (Postfix, from userid 500) id D469AE723; Tue, 2 Sep 2003 14:30:51 +0000 (UTC) Date: Tue, 2 Sep 2003 11:30:50 -0300 From: Arnaldo Carvalho de Melo To: netfilter-devel@lists.netfilter.org Cc: Linux Networking Development Mailing List Subject: ipt_physdev.c alignment problems on parisc64 Message-ID: <20030902143050.GC3398@conectiva.com.br> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Url: http://advogato.org/person/acme Organization: Conectiva S.A. User-Agent: Mutt/1.5.4i X-archive-position: 5497 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: acme@conectiva.com.br Precedence: bulk X-list: netdev The 1.786.1.54 changeset (i.e. the initial ipt_physdev.c one 8) created this alignment problems on parisc64: tmp.stdout.allegro.31506.s: Assembler messages: tmp.stdout.allegro.31506.s:97: Error: Field not properly aligned [8] (18). tmp.stdout.allegro.31506.s:97: Error: Invalid operands tmp.stdout.allegro.31506.s:125: Error: Field not properly aligned [8] (34). tmp.stdout.allegro.31506.s:125: Error: Invalid operands tmp.stdout.allegro.31506.s:129: Error: Field not properly aligned [8] (50). tmp.stdout.allegro.31506.s:129: Error: Invalid operands I got this nailed to the match function, on these lines: for (i = 0, ret = 0; i < IFNAMSIZ/sizeof(unsigned long); i++) { ret |= (((const unsigned long *)indev)[i] ^ ((const unsigned long *)info->physindev)[i]) & ((const unsigned long *)info->in_mask)[i]; } and for (i = 0, ret = 0; i < IFNAMSIZ/sizeof(unsigned long); i++) { ret |= (((const unsigned long *)outdev)[i] ^ ((const unsigned long *)info->physoutdev)[i]) & ((const unsigned long *)info->out_mask)[i]; } Reading specs from /opt/palinux/lib/gcc-lib/hppa64-linux/3.0.4/specs Configured with: ../../gcc-3.0-3.0.4ds3/src/configure --host=hppa-linux --build=hppa-linux --target=hppa64-linux --disable-shared --disable-nls --enable-languages=c --prefix=/opt/palinux Thread model: single gcc version 3.0.4 acme@allegro:~/bk/scsi-2.6$ - Arnaldo From pekkas@netcore.fi Tue Sep 2 07:42:39 2003 Received: with ECARTIS (v1.0.0; list netdev); Tue, 02 Sep 2003 07:43:14 -0700 (PDT) Received: from netcore.fi (netcore.fi [193.94.160.1]) by oss.sgi.com (8.12.9/8.12.5) with SMTP id h82EgbWZ003386 for ; Tue, 2 Sep 2003 07:42:39 -0700 Received: from localhost (pekkas@localhost) by netcore.fi (8.11.6/8.11.6) with ESMTP id h82EeGb04301; Tue, 2 Sep 2003 17:40:16 +0300 Date: Tue, 2 Sep 2003 17:40:15 +0300 (EEST) From: Pekka Savola To: Ville Nuorvala cc: "David S. Miller" , , , Subject: Re: [PATCH] IPv6: (5/5+1) Autoconfig link-local addr to IPv6 tunnels In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 5498 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: pekkas@netcore.fi Precedence: bulk X-list: netdev On Mon, 1 Sep 2003, Ville Nuorvala wrote: > On Mon, 1 Sep 2003, David S. Miller wrote: > > On Mon, 1 Sep 2003 13:48:44 +0300 (EEST) > > Pekka Savola wrote: > > > > > Well, link-local addresses are used e.g. by routing protocols and such, so > > > having one is probably rather important.. > > > > Ok. > > > > > FWIW, on FreeBSD platform they take the link-local address of the first > > > physical interface, and give the exact same link-local address on all of > > > the tunnels, disambiuating them with the scope identifier. Seems like an > > > OK appaorach too, and guarantees (to the degree of unique MAC addresses) > > > that the addresses of the endpoints do not clash. > > > > Interesting approach... I'm not particularly picky about how this > > uniqueness issue is solved. > > Ok, this incremental patch to my previous addrconf.c patch generates a > link-local address to the IPv6 tunnel device. It first tries to inherit > the EUI64 identifier of some other device and if this fails, uses a > random interface id. Two comments: + /* try to inherit EUI64 from another device */ + for (dev = dev_base; dev; dev = dev->next) { + if (!ipv6_generate_eui64(addr.s6_addr + 8, dev)) { + addrconf_add_linklocal(idev, &addr); + return; + ==> does this really inherit _EUI64_, *or* MAC address (or something like it) to derive an EUI64? Note that there is a significant difference when you've configured manually e.g. 3ffe:ffff:f00:ba::1 on a device, and the case when you've auto-configured the interface identifier from the MAC address of the device. The latter is probably always unique. The former is not necessarily sufficiently unique (but better than nothing, of course). +#ifdef CONFIG_IPV6_PRIVACY + /* else try to generate a random identifier */ + if (!__ipv6_regen_rndid(idev)) { + memcpy(addr.s6_addr + 8, idev->rndid, 8); + addrconf_add_linklocal(idev, &addr); + return; + ==> my question is: as the former method to steal an EUI64 should succeed pretty much always, is it useful to add basically dead code which never gets executed here? I certainly can't think of any scenario where you'd have no interface to steal the MAC address/EUI64 from and you'd have to fall back to random identifiers? -- Pekka Savola "You each name yourselves king, yet the Netcore Oy kingdom bleeds." Systems. Networks. Security. -- George R.R. Martin: A Clash of Kings From shemminger@osdl.org Tue Sep 2 08:28:38 2003 Received: with ECARTIS (v1.0.0; list netdev); Tue, 02 Sep 2003 08:29:12 -0700 (PDT) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.12.9/8.12.5) with SMTP id h82FSaWZ008584 for ; Tue, 2 Sep 2003 08:28:38 -0700 Received: from dell_ss3.pdx.osdl.net (dell_ss3.pdx.osdl.net [172.20.1.60]) by mail.osdl.org (8.11.6/8.11.6) with SMTP id h82FSJo24319; Tue, 2 Sep 2003 08:28:19 -0700 Date: Tue, 2 Sep 2003 08:28:07 -0700 From: Stephen Hemminger To: "David S. Miller" Cc: Bart De Schuymer , greearb@candelatech.com, netdev@oss.sgi.com Subject: Re: [PATCH/RFC] disallow vlan devices on top of a logical bridge device Message-Id: <20030902082807.0e18fe76.shemminger@osdl.org> In-Reply-To: <20030830203043.0eb1a660.davem@redhat.com> References: <200308301504.03241.bdschuym@pandora.be> <20030830203043.0eb1a660.davem@redhat.com> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.4claws (GTK+ 1.2.10; i686-pc-linux-gnu) X-Face: &@E+xe?c%:&e4D{>f1O<&U>2qwRREG5!}7R4;D<"NO^UI2mJ[eEOA2*3>(`Th.yP,VDPo9$ /`~cw![cmj~~jWe?AHY7D1S+\}5brN0k*NE?pPh_'_d>6;XGG[\KDRViCfumZT3@[ Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 5499 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: shemminger@osdl.org Precedence: bulk X-list: netdev On Sat, 30 Aug 2003 20:30:43 -0700 "David S. Miller" wrote: > On Sat, 30 Aug 2003 15:04:03 +0200 > Bart De Schuymer wrote: > > > The patch below disables making vlan devices on top of bridge > > devices, f.e. br0.12 would be impossible. > > I don't think disallowing this merely for the sake of > implementation convenience is such a good idea. And > from other people's comments, such setups might even > be useful. Bridge of a VLAN makes sense and is done. VLAN of a bridge might be done by someone for redundancy or testing. Don't apply the patch, can't see the harm in allowing either case. From akpm@osdl.org Tue Sep 2 09:54:26 2003 Received: with ECARTIS (v1.0.0; list netdev); Tue, 02 Sep 2003 09:54:58 -0700 (PDT) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.12.9/8.12.5) with SMTP id h82GsPWZ014728 for ; Tue, 2 Sep 2003 09:54:26 -0700 Received: from dhcp-140-192.pao.digeo.com (build.pdx.osdl.net [172.20.1.2]) by mail.osdl.org (8.11.6/8.11.6) with SMTP id h82GsJo08121; Tue, 2 Sep 2003 09:54:19 -0700 Date: Tue, 2 Sep 2003 09:37:42 -0700 From: Andrew Morton To: netdev@oss.sgi.com Cc: mcousin@sigma.fr Subject: Fw: [Bugme-new] [Bug 1176] New: icmp redirect shuts connexions Message-Id: <20030902093742.20ea5d2d.akpm@osdl.org> X-Mailer: Sylpheed version 0.9.4 (GTK+ 1.2.10; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 5500 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: akpm@osdl.org Precedence: bulk X-list: netdev Begin forwarded message: Date: Tue, 2 Sep 2003 08:49:47 -0700 From: bugme-daemon@osdl.org To: bugme-new@lists.osdl.org Subject: [Bugme-new] [Bug 1176] New: icmp redirect shuts connexions http://bugme.osdl.org/show_bug.cgi?id=1176 Summary: icmp redirect shuts connexions Kernel Version: 2.6.0-test4 Status: NEW Severity: normal Owner: bugme-janitors@lists.osdl.org Submitter: mcousin@sigma.fr Distribution: Gentoo Hardware Environment: PIV 1.7 GHz - 1Gb ns83820 network adapter Software Environment: 2.6.0-test4. gcc version 3.3.1 (Gentoo Linux 3.3.1, propolice). glibc 2.3.2. Problem Description: Connection are dropped every time I get an icmp_redirect Steps to reproduce: Log into a server using the wrong router as your default route. You get an icmp redirect, and manage to connect. At the next icmp_redirect you receive, connexions are lost. I've tested this with having an IRC connexion to the 'mercure' machine . After about 10 minutes, I see a new ICMP redirect arriving (the route cache has expired ?) 64 bytes from mercure.sigma.fr (192.168.1.232): icmp_seq=501 ttl=252 time=0.565 ms 64 bytes from mercure.sigma.fr (192.168.1.232): icmp_seq=503 ttl=252 time=0.575 ms >From 89.133.2.200: icmp_seq=504 Redirect Host(New nexthop: fwsigma.sigma.fr (89.133.2.1)) 64 bytes from mercure.sigma.fr (192.168.1.232): icmp_seq=504 ttl=252 time=1.61 ms 64 bytes from mercure.sigma.fr (192.168.1.232): icmp_seq=505 ttl=252 time=0.596 ms from route -C : before the redirect : marc root # route -C | grep mercure marc mercure.sigma.f fwsigma.sigma.f 0 0 5 eth0 mercure.sigma.f marc marc l 0 0 4 lo marc mercure.sigma.f fwsigma.sigma.f 0 0 470 eth0 marc mercure.sigma.f fwsigma.sigma.f 0 2 5 eth0 mercure.sigma.f marc marc l 0 0 525 lo after the redirect: marc root # route -C | grep mercure mercure.sigma.f marc marc l 0 0 18 lo marc mercure.sigma.f fwsigma.sigma.f 0 0 6 eth0 marc mercure.sigma.f fwsigma.sigma.f 0 1 4 eth0 my routing table: Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 89.0.0.0 * 255.0.0.0 U 0 0 0 eth0 loopback localhost 255.0.0.0 UG 0 0 0 lo default 89.133.2.200 0.0.0.0 UG 1 0 0 eth0 My 'usual' route is via 89.133.2.200. To get to mercure, I have to get through 'fwsigma' (89.133.2.1). As soon as I get the ICMP_REDIRECT packet, the connexion to the IRC server is lost. When I add a static route to mercure via fwsigma, the problem disappears... ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is. From vnuorval@tcs.hut.fi Tue Sep 2 09:59:19 2003 Received: with ECARTIS (v1.0.0; list netdev); Tue, 02 Sep 2003 09:59:24 -0700 (PDT) Received: from smtp-1.hut.fi (root@smtp-1.hut.fi [130.233.228.91]) by oss.sgi.com (8.12.9/8.12.5) with SMTP id h82GxHWZ015395 for ; Tue, 2 Sep 2003 09:59:18 -0700 Received: from neon.tcs.hut.fi (neon.tcs.hut.fi [130.233.215.20]) by smtp-1.hut.fi (8.12.9/8.12.9) with ESMTP id h82Gx8Qe022368; Tue, 2 Sep 2003 19:59:09 +0300 Received: from rhea.tcs.hut.fi (rhea.tcs.hut.fi [130.233.215.147]) by neon.tcs.hut.fi (Postfix) with ESMTP id 58C788001B8; Tue, 2 Sep 2003 19:59:08 +0300 (EEST) Received: from rhea.tcs.hut.fi (localhost [127.0.0.1]) by rhea.tcs.hut.fi (8.12.3/8.12.3/Debian-6.4) with ESMTP id h82Gx89s001958; Tue, 2 Sep 2003 19:59:08 +0300 Received: from localhost (vnuorval@localhost) by rhea.tcs.hut.fi (8.12.3/8.12.3/Debian-6.4) with ESMTP id h82Gx7RM001954; Tue, 2 Sep 2003 19:59:07 +0300 Date: Tue, 2 Sep 2003 19:59:07 +0300 (EEST) From: Ville Nuorvala To: Pekka Savola Cc: "David S. Miller" , , , Subject: Re: [PATCH] IPv6: (5/5+1) Autoconfig link-local addr to IPv6 tunnels In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-RAVMilter-Version: 8.4.3(snapshot 20030212) (smtp-1.hut.fi) X-DCC-HUTCC-Metrics: smtp-1.hut.fi 1165; Body=6 Fuz1=6 Fuz2=6 X-archive-position: 5501 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: vnuorval@tcs.hut.fi Precedence: bulk X-list: netdev On Tue, 2 Sep 2003, Pekka Savola wrote: > Two comments: > > + /* try to inherit EUI64 from another device */ > + for (dev = dev_base; dev; dev = dev->next) { > + if (!ipv6_generate_eui64(addr.s6_addr + 8, dev)) { > + addrconf_add_linklocal(idev, &addr); > + return; > + > > ==> does this really inherit _EUI64_, *or* MAC address (or something like > it) to derive an EUI64? Note that there is a significant difference when > you've configured manually e.g. 3ffe:ffff:f00:ba::1 on a device, and the > case when you've auto-configured the interface identifier from the MAC > address of the device. ipv6_generate_eui64() derives the interface identifier from the MAC address on ARPHRD_{ETHER,FDDI,IEEE802_TR,ARCNET} interfaces, but doesn't do anything for other types of devices > ==> my question is: as the former method to steal an EUI64 should succeed > pretty much always, is it useful to add basically dead code which never > gets executed here? I certainly can't think of any scenario where you'd > have no interface to steal the MAC address/EUI64 from and you'd have to > fall back to random identifiers? If the node doesn't have an Ethernet (etc.) NIC it won't get a valid identifier from ipv6_generate_eui64() and has to resort to something else, for example generating a random address. An alternative would be to use ipv6_inherit_eui64(), which just copies the 64-bit suffix from the first link-local address it can find. This includes both manually and auto-configured addresses, which means the risk of duplicate addresses might be (I assume) greater than in the random address case. Regards, Ville -- Ville Nuorvala Research Assistant, Institute of Digital Communications, Helsinki University of Technology email: vnuorval@tcs.hut.fi, phone: +358 (0)9 451 5257 From shemminger@osdl.org Tue Sep 2 10:43:41 2003 Received: with ECARTIS (v1.0.0; list netdev); Tue, 02 Sep 2003 10:44:15 -0700 (PDT) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.12.9/8.12.5) with SMTP id h82HheWZ018933 for ; Tue, 2 Sep 2003 10:43:41 -0700 Received: from dell_ss3.pdx.osdl.net (dell_ss3.pdx.osdl.net [172.20.1.60]) by mail.osdl.org (8.11.6/8.11.6) with SMTP id h82HhKo17095; Tue, 2 Sep 2003 10:43:21 -0700 Date: Tue, 2 Sep 2003 10:43:08 -0700 From: Stephen Hemminger To: chas williams Cc: netdev@oss.sgi.com Subject: [RFT] covert br2684 to seq_file Message-Id: <20030902104308.08ce3fa4.shemminger@osdl.org> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.4claws (GTK+ 1.2.10; i686-pc-linux-gnu) X-Face: &@E+xe?c%:&e4D{>f1O<&U>2qwRREG5!}7R4;D<"NO^UI2mJ[eEOA2*3>(`Th.yP,VDPo9$ /`~cw![cmj~~jWe?AHY7D1S+\}5brN0k*NE?pPh_'_d>6;XGG[\KDRViCfumZT3@[ Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 5502 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: shemminger@osdl.org Precedence: bulk X-list: netdev Convert the /proc/net/atm/br2684 to seq_file interface. It builds and runs, but without any real atm hardware the table is empty... Patch is against 2.6-test4 bk latest. diff -Nru a/net/atm/br2684.c b/net/atm/br2684.c --- a/net/atm/br2684.c Tue Sep 2 10:37:52 2003 +++ b/net/atm/br2684.c Tue Sep 2 10:37:52 2003 @@ -18,6 +18,7 @@ #include #include #include +#include #include @@ -666,31 +667,57 @@ return -ENOIOCTLCMD; } -/* Never put more than 256 bytes in at once */ -static int br2684_proc_engine(loff_t pos, char *buf) +#ifdef CONFIG_PROC_FS +static void *br2684_seq_start(struct seq_file *seq, loff_t *pos) { - struct list_head *lhd, *lhc; - struct net_device *net_dev; - struct br2684_dev *brdev; - struct br2684_vcc *brvcc; - list_for_each(lhd, &br2684_devs) { - net_dev = list_entry_brdev(lhd); - brdev = BRPRIV(net_dev); - if (pos-- == 0) - return sprintf(buf, "dev %.16s: num=%d, mac=%02X:%02X:" - "%02X:%02X:%02X:%02X (%s)\n", net_dev->name, - brdev->number, - net_dev->dev_addr[0], - net_dev->dev_addr[1], - net_dev->dev_addr[2], - net_dev->dev_addr[3], - net_dev->dev_addr[4], - net_dev->dev_addr[5], - brdev->mac_was_set ? "set" : "auto"); - list_for_each(lhc, &brdev->brvccs) { - brvcc = list_entry_brvcc(lhc); - if (pos-- == 0) - return sprintf(buf, " vcc %d.%d.%d: encaps=%s" + loff_t offs = 0; + struct br2684_dev *brd; + + read_lock(&devs_lock); + + list_for_each_entry(brd, &br2684_devs, br2684